tur
DTDrizzle Team
•Created by tur on 1/14/2025 in #help
``
import { config } from 'dotenv';
import { defineConfig } from 'drizzle-kit';
import { resolve } from 'path';
config({ path: resolve(__dirname, '.dev.vars') });
export default defineConfig({
dialect: 'sqlite',
driver: 'd1-http',
dbCredentials: {
accountId: process.env.CLOUDFLARE_ACCOUNT_ID!,
databaseId: process.env.CLOUDFLARE_DATABASE_ID!,
token: process.env.CLOUDFLARE_API_TOKEN!,
},
verbose: true,
schema: 'apps/academic/pinebaatars/recruiter-service/src/db/index.ts',
out: 'apps/academic/pinebaatars/recruiter-service/drizzle',
});
import { config } from 'dotenv';
import { defineConfig } from 'drizzle-kit';
import { resolve } from 'path';
config({ path: resolve(__dirname, '.dev.vars') });
export default defineConfig({
dialect: 'sqlite',
driver: 'd1-http',
dbCredentials: {
accountId: process.env.CLOUDFLARE_ACCOUNT_ID!,
databaseId: process.env.CLOUDFLARE_DATABASE_ID!,
token: process.env.CLOUDFLARE_API_TOKEN!,
},
verbose: true,
schema: 'apps/academic/pinebaatars/recruiter-service/src/db/index.ts',
out: 'apps/academic/pinebaatars/recruiter-service/drizzle',
});
"drizzle:studio": {
"executor": "nx:run-commands",
"defaultConfiguration": "testing",
"configurations": {
"testing": {
"command": "drizzle-kit studio --port 3005 --verbose --config={projectRoot}/drizzle.config.ts"
}
},
"dependsOn": [
{
"target": "setup"
}
]
}
"drizzle:studio": {
"executor": "nx:run-commands",
"defaultConfiguration": "testing",
"configurations": {
"testing": {
"command": "drizzle-kit studio --port 3005 --verbose --config={projectRoot}/drizzle.config.ts"
}
},
"dependsOn": [
{
"target": "setup"
}
]
}
3 replies