CCBからDBの向き先を変更

This commit is contained in:
makabe 2024-04-19 13:38:24 +09:00
parent b03cda3ccc
commit b7554e30ff
2 changed files with 6 additions and 6 deletions

View File

@ -22,7 +22,7 @@ export async function initializeDataSource(
port: Number(process.env.DB_PORT), port: Number(process.env.DB_PORT),
username: process.env.DB_USERNAME, username: process.env.DB_USERNAME,
password: process.env.DB_PASSWORD, password: process.env.DB_PASSWORD,
database: process.env.DB_NAME_CCB, database: process.env.DB_NAME,
entities: [ entities: [
User, User,
UserArchive, UserArchive,

View File

@ -60,10 +60,10 @@ import { CheckHeaderMiddleware } from './common/check-header.middleware';
useFactory: () => useFactory: () =>
process.env.STAGE === 'local' process.env.STAGE === 'local'
? [ ? [
{ {
rootPath: join(__dirname, '..', 'build'), rootPath: join(__dirname, '..', 'build'),
}, },
] ]
: [], : [],
}), }),
ConfigModule.forRoot({ ConfigModule.forRoot({
@ -100,7 +100,7 @@ import { CheckHeaderMiddleware } from './common/check-header.middleware';
port: configService.get('DB_PORT'), port: configService.get('DB_PORT'),
username: configService.get('DB_USERNAME'), username: configService.get('DB_USERNAME'),
password: configService.get('DB_PASSWORD'), password: configService.get('DB_PASSWORD'),
database: configService.get('DB_NAME_CCB'), database: configService.get('DB_NAME'),
autoLoadEntities: true, // forFeature()で登録されたEntityを自動的にロード autoLoadEntities: true, // forFeature()で登録されたEntityを自動的にロード
synchronize: false, // trueにすると自動的にmigrationが行われるため注意 synchronize: false, // trueにすると自動的にmigrationが行われるため注意
}), }),