From ad00dce5d9cf0618c222646d5ac3625fb44b3096 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sat, 11 Mar 2023 03:00:29 +0100 Subject: [PATCH] Fixed mysql scripts #246 --- .../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 ++-- 17 files changed, 34 insertions(+), 34 deletions(-) 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 fa994bd6..a9e687da 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` - MODIFY `CreatedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); + CHANGE `CreatedAt` `CreatedAt` DATETIME(6) NULL DEFAULT CURRENT_TIMESTAMP(6); ALTER TABLE `ApiKeys` - MODIFY `LastModifiedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); + CHANGE `LastModifiedAt` `LastModifiedAt` DATETIME(6) NULL 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 de43759a..a0189b55 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` - MODIFY `CreatedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); + CHANGE `CreatedAt` `CreatedAt` DATETIME(6) NULL DEFAULT CURRENT_TIMESTAMP(6); ALTER TABLE `AuthUserUsersRelations` - MODIFY `LastModifiedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); + CHANGE `LastModifiedAt` `LastModifiedAt` DATETIME(6) NULL 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 91a630a8..511501c4 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` - MODIFY `CreatedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); + CHANGE `CreatedAt` `CreatedAt` DATETIME(6) NULL DEFAULT CURRENT_TIMESTAMP(6); ALTER TABLE `AuthUsers` - MODIFY `LastModifiedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); + CHANGE `LastModifiedAt` `LastModifiedAt` DATETIME(6) NULL 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 8f65437d..20d57001 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` - MODIFY `CreatedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); + CHANGE `CreatedAt` `CreatedAt` DATETIME(6) NULL DEFAULT CURRENT_TIMESTAMP(6); ALTER TABLE `AutoRoleRules` - MODIFY `LastModifiedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); + CHANGE `LastModifiedAt` `LastModifiedAt` DATETIME(6) NULL 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 2c474c85..3201c6a2 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` - MODIFY `CreatedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); + CHANGE `CreatedAt` `CreatedAt` DATETIME(6) NULL DEFAULT CURRENT_TIMESTAMP(6); ALTER TABLE `AutoRoles` - MODIFY `LastModifiedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); + CHANGE `LastModifiedAt` `LastModifiedAt` DATETIME(6) NULL 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 7dc991a8..1cb75dea 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` - MODIFY `CreatedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); + CHANGE `CreatedAt` `CreatedAt` DATETIME(6) NULL DEFAULT CURRENT_TIMESTAMP(6); ALTER TABLE `Clients` - MODIFY `LastModifiedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); + CHANGE `LastModifiedAt` `LastModifiedAt` DATETIME(6) NULL 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 f17c27e9..551313dc 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` - MODIFY `CreatedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); + CHANGE `CreatedAt` `CreatedAt` DATETIME(6) NULL DEFAULT CURRENT_TIMESTAMP(6); ALTER TABLE `GameServers` - MODIFY `LastModifiedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); + CHANGE `LastModifiedAt` `LastModifiedAt` DATETIME(6) NULL 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 ff3bdc0d..61e711d4 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` - MODIFY `CreatedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); + CHANGE `CreatedAt` `CreatedAt` DATETIME(6) NULL DEFAULT CURRENT_TIMESTAMP(6); ALTER TABLE `KnownUsers` - MODIFY `LastModifiedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); + CHANGE `LastModifiedAt` `LastModifiedAt` DATETIME(6) NULL 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 76bb0dba..6effc571 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` - MODIFY `CreatedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); + CHANGE `CreatedAt` `CreatedAt` DATETIME(6) NULL DEFAULT CURRENT_TIMESTAMP(6); ALTER TABLE `Levels` - MODIFY `LastModifiedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); + CHANGE `LastModifiedAt` `LastModifiedAt` DATETIME(6) NULL 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 7af3213f..79187425 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` - MODIFY `CreatedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); + CHANGE `CreatedAt` `CreatedAt` DATETIME(6) NULL DEFAULT CURRENT_TIMESTAMP(6); ALTER TABLE `Servers` - MODIFY `LastModifiedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); + CHANGE `LastModifiedAt` `LastModifiedAt` DATETIME(6) NULL 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 954b5639..551957a7 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` - MODIFY `CreatedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); + CHANGE `CreatedAt` `CreatedAt` DATETIME(6) NULL DEFAULT CURRENT_TIMESTAMP(6); ALTER TABLE `UserGameIdents` - MODIFY `LastModifiedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); + CHANGE `LastModifiedAt` `LastModifiedAt` DATETIME(6) NULL 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 62903de4..0b96242a 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` - MODIFY `CreatedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); + CHANGE `CreatedAt` `CreatedAt` DATETIME(6) NULL DEFAULT CURRENT_TIMESTAMP(6); ALTER TABLE `UserJoinedGameServer` - MODIFY `LastModifiedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); + CHANGE `LastModifiedAt` `LastModifiedAt` DATETIME(6) NULL 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 1defe565..acffda69 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` - MODIFY `CreatedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); + CHANGE `CreatedAt` `CreatedAt` DATETIME(6) NULL DEFAULT CURRENT_TIMESTAMP(6); ALTER TABLE `UserJoinedServers` - MODIFY `LastModifiedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); + CHANGE `LastModifiedAt` `LastModifiedAt` DATETIME(6) NULL 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 e6095e35..7b50a780 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` - MODIFY `CreatedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); + CHANGE `CreatedAt` `CreatedAt` DATETIME(6) NULL DEFAULT CURRENT_TIMESTAMP(6); ALTER TABLE `UserJoinedVoiceChannel` - MODIFY `LastModifiedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); + CHANGE `LastModifiedAt` `LastModifiedAt` DATETIME(6) NULL 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 93b541f9..270ead64 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` - MODIFY `CreatedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); + CHANGE `CreatedAt` `CreatedAt` DATETIME(6) NULL DEFAULT CURRENT_TIMESTAMP(6); ALTER TABLE `UserMessageCountPerHour` - MODIFY `LastModifiedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); + CHANGE `LastModifiedAt` `LastModifiedAt` DATETIME(6) NULL 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 497ce7f1..f2b55905 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` - MODIFY `CreatedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); + CHANGE `CreatedAt` `CreatedAt` DATETIME(6) NULL DEFAULT CURRENT_TIMESTAMP(6); ALTER TABLE `UserWarnings` - MODIFY `LastModifiedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); + CHANGE `LastModifiedAt` `LastModifiedAt` DATETIME(6) NULL 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 9695faba..644f8b4f 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` - MODIFY `CreatedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); + CHANGE `CreatedAt` `CreatedAt` DATETIME(6) NULL DEFAULT CURRENT_TIMESTAMP(6); ALTER TABLE `Users` - MODIFY `LastModifiedAt` DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6); + CHANGE `LastModifiedAt` `LastModifiedAt` DATETIME(6) NULL DEFAULT CURRENT_TIMESTAMP(6); CREATE TABLE IF NOT EXISTS `UsersHistory` (