2025-12-11 14:00:54 +09:00
|
|
|
import { defineConfig } from "prisma/config";
|
|
|
|
|
|
|
|
|
|
// Default connection for local development (matches docker/dev/docker-compose.yml)
|
|
|
|
|
const DEFAULT_DATABASE_URL = "postgresql://dev:dev@localhost:5432/portal_dev";
|
2025-12-10 13:59:41 +09:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Prisma 7 Configuration
|
|
|
|
|
*
|
2025-12-11 14:00:54 +09:00
|
|
|
* Centralized configuration for Prisma CLI commands (migrate, studio, etc.)
|
|
|
|
|
* Runtime adapter is configured in PrismaService, not here.
|
2025-12-10 13:59:41 +09:00
|
|
|
*
|
2025-12-11 14:00:54 +09:00
|
|
|
* @see https://www.prisma.io/docs/orm/reference/prisma-config-reference
|
|
|
|
|
* @see https://www.prisma.io/docs/orm/prisma-schema/overview/data-sources
|
2025-12-10 13:59:41 +09:00
|
|
|
*/
|
|
|
|
|
export default defineConfig({
|
|
|
|
|
schema: "./schema.prisma",
|
2025-12-11 14:00:54 +09:00
|
|
|
// Database connection for CLI commands (migrate, studio, etc.)
|
|
|
|
|
datasource: {
|
|
|
|
|
url: process.env.DATABASE_URL || DEFAULT_DATABASE_URL,
|
2025-12-10 13:59:41 +09:00
|
|
|
},
|
|
|
|
|
});
|