From bc8d204a71fcc6780fd0aa505c6d32796b4ce63c Mon Sep 17 00:00:00 2001 From: EliasSchriefer Date: Tue, 27 Jul 2021 19:09:01 +0000 Subject: [PATCH] Change `id` type in SQL to `TEXT` --- src/sqlite/external_servers_preferences.sql | 2 +- src/sqlite/external_servers_privacy_preferences.sql | 2 +- src/sqlite/notification_preferences.sql | 2 +- src/sqlite/privacy_preferences.sql | 2 +- src/sqlite/security_preferences.sql | 2 +- src/sqlite/users.sql | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/sqlite/external_servers_preferences.sql b/src/sqlite/external_servers_preferences.sql index 00b72e4..2daae2e 100644 --- a/src/sqlite/external_servers_preferences.sql +++ b/src/sqlite/external_servers_preferences.sql @@ -1,7 +1,7 @@ -- external_servers_preferences definition CREATE TABLE external_servers_preferences ( - id BLOB NOT NULL PRIMARY KEY, + id TEXT NOT NULL PRIMARY KEY, external_servers BLOB NOT NULL, external_servers_limit TEXT NOT NULL, CONSTRAINT external_servers_preferences_FK FOREIGN KEY (id) REFERENCES users(id) ON DELETE CASCADE ON UPDATE CASCADE diff --git a/src/sqlite/external_servers_privacy_preferences.sql b/src/sqlite/external_servers_privacy_preferences.sql index 43c530c..f0711f5 100644 --- a/src/sqlite/external_servers_privacy_preferences.sql +++ b/src/sqlite/external_servers_privacy_preferences.sql @@ -1,7 +1,7 @@ -- external_servers_privacy_preferences definition CREATE TABLE external_servers_privacy_preferences ( - id BLOB NOT NULL PRIMARY KEY, + id TEXT NOT NULL PRIMARY KEY, discovery BLOB NOT NULL, discovery_user_limit TEXT NOT NULL, discovery_server_limit TEXT NOT NULL, diff --git a/src/sqlite/notification_preferences.sql b/src/sqlite/notification_preferences.sql index 953f50c..6056365 100644 --- a/src/sqlite/notification_preferences.sql +++ b/src/sqlite/notification_preferences.sql @@ -1,7 +1,7 @@ -- notification_preferences definition CREATE TABLE notification_preferences ( - id BLOB NOT NULL PRIMARY KEY, + id TEXT NOT NULL PRIMARY KEY, lock_details BOOLEAN DEFAULT 0 NOT NULL CHECK (lock_details IN (0, 1)), do_not_disturb BOOLEAN DEFAULT 0 NOT NULL CHECK (do_not_disturb IN (0, 1)), CONSTRAINT notification_preferences_FK FOREIGN KEY (id) REFERENCES users(id) ON DELETE CASCADE ON UPDATE CASCADE diff --git a/src/sqlite/privacy_preferences.sql b/src/sqlite/privacy_preferences.sql index 445bf03..b2ccdf5 100644 --- a/src/sqlite/privacy_preferences.sql +++ b/src/sqlite/privacy_preferences.sql @@ -1,7 +1,7 @@ -- privacy_preferences definition CREATE TABLE privacy_preferences ( - id BLOB NOT NULL PRIMARY KEY, + id TEXT NOT NULL PRIMARY KEY, discovery BLOB NOT NULL, discovery_user_limit TEXT NOT NULL, discovery_server_limit TEXT NOT NULL, diff --git a/src/sqlite/security_preferences.sql b/src/sqlite/security_preferences.sql index 50ce979..fd081a8 100644 --- a/src/sqlite/security_preferences.sql +++ b/src/sqlite/security_preferences.sql @@ -1,7 +1,7 @@ -- security_preferences definition CREATE TABLE "security_preferences" ( - id BLOB NOT NULL PRIMARY KEY, + id TEXT NOT NULL PRIMARY KEY, account_tokens TEXT NOT NULL, password_hash TEXT NOT NULL, CONSTRAINT NewTable_FK FOREIGN KEY (id) REFERENCES users(id) ON DELETE CASCADE ON UPDATE CASCADE diff --git a/src/sqlite/users.sql b/src/sqlite/users.sql index 66500e7..468c0ac 100644 --- a/src/sqlite/users.sql +++ b/src/sqlite/users.sql @@ -1,7 +1,7 @@ -- users definition CREATE TABLE users ( - id BLOB NOT NULL PRIMARY KEY, + id TEXT NOT NULL PRIMARY KEY, user_name TEXT NOT NULL, display_name TEXT, activated BOOLEAN DEFAULT 0 NOT NULL CHECK (activated IN (0, 1)),