From e3c47ce5b10fed857f63ea82c764514557d071f4 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sat, 11 Mar 2023 02:25:21 +0100 Subject: [PATCH] Fixed mysql scripts #246 --- kdb-bot/src/bot/config | 2 +- .../src/bot_data/migration/db_history_scripts/api_keys.sql | 4 ++-- .../migration/db_history_scripts/auth_user_users_relation.sql | 4 ++-- .../src/bot_data/migration/db_history_scripts/auth_users.sql | 4 ++-- .../bot_data/migration/db_history_scripts/auto_role_rules.sql | 4 ++-- .../src/bot_data/migration/db_history_scripts/auto_roles.sql | 4 ++-- kdb-bot/src/bot_data/migration/db_history_scripts/clients.sql | 4 ++-- .../bot_data/migration/db_history_scripts/game_servers.sql | 4 ++-- .../src/bot_data/migration/db_history_scripts/known_users.sql | 4 ++-- kdb-bot/src/bot_data/migration/db_history_scripts/levels.sql | 4 ++-- kdb-bot/src/bot_data/migration/db_history_scripts/servers.sql | 4 ++-- .../migration/db_history_scripts/user_game_idents.sql | 4 ++-- .../migration/db_history_scripts/user_joined_game_servers.sql | 4 ++-- .../migration/db_history_scripts/user_joined_servers.sql | 4 ++-- .../db_history_scripts/user_joined_voice_channel.sql | 4 ++-- .../db_history_scripts/user_message_count_per_hour.sql | 4 ++-- .../bot_data/migration/db_history_scripts/user_warnings.sql | 4 ++-- kdb-bot/src/bot_data/migration/db_history_scripts/users.sql | 4 ++-- 18 files changed, 35 insertions(+), 35 deletions(-) diff --git a/kdb-bot/src/bot/config b/kdb-bot/src/bot/config index 781aa3f6..0bd4bb02 160000 --- a/kdb-bot/src/bot/config +++ b/kdb-bot/src/bot/config @@ -1 +1 @@ -Subproject commit 781aa3f6ab861343d1635005ec7dc1814065b3c7 +Subproject commit 0bd4bb020b1a058e0a1fa9d4ffa1d4a3bffb28b8 diff --git a/kdb-bot/src/bot_data/migration/db_history_scripts/api_keys.sql b/kdb-bot/src/bot_data/migration/db_history_scripts/api_keys.sql index aba10321..fa994bd6 100644 --- a/kdb-bot/src/bot_data/migration/db_history_scripts/api_keys.sql +++ b/kdb-bot/src/bot_data/migration/db_history_scripts/api_keys.sql @@ -2,10 +2,10 @@ ALTER TABLE `ApiKeys` MODIFY `LastModifiedAt` DATETIME(6) NULL ON UPDATE CURRENT_TIMESTAMP(6); ALTER TABLE `ApiKeys` - ALTER COLUMN `CreatedAt` SET DEFAULT CURRENT_TIMESTAMP(6); + MODIFY `CreatedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); ALTER TABLE `ApiKeys` - ALTER COLUMN `LastModifiedAt` SET DEFAULT CURRENT_TIMESTAMP(6); + MODIFY `LastModifiedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); CREATE TABLE IF NOT EXISTS `ApiKeysHistory` ( diff --git a/kdb-bot/src/bot_data/migration/db_history_scripts/auth_user_users_relation.sql b/kdb-bot/src/bot_data/migration/db_history_scripts/auth_user_users_relation.sql index 960e180b..de43759a 100644 --- a/kdb-bot/src/bot_data/migration/db_history_scripts/auth_user_users_relation.sql +++ b/kdb-bot/src/bot_data/migration/db_history_scripts/auth_user_users_relation.sql @@ -2,10 +2,10 @@ ALTER TABLE `AuthUserUsersRelations` MODIFY `LastModifiedAt` DATETIME(6) NULL ON UPDATE CURRENT_TIMESTAMP(6); ALTER TABLE `AuthUserUsersRelations` - ALTER COLUMN `CreatedAt` SET DEFAULT CURRENT_TIMESTAMP(6); + MODIFY `CreatedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); ALTER TABLE `AuthUserUsersRelations` - ALTER COLUMN `LastModifiedAt` SET DEFAULT CURRENT_TIMESTAMP(6); + MODIFY `LastModifiedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); CREATE TABLE IF NOT EXISTS `AuthUserUsersRelationsHistory` diff --git a/kdb-bot/src/bot_data/migration/db_history_scripts/auth_users.sql b/kdb-bot/src/bot_data/migration/db_history_scripts/auth_users.sql index e71467b4..91a630a8 100644 --- a/kdb-bot/src/bot_data/migration/db_history_scripts/auth_users.sql +++ b/kdb-bot/src/bot_data/migration/db_history_scripts/auth_users.sql @@ -2,10 +2,10 @@ ALTER TABLE `AuthUsers` MODIFY `LastModifiedAt` DATETIME(6) NULL ON UPDATE CURRENT_TIMESTAMP(6); ALTER TABLE `AuthUsers` - ALTER COLUMN `CreatedAt` SET DEFAULT CURRENT_TIMESTAMP(6); + MODIFY `CreatedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); ALTER TABLE `AuthUsers` - ALTER COLUMN `LastModifiedAt` SET DEFAULT CURRENT_TIMESTAMP(6); + MODIFY `LastModifiedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); CREATE TABLE IF NOT EXISTS `AuthUsersHistory` ( diff --git a/kdb-bot/src/bot_data/migration/db_history_scripts/auto_role_rules.sql b/kdb-bot/src/bot_data/migration/db_history_scripts/auto_role_rules.sql index 44391f7a..8f65437d 100644 --- a/kdb-bot/src/bot_data/migration/db_history_scripts/auto_role_rules.sql +++ b/kdb-bot/src/bot_data/migration/db_history_scripts/auto_role_rules.sql @@ -2,10 +2,10 @@ ALTER TABLE `AutoRoleRules` MODIFY `LastModifiedAt` DATETIME(6) NULL ON UPDATE CURRENT_TIMESTAMP(6); ALTER TABLE `AutoRoleRules` - ALTER COLUMN `CreatedAt` SET DEFAULT CURRENT_TIMESTAMP(6); + MODIFY `CreatedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); ALTER TABLE `AutoRoleRules` - ALTER COLUMN `LastModifiedAt` SET DEFAULT CURRENT_TIMESTAMP(6); + MODIFY `LastModifiedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); CREATE TABLE IF NOT EXISTS `AutoRoleRulesHistory` ( diff --git a/kdb-bot/src/bot_data/migration/db_history_scripts/auto_roles.sql b/kdb-bot/src/bot_data/migration/db_history_scripts/auto_roles.sql index 5f1da4b9..2c474c85 100644 --- a/kdb-bot/src/bot_data/migration/db_history_scripts/auto_roles.sql +++ b/kdb-bot/src/bot_data/migration/db_history_scripts/auto_roles.sql @@ -2,10 +2,10 @@ ALTER TABLE `AutoRoles` MODIFY `LastModifiedAt` DATETIME(6) NULL ON UPDATE CURRENT_TIMESTAMP(6); ALTER TABLE `AutoRoles` - ALTER COLUMN `CreatedAt` SET DEFAULT CURRENT_TIMESTAMP(6); + MODIFY `CreatedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); ALTER TABLE `AutoRoles` - ALTER COLUMN `LastModifiedAt` SET DEFAULT CURRENT_TIMESTAMP(6); + MODIFY `LastModifiedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); CREATE TABLE IF NOT EXISTS `AutoRolesHistory` ( diff --git a/kdb-bot/src/bot_data/migration/db_history_scripts/clients.sql b/kdb-bot/src/bot_data/migration/db_history_scripts/clients.sql index 557b69e2..7dc991a8 100644 --- a/kdb-bot/src/bot_data/migration/db_history_scripts/clients.sql +++ b/kdb-bot/src/bot_data/migration/db_history_scripts/clients.sql @@ -2,10 +2,10 @@ ALTER TABLE `Clients` MODIFY `LastModifiedAt` DATETIME(6) NULL ON UPDATE CURRENT_TIMESTAMP(6); ALTER TABLE `Clients` - ALTER COLUMN `CreatedAt` SET DEFAULT CURRENT_TIMESTAMP(6); + MODIFY `CreatedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); ALTER TABLE `Clients` - ALTER COLUMN `LastModifiedAt` SET DEFAULT CURRENT_TIMESTAMP(6); + MODIFY `LastModifiedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); CREATE TABLE IF NOT EXISTS `ClientsHistory` ( diff --git a/kdb-bot/src/bot_data/migration/db_history_scripts/game_servers.sql b/kdb-bot/src/bot_data/migration/db_history_scripts/game_servers.sql index cf497541..f17c27e9 100644 --- a/kdb-bot/src/bot_data/migration/db_history_scripts/game_servers.sql +++ b/kdb-bot/src/bot_data/migration/db_history_scripts/game_servers.sql @@ -2,10 +2,10 @@ ALTER TABLE `GameServers` MODIFY `LastModifiedAt` DATETIME(6) NULL ON UPDATE CURRENT_TIMESTAMP(6); ALTER TABLE `GameServers` - ALTER COLUMN `CreatedAt` SET DEFAULT CURRENT_TIMESTAMP(6); + MODIFY `CreatedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); ALTER TABLE `GameServers` - ALTER COLUMN `LastModifiedAt` SET DEFAULT CURRENT_TIMESTAMP(6); + MODIFY `LastModifiedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); CREATE TABLE IF NOT EXISTS `GameServersHistory` ( diff --git a/kdb-bot/src/bot_data/migration/db_history_scripts/known_users.sql b/kdb-bot/src/bot_data/migration/db_history_scripts/known_users.sql index 9b2b2eca..ff3bdc0d 100644 --- a/kdb-bot/src/bot_data/migration/db_history_scripts/known_users.sql +++ b/kdb-bot/src/bot_data/migration/db_history_scripts/known_users.sql @@ -2,10 +2,10 @@ ALTER TABLE `KnownUsers` MODIFY `LastModifiedAt` DATETIME(6) NULL ON UPDATE CURRENT_TIMESTAMP(6); ALTER TABLE `KnownUsers` - ALTER COLUMN `CreatedAt` SET DEFAULT CURRENT_TIMESTAMP(6); + MODIFY `CreatedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); ALTER TABLE `KnownUsers` - ALTER COLUMN `LastModifiedAt` SET DEFAULT CURRENT_TIMESTAMP(6); + MODIFY `LastModifiedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); CREATE TABLE IF NOT EXISTS `KnownUsersHistory` ( diff --git a/kdb-bot/src/bot_data/migration/db_history_scripts/levels.sql b/kdb-bot/src/bot_data/migration/db_history_scripts/levels.sql index ce2daf70..76bb0dba 100644 --- a/kdb-bot/src/bot_data/migration/db_history_scripts/levels.sql +++ b/kdb-bot/src/bot_data/migration/db_history_scripts/levels.sql @@ -2,10 +2,10 @@ ALTER TABLE `Levels` MODIFY `LastModifiedAt` DATETIME(6) NULL ON UPDATE CURRENT_TIMESTAMP(6); ALTER TABLE `Levels` - ALTER COLUMN `CreatedAt` SET DEFAULT CURRENT_TIMESTAMP(6); + MODIFY `CreatedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); ALTER TABLE `Levels` - ALTER COLUMN `LastModifiedAt` SET DEFAULT CURRENT_TIMESTAMP(6); + MODIFY `LastModifiedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); CREATE TABLE IF NOT EXISTS `LevelsHistory` ( diff --git a/kdb-bot/src/bot_data/migration/db_history_scripts/servers.sql b/kdb-bot/src/bot_data/migration/db_history_scripts/servers.sql index f88f0b64..7af3213f 100644 --- a/kdb-bot/src/bot_data/migration/db_history_scripts/servers.sql +++ b/kdb-bot/src/bot_data/migration/db_history_scripts/servers.sql @@ -2,10 +2,10 @@ ALTER TABLE `Servers` MODIFY `LastModifiedAt` DATETIME(6) NULL ON UPDATE CURRENT_TIMESTAMP(6); ALTER TABLE `Servers` - ALTER COLUMN `CreatedAt` SET DEFAULT CURRENT_TIMESTAMP(6); + MODIFY `CreatedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); ALTER TABLE `Servers` - ALTER COLUMN `LastModifiedAt` SET DEFAULT CURRENT_TIMESTAMP(6); + MODIFY `LastModifiedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); CREATE TABLE IF NOT EXISTS `ServersHistory` ( diff --git a/kdb-bot/src/bot_data/migration/db_history_scripts/user_game_idents.sql b/kdb-bot/src/bot_data/migration/db_history_scripts/user_game_idents.sql index 4d8c6135..954b5639 100644 --- a/kdb-bot/src/bot_data/migration/db_history_scripts/user_game_idents.sql +++ b/kdb-bot/src/bot_data/migration/db_history_scripts/user_game_idents.sql @@ -2,10 +2,10 @@ ALTER TABLE `UserGameIdents` MODIFY `LastModifiedAt` DATETIME(6) NULL ON UPDATE CURRENT_TIMESTAMP(6); ALTER TABLE `UserGameIdents` - ALTER COLUMN `CreatedAt` SET DEFAULT CURRENT_TIMESTAMP(6); + MODIFY `CreatedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); ALTER TABLE `UserGameIdents` - ALTER COLUMN `LastModifiedAt` SET DEFAULT CURRENT_TIMESTAMP(6); + MODIFY `LastModifiedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); CREATE TABLE IF NOT EXISTS `UserGameIdentsHistory` ( diff --git a/kdb-bot/src/bot_data/migration/db_history_scripts/user_joined_game_servers.sql b/kdb-bot/src/bot_data/migration/db_history_scripts/user_joined_game_servers.sql index 3e6c37ff..62903de4 100644 --- a/kdb-bot/src/bot_data/migration/db_history_scripts/user_joined_game_servers.sql +++ b/kdb-bot/src/bot_data/migration/db_history_scripts/user_joined_game_servers.sql @@ -2,10 +2,10 @@ ALTER TABLE `UserJoinedGameServer` MODIFY `LastModifiedAt` DATETIME(6) NULL ON UPDATE CURRENT_TIMESTAMP(6); ALTER TABLE `UserJoinedGameServer` - ALTER COLUMN `CreatedAt` SET DEFAULT CURRENT_TIMESTAMP(6); + MODIFY `CreatedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); ALTER TABLE `UserJoinedGameServer` - ALTER COLUMN `LastModifiedAt` SET DEFAULT CURRENT_TIMESTAMP(6); + MODIFY `LastModifiedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); CREATE TABLE IF NOT EXISTS `UserJoinedGameServerHistory` ( diff --git a/kdb-bot/src/bot_data/migration/db_history_scripts/user_joined_servers.sql b/kdb-bot/src/bot_data/migration/db_history_scripts/user_joined_servers.sql index 5dc199c1..1defe565 100644 --- a/kdb-bot/src/bot_data/migration/db_history_scripts/user_joined_servers.sql +++ b/kdb-bot/src/bot_data/migration/db_history_scripts/user_joined_servers.sql @@ -2,10 +2,10 @@ ALTER TABLE `UserJoinedServers` MODIFY `LastModifiedAt` DATETIME(6) NULL ON UPDATE CURRENT_TIMESTAMP(6); ALTER TABLE `UserJoinedServers` - ALTER COLUMN `CreatedAt` SET DEFAULT CURRENT_TIMESTAMP(6); + MODIFY `CreatedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); ALTER TABLE `UserJoinedServers` - ALTER COLUMN `LastModifiedAt` SET DEFAULT CURRENT_TIMESTAMP(6); + MODIFY `LastModifiedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); CREATE TABLE IF NOT EXISTS `UserJoinedServersHistory` ( diff --git a/kdb-bot/src/bot_data/migration/db_history_scripts/user_joined_voice_channel.sql b/kdb-bot/src/bot_data/migration/db_history_scripts/user_joined_voice_channel.sql index 019c5b02..e6095e35 100644 --- a/kdb-bot/src/bot_data/migration/db_history_scripts/user_joined_voice_channel.sql +++ b/kdb-bot/src/bot_data/migration/db_history_scripts/user_joined_voice_channel.sql @@ -2,10 +2,10 @@ ALTER TABLE `UserJoinedVoiceChannel` MODIFY `LastModifiedAt` DATETIME(6) NULL ON UPDATE CURRENT_TIMESTAMP(6); ALTER TABLE `UserJoinedVoiceChannel` - ALTER COLUMN `CreatedAt` SET DEFAULT CURRENT_TIMESTAMP(6); + MODIFY `CreatedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); ALTER TABLE `UserJoinedVoiceChannel` - ALTER COLUMN `LastModifiedAt` SET DEFAULT CURRENT_TIMESTAMP(6); + MODIFY `LastModifiedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); CREATE TABLE IF NOT EXISTS `UserJoinedVoiceChannelHistory` ( diff --git a/kdb-bot/src/bot_data/migration/db_history_scripts/user_message_count_per_hour.sql b/kdb-bot/src/bot_data/migration/db_history_scripts/user_message_count_per_hour.sql index 14e8ec6d..93b541f9 100644 --- a/kdb-bot/src/bot_data/migration/db_history_scripts/user_message_count_per_hour.sql +++ b/kdb-bot/src/bot_data/migration/db_history_scripts/user_message_count_per_hour.sql @@ -2,10 +2,10 @@ ALTER TABLE `UserMessageCountPerHour` MODIFY `LastModifiedAt` DATETIME(6) NULL ON UPDATE CURRENT_TIMESTAMP(6); ALTER TABLE `UserMessageCountPerHour` - ALTER COLUMN `CreatedAt` SET DEFAULT CURRENT_TIMESTAMP(6); + MODIFY `CreatedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); ALTER TABLE `UserMessageCountPerHour` - ALTER COLUMN `LastModifiedAt` SET DEFAULT CURRENT_TIMESTAMP(6); + MODIFY `LastModifiedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); CREATE TABLE IF NOT EXISTS `UserMessageCountPerHourHistory` ( diff --git a/kdb-bot/src/bot_data/migration/db_history_scripts/user_warnings.sql b/kdb-bot/src/bot_data/migration/db_history_scripts/user_warnings.sql index 41a61027..497ce7f1 100644 --- a/kdb-bot/src/bot_data/migration/db_history_scripts/user_warnings.sql +++ b/kdb-bot/src/bot_data/migration/db_history_scripts/user_warnings.sql @@ -2,10 +2,10 @@ ALTER TABLE `UserWarnings` MODIFY `LastModifiedAt` DATETIME(6) NULL ON UPDATE CURRENT_TIMESTAMP(6); ALTER TABLE `UserWarnings` - ALTER COLUMN `CreatedAt` SET DEFAULT CURRENT_TIMESTAMP(6); + MODIFY `CreatedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); ALTER TABLE `UserWarnings` - ALTER COLUMN `LastModifiedAt` SET DEFAULT CURRENT_TIMESTAMP(6); + MODIFY `LastModifiedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); CREATE TABLE IF NOT EXISTS `UserWarningsHistory` ( diff --git a/kdb-bot/src/bot_data/migration/db_history_scripts/users.sql b/kdb-bot/src/bot_data/migration/db_history_scripts/users.sql index e4336b25..9695faba 100644 --- a/kdb-bot/src/bot_data/migration/db_history_scripts/users.sql +++ b/kdb-bot/src/bot_data/migration/db_history_scripts/users.sql @@ -2,10 +2,10 @@ ALTER TABLE `Users` MODIFY `LastModifiedAt` DATETIME(6) NULL ON UPDATE CURRENT_TIMESTAMP(6); ALTER TABLE `Users` - ALTER COLUMN `CreatedAt` SET DEFAULT CURRENT_TIMESTAMP(6); + MODIFY `CreatedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); ALTER TABLE `Users` - ALTER COLUMN `LastModifiedAt` SET DEFAULT CURRENT_TIMESTAMP(6); + MODIFY `LastModifiedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); CREATE TABLE IF NOT EXISTS `UsersHistory` (