From 148eced9b9c72207a4b8e16589f05af61ff74905 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 | 43 +++++++++++++++++++ 1 file changed, 43 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..99b4cfe --- /dev/null +++ b/migrations/20240210133900_macro_restructure.sql @@ -0,0 +1,43 @@ +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", "