From 114bb63f4510c097ebf89b1fa5377599d5675be9 Mon Sep 17 00:00:00 2001 From: EliasSchriefer Date: Sat, 16 Oct 2021 21:55:37 +0000 Subject: [PATCH] Change RestrictionPolicy type to INTEGER in SQL BLOB is not the way, we need something easy. --- src/sqlite/external_servers_preferences.sql | 2 +- src/sqlite/external_servers_privacy_preferences.sql | 6 +++--- src/sqlite/privacy_preferences.sql | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/sqlite/external_servers_preferences.sql b/src/sqlite/external_servers_preferences.sql index 005c38c..f614765 100644 --- a/src/sqlite/external_servers_preferences.sql +++ b/src/sqlite/external_servers_preferences.sql @@ -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 ); diff --git a/src/sqlite/external_servers_privacy_preferences.sql b/src/sqlite/external_servers_privacy_preferences.sql index 5e7cffe..30166a7 100644 --- a/src/sqlite/external_servers_privacy_preferences.sql +++ b/src/sqlite/external_servers_privacy_preferences.sql @@ -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 diff --git a/src/sqlite/privacy_preferences.sql b/src/sqlite/privacy_preferences.sql index 20a0b35..8913f80 100644 --- a/src/sqlite/privacy_preferences.sql +++ b/src/sqlite/privacy_preferences.sql @@ -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