11 lines
496 B
SQL
11 lines
496 B
SQL
CREATE TABLE image_uploads (
|
|
id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
|
-- Discord user ID from the authenticated session, including guild-only users.
|
|
uploader BIGINT UNSIGNED NOT NULL,
|
|
url VARCHAR(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL UNIQUE,
|
|
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
orphaned_at DATETIME DEFAULT NULL,
|
|
INDEX image_uploads_uploader (uploader),
|
|
INDEX image_uploads_orphaned_at (orphaned_at)
|
|
);
|