Change RestrictionPolicy type to INTEGER in SQL

BLOB is not the way, we need something easy.
This commit is contained in:
Elias Schriefer 2021-10-16 21:55:37 +00:00
parent ce99469b3d
commit 114bb63f45
3 changed files with 7 additions and 7 deletions

View File

@ -2,7 +2,7 @@
CREATE TABLE IF NOT EXISTS external_servers_preferences (
id TEXT NOT NULL PRIMARY KEY,
external_servers BLOB NOT NULL,
external_servers INTEGER 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
);

View File

@ -2,14 +2,14 @@
CREATE TABLE IF NOT EXISTS external_servers_privacy_preferences (
id TEXT NOT NULL PRIMARY KEY,
discovery BLOB NOT NULL,
discovery INTEGER NOT NULL,
discovery_user_limit TEXT NOT NULL,
discovery_server_limit TEXT NOT NULL,
last_seen BLOB NOT NULL,
last_seen INTEGER NOT NULL,
last_seen_user_limit TEXT NOT NULL,
last_seen_server_limit TEXT NOT NULL,
last_seen_course INTEGER DEFAULT 0 NOT NULL,
info BLOB NOT NULL,
info INTEGER NOT NULL,
info_user_limit TEXT NOT NULL,
info_server_limit TEXT NOT NULL,
CONSTRAINT external_servers_privacy_preferences_FK FOREIGN KEY (id) REFERENCES users(id) ON DELETE CASCADE ON UPDATE CASCADE

View File

@ -2,14 +2,14 @@
CREATE TABLE IF NOT EXISTS privacy_preferences (
id TEXT NOT NULL PRIMARY KEY,
discovery BLOB NOT NULL,
discovery INTEGER NOT NULL,
discovery_user_limit TEXT NOT NULL,
discovery_server_limit TEXT NOT NULL,
last_seen BLOB NOT NULL,
last_seen INTEGER NOT NULL,
last_seen_user_limit TEXT NOT NULL,
last_seen_server_limit TEXT NOT NULL,
last_seen_course BOOLEAN DEFAULT 0 NOT NULL CHECK (last_seen_course IN (0, 1)),
info BLOB NOT NULL,
info INTEGER NOT NULL,
info_user_limit TEXT NOT NULL,
info_server_limit TEXT NOT NULL,
CONSTRAINT privacy_preferences_FK FOREIGN KEY (id) REFERENCES users(id) ON DELETE CASCADE ON UPDATE CASCADE