diff --git a/migrations/20240210133900_macro_restructure.sql b/migrations/20240210133900_macro_restructure.sql new file mode 100644 index 0000000..dd8d5b2 --- /dev/null +++ b/migrations/20240210133900_macro_restructure.sql @@ -0,0 +1,53 @@ +-- Add migration script here +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", "