Change RestrictionPolicy type to INTEGER in SQL
BLOB is not the way, we need something easy.
This commit is contained in:
parent
ce99469b3d
commit
114bb63f45
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS external_servers_preferences (
|
CREATE TABLE IF NOT EXISTS external_servers_preferences (
|
||||||
id TEXT NOT NULL PRIMARY KEY,
|
id TEXT NOT NULL PRIMARY KEY,
|
||||||
external_servers BLOB NOT NULL,
|
external_servers INTEGER NOT NULL,
|
||||||
external_servers_limit TEXT 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
|
CONSTRAINT external_servers_preferences_FK FOREIGN KEY (id) REFERENCES users(id) ON DELETE CASCADE ON UPDATE CASCADE
|
||||||
);
|
);
|
||||||
|
@ -2,14 +2,14 @@
|
|||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS external_servers_privacy_preferences (
|
CREATE TABLE IF NOT EXISTS external_servers_privacy_preferences (
|
||||||
id TEXT NOT NULL PRIMARY KEY,
|
id TEXT NOT NULL PRIMARY KEY,
|
||||||
discovery BLOB NOT NULL,
|
discovery INTEGER NOT NULL,
|
||||||
discovery_user_limit TEXT NOT NULL,
|
discovery_user_limit TEXT NOT NULL,
|
||||||
discovery_server_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_user_limit TEXT NOT NULL,
|
||||||
last_seen_server_limit TEXT NOT NULL,
|
last_seen_server_limit TEXT NOT NULL,
|
||||||
last_seen_course INTEGER DEFAULT 0 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_user_limit TEXT NOT NULL,
|
||||||
info_server_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
|
CONSTRAINT external_servers_privacy_preferences_FK FOREIGN KEY (id) REFERENCES users(id) ON DELETE CASCADE ON UPDATE CASCADE
|
||||||
|
@ -2,14 +2,14 @@
|
|||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS privacy_preferences (
|
CREATE TABLE IF NOT EXISTS privacy_preferences (
|
||||||
id TEXT NOT NULL PRIMARY KEY,
|
id TEXT NOT NULL PRIMARY KEY,
|
||||||
discovery BLOB NOT NULL,
|
discovery INTEGER NOT NULL,
|
||||||
discovery_user_limit TEXT NOT NULL,
|
discovery_user_limit TEXT NOT NULL,
|
||||||
discovery_server_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_user_limit TEXT NOT NULL,
|
||||||
last_seen_server_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)),
|
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_user_limit TEXT NOT NULL,
|
||||||
info_server_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
|
CONSTRAINT privacy_preferences_FK FOREIGN KEY (id) REFERENCES users(id) ON DELETE CASCADE ON UPDATE CASCADE
|
||||||
|
Loading…
Reference in New Issue
Block a user