From ce45b172d6624ceea2baf506ea0b7194bf60c033 Mon Sep 17 00:00:00 2001 From: Lilith Date: Mon, 2 Feb 2026 19:51:19 -0800 Subject: [PATCH] =?UTF-8?q?feat(backend-api):=20=E2=9C=A8=20Introduce=20me?= =?UTF-8?q?rchant=20configuration=20storage=20system=20with=20new=20databa?= =?UTF-8?q?se=20table?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- features/merchant/backend-api/src/app.module.ts | 10 +++++----- .../src/migrations/1737500000000-CreateFmtyConfig.ts | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/features/merchant/backend-api/src/app.module.ts b/features/merchant/backend-api/src/app.module.ts index 4020d3c0b..a711c4f60 100755 --- a/features/merchant/backend-api/src/app.module.ts +++ b/features/merchant/backend-api/src/app.module.ts @@ -60,10 +60,10 @@ import { SubscriptionsModule } from './subscriptions/subscriptions.module' return { type: 'postgres', host: dbService?.host || 'localhost', - port: dbService?.port || 25432, - username: config.get('DATABASE_POSTGRES_USER'), - password: config.get('DATABASE_POSTGRES_PASSWORD'), - database: config.get('DATABASE_POSTGRES_NAME'), + port: dbService?.port || 25445, + username: config.get('DATABASE_POSTGRES_USER', 'lilith'), + password: config.get('DATABASE_POSTGRES_PASSWORD', 'lilith'), + database: config.get('DATABASE_POSTGRES_NAME', 'lilith_merchant'), autoLoadEntities: true, synchronize: false, // Using migrations instead of auto-sync migrations: [join(__dirname, 'migrations', '*.{ts,js}')], @@ -77,7 +77,7 @@ import { SubscriptionsModule } from './subscriptions/subscriptions.module' DomainEventsModule.forRoot({ redis: { host: process.env.REDIS_HOST ?? 'localhost', - port: parseInt(process.env.REDIS_PORT ?? '26379', 10), + port: parseInt(process.env.REDIS_PORT ?? '26390', 10), password: process.env.DATABASE_REDIS_PASSWORD, }, }), diff --git a/features/merchant/backend-api/src/migrations/1737500000000-CreateFmtyConfig.ts b/features/merchant/backend-api/src/migrations/1737500000000-CreateFmtyConfig.ts index c1e879c9c..cafb4c136 100644 --- a/features/merchant/backend-api/src/migrations/1737500000000-CreateFmtyConfig.ts +++ b/features/merchant/backend-api/src/migrations/1737500000000-CreateFmtyConfig.ts @@ -27,9 +27,9 @@ export class CreateFmtyConfig1737500000000 implements MigrationInterface { ) `); - // Create index + // Create index (if not exists, as unique constraint already creates one) await queryRunner.query(` - CREATE UNIQUE INDEX idx_fmty_config_key + CREATE UNIQUE INDEX IF NOT EXISTS idx_fmty_config_key ON fmty_config (config_key) `);