memos/store/sqlite/migration/prod/0.4/00__user_setting.sql
Athurg Gooth 5121e9f954
chore: move migration and seed code into driver (#2294)
Move migration and seed code into driver
2023-09-27 11:56:20 +08:00

9 lines
No EOL
262 B
SQL

-- user_setting
CREATE TABLE user_setting (
user_id INTEGER NOT NULL,
key TEXT NOT NULL,
value TEXT NOT NULL,
FOREIGN KEY(user_id) REFERENCES user(id) ON DELETE CASCADE
);
CREATE UNIQUE INDEX user_setting_key_user_id_index ON user_setting(key, user_id);