From 96012ce43cb84565809d4d13b8883a0a02322a2d Mon Sep 17 00:00:00 2001 From: jude Date: Wed, 14 Feb 2024 19:32:36 +0000 Subject: [PATCH] Add migration script --- .../20240210133900_macro_restructure.sql | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 migrations/20240210133900_macro_restructure.sql diff --git a/migrations/20240210133900_macro_restructure.sql b/migrations/20240210133900_macro_restructure.sql new file mode 100644 index 0000000..b513b3f --- /dev/null +++ b/migrations/20240210133900_macro_restructure.sql @@ -0,0 +1,40 @@ +CREATE TABLE command_macro ( + id INT UNSIGNED AUTO_INCREMENT, + guild_id INT UNSIGNED NOT NULL, + + name VARCHAR(100) NOT NULL, + description VARCHAR(100), + commands JSON NOT NULL, + + FOREIGN KEY (guild_id) REFERENCES guilds(id) ON DELETE CASCADE, + PRIMARY KEY (id) +); + +# New JSON structure is {command_name: "Remind", "