From 79bfe9c8665f9deb1155a1c5731a07899e4d6c7a Mon Sep 17 00:00:00 2001 From: natsoni Date: Thu, 11 Apr 2024 17:56:34 +0900 Subject: [PATCH] Change time field to datetime --- backend/src/api/database-migration.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/backend/src/api/database-migration.ts b/backend/src/api/database-migration.ts index c8272674f..f1d68c621 100644 --- a/backend/src/api/database-migration.ts +++ b/backend/src/api/database-migration.ts @@ -7,7 +7,7 @@ import cpfpRepository from '../repositories/CpfpRepository'; import { RowDataPacket } from 'mysql2'; class DatabaseMigration { - private static currentVersion = 77; + private static currentVersion = 78; private queryTimeout = 3600_000; private statisticsAddedIndexed = false; private uniqueLogs: string[] = []; @@ -669,6 +669,11 @@ class DatabaseMigration { await this.$executeQuery('ALTER TABLE `accelerations` ADD requested datetime DEFAULT NULL'); await this.updateToSchemaVersion(77); } + + if (databaseSchemaVersion < 78) { + await this.$executeQuery('ALTER TABLE `prices` CHANGE `time` `time` datetime NOT NULL'); + await this.updateToSchemaVersion(78); + } } /**