test: Add playwright main usage test
Some checks failed
Deploy Web Apps / deploy (push) Has been cancelled
Queue Release Build / prepare (push) Successful in 21s
Queue Release Build / build-linux (push) Successful in 27m44s
Queue Release Build / build-windows (push) Successful in 32m16s
Queue Release Build / finalize (push) Successful in 1m54s
Some checks failed
Deploy Web Apps / deploy (push) Has been cancelled
Queue Release Build / prepare (push) Successful in 21s
Queue Release Build / build-linux (push) Successful in 27m44s
Queue Release Build / build-windows (push) Successful in 32m16s
Queue Release Build / finalize (push) Successful in 1m54s
This commit is contained in:
@@ -70,7 +70,7 @@ export async function initDatabase(): Promise<void> {
|
||||
ServerBanEntity
|
||||
],
|
||||
migrations: serverMigrations,
|
||||
synchronize: false,
|
||||
synchronize: process.env.DB_SYNCHRONIZE === 'true',
|
||||
logging: false,
|
||||
autoSave: true,
|
||||
location: DB_FILE,
|
||||
@@ -90,8 +90,12 @@ export async function initDatabase(): Promise<void> {
|
||||
|
||||
console.log('[DB] Connection initialised at:', DB_FILE);
|
||||
|
||||
await applicationDataSource.runMigrations();
|
||||
console.log('[DB] Migrations executed');
|
||||
if (process.env.DB_SYNCHRONIZE !== 'true') {
|
||||
await applicationDataSource.runMigrations();
|
||||
console.log('[DB] Migrations executed');
|
||||
} else {
|
||||
console.log('[DB] Synchronize mode — migrations skipped');
|
||||
}
|
||||
}
|
||||
|
||||
export async function destroyDatabase(): Promise<void> {
|
||||
|
||||
Reference in New Issue
Block a user