diff options
| author | 2025-10-23 01:15:26 +0700 | |
|---|---|---|
| committer | 2025-10-23 01:15:26 +0700 | |
| commit | 0d261d2f7d080b610f50102576073e334a89e8cb (patch) | |
| tree | 3f86877a48cdb02486d6b5cb771a420c82c7eacf /migrations/2_create_subscription_tables.up.sql | |
| parent | 695889f42896c1e3f1290a588ac1c5483d0124f0 (diff) | |
| download | web-0d261d2f7d080b610f50102576073e334a89e8cb.tar.gz web-0d261d2f7d080b610f50102576073e334a89e8cb.zip | |
feat: email linking
Diffstat (limited to 'migrations/2_create_subscription_tables.up.sql')
| -rw-r--r-- | migrations/2_create_subscription_tables.up.sql | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/migrations/2_create_subscription_tables.up.sql b/migrations/2_create_subscription_tables.up.sql new file mode 100644 index 0000000..e6e905a --- /dev/null +++ b/migrations/2_create_subscription_tables.up.sql @@ -0,0 +1,18 @@ +CREATE TABLE IF NOT EXISTS user_email_table ( + user_id VARCHAR(32) NOT NULL PRIMARY KEY, + email VARCHAR(64) NOT NULL, + lang VARCHAR(2) NOT NULL +) WITHOUT ROWID; + +CREATE UNIQUE INDEX user_email_table_email_uindex +ON user_email_table(email); + +CREATE TABLE IF NOT EXISTS subscription_user_to_tags_table ( + user_id VARCHAR(32) NOT NULL PRIMARY KEY, + tags TEXT NOT NULL +) WITHOUT ROWID; + +CREATE TABLE IF NOT EXISTS subscription_tag_to_users_table ( + tag VARCHAR(32) NOT NULL PRIMARY KEY, + user_ids TEXT NOT NULL +) WITHOUT ROWID; |