feat(db): schéma MySQL cards et seed
This commit is contained in:
1 parent
0e714f507b
commit
8ec38c158a
2 files changed
+22
No files matched your search
@@ -0,0 +1,11 @@
|
||||
CREATE TABLE IF NOT EXISTS cards (
|
||||
id VARCHAR(36) NOT NULL,
|
||||
question TEXT NOT NULL,
|
||||
response TEXT NOT NULL,
|
||||
theme VARCHAR(50) NOT NULL,
|
||||
tags JSON,
|
||||
createdAt DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
updatedAt DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (id),
|
||||
INDEX idx_cards_theme (theme)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
|
||||
Reference in new issue
Block a user