mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-27 23:17:43 +02:00
🔧 chore: create @manacore/shared-drizzle-config and migrate 16 configs
- Create factory function with dbName, schemaPath, outDir, schemaFilter options - Migrate 12 app backends: calendar, chat, clock, contacts, nutriphi, picture, planta, presi, questions, skilltree, storage, todo - Migrate 4 services: mana-core-auth, telegram-zitare-bot, telegram-todo-bot, telegram-nutriphi-bot - Update consolidation docs with completed Drizzle config task Savings: ~160 LOC (16 configs × ~10 LOC each)
This commit is contained in:
parent
188290b427
commit
6807543d60
21 changed files with 283 additions and 179 deletions
|
|
@ -1,13 +1,6 @@
|
|||
import { defineConfig } from 'drizzle-kit';
|
||||
import { createDrizzleConfig } from '@manacore/shared-drizzle-config';
|
||||
|
||||
export default defineConfig({
|
||||
dialect: 'postgresql',
|
||||
schema: './src/db/schema/index.ts',
|
||||
out: './src/db/migrations',
|
||||
dbCredentials: {
|
||||
url: process.env.DATABASE_URL || 'postgresql://manacore:devpassword@localhost:5432/manacore',
|
||||
},
|
||||
export default createDrizzleConfig({
|
||||
dbName: 'manacore',
|
||||
schemaFilter: ['auth', 'credits', 'referrals', 'public'],
|
||||
verbose: true,
|
||||
strict: true,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,11 +1,9 @@
|
|||
import { defineConfig } from 'drizzle-kit';
|
||||
import { createDrizzleConfig } from '@manacore/shared-drizzle-config';
|
||||
|
||||
export default defineConfig({
|
||||
schema: './src/database/schema.ts',
|
||||
out: './drizzle',
|
||||
dialect: 'postgresql',
|
||||
dbCredentials: {
|
||||
url:
|
||||
process.env.DATABASE_URL || 'postgresql://manacore:devpassword@localhost:5432/nutriphi_bot',
|
||||
},
|
||||
export default createDrizzleConfig({
|
||||
dbName: 'nutriphi_bot',
|
||||
schemaPath: './src/database/schema.ts',
|
||||
outDir: './drizzle',
|
||||
verbose: false,
|
||||
strict: false,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
import { defineConfig } from 'drizzle-kit';
|
||||
import { createDrizzleConfig } from '@manacore/shared-drizzle-config';
|
||||
|
||||
export default defineConfig({
|
||||
schema: './src/database/schema.ts',
|
||||
out: './drizzle',
|
||||
dialect: 'postgresql',
|
||||
dbCredentials: {
|
||||
url: process.env.DATABASE_URL || 'postgresql://manacore:devpassword@localhost:5432/todo_bot',
|
||||
},
|
||||
export default createDrizzleConfig({
|
||||
dbName: 'todo_bot',
|
||||
schemaPath: './src/database/schema.ts',
|
||||
outDir: './drizzle',
|
||||
verbose: false,
|
||||
strict: false,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
import { defineConfig } from 'drizzle-kit';
|
||||
import { createDrizzleConfig } from '@manacore/shared-drizzle-config';
|
||||
|
||||
export default defineConfig({
|
||||
schema: './src/database/schema.ts',
|
||||
out: './drizzle',
|
||||
dialect: 'postgresql',
|
||||
dbCredentials: {
|
||||
url: process.env.DATABASE_URL || 'postgresql://manacore:devpassword@localhost:5432/zitare_bot',
|
||||
},
|
||||
export default createDrizzleConfig({
|
||||
dbName: 'zitare_bot',
|
||||
schemaPath: './src/database/schema.ts',
|
||||
outDir: './drizzle',
|
||||
verbose: false,
|
||||
strict: false,
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue