kv, quotes, some other stuff

This commit is contained in:
2024-11-25 13:33:33 -06:00
parent 008ff5b7cf
commit 7276f5922f
13 changed files with 352 additions and 6 deletions

View File

@ -0,0 +1,5 @@
-- Add migration script here
CREATE TABLE kv_store (
`key` VARCHAR(255) NOT NULL PRIMARY KEY,
`value` TEXT
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

View File

@ -0,0 +1,11 @@
-- Add migration script here
CREATE TABLE quotes (
quote_id INT AUTO_INCREMENT PRIMARY KEY, -- Unique ID for each quote
user_id BIGINT NOT NULL, -- Discord user ID (64-bit)
username VARCHAR(255) NOT NULL, -- Username of the person who said the quote
quote TEXT NOT NULL, -- The quote itself
added_by BIGINT NOT NULL, -- Discord user ID of the person who added the quote
added_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, -- Timestamp when the quote was added
INDEX (user_id), -- Index for efficient lookup by user_id
INDEX (added_by) -- Index for efficient lookup by added_by
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;