feat(backend-api): ✨ Introduce merchant configuration storage system with new database table
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
a8c6a923fd
commit
ce45b172d6
2 changed files with 7 additions and 7 deletions
|
|
@ -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,
|
||||
},
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
`);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue