create database layout
This commit is contained in:
parent
850e736b3c
commit
663fbd12fd
8
sqlite/external_servers_preferences.sql
Normal file
8
sqlite/external_servers_preferences.sql
Normal file
@ -0,0 +1,8 @@
|
||||
-- external_servers_preferences definition
|
||||
|
||||
CREATE TABLE external_servers_preferences (
|
||||
id INTEGER NOT NULL,
|
||||
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
|
||||
);
|
16
sqlite/external_servers_privacy_preferences.sql
Normal file
16
sqlite/external_servers_privacy_preferences.sql
Normal file
@ -0,0 +1,16 @@
|
||||
-- external_servers_privacy_preferences definition
|
||||
|
||||
CREATE TABLE external_servers_privacy_preferences (
|
||||
id INTEGER NOT NULL,
|
||||
discovery BLOB NOT NULL,
|
||||
discovery_user_limit TEXT NOT NULL,
|
||||
discovery_server_limit TEXT NOT NULL,
|
||||
last_seen BLOB 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_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
|
||||
);
|
8
sqlite/notification_preferences.sql
Normal file
8
sqlite/notification_preferences.sql
Normal file
@ -0,0 +1,8 @@
|
||||
-- notification_preferences definition
|
||||
|
||||
CREATE TABLE notification_preferences (
|
||||
id INTEGER NOT NULL,
|
||||
lock_details INTEGER DEFAULT 0 NOT NULL,
|
||||
do_not_disturb INTEGER DEFAULT 0 NOT NULL,
|
||||
CONSTRAINT notification_preferences_FK FOREIGN KEY (id) REFERENCES users(id) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
);
|
16
sqlite/privacy_preferences.sql
Normal file
16
sqlite/privacy_preferences.sql
Normal file
@ -0,0 +1,16 @@
|
||||
-- privacy_preferences definition
|
||||
|
||||
CREATE TABLE privacy_preferences (
|
||||
id INTEGER NOT NULL,
|
||||
discovery BLOB NOT NULL,
|
||||
discovery_user_limit TEXT NOT NULL,
|
||||
discovery_server_limit TEXT NOT NULL,
|
||||
last_seen BLOB 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_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
|
||||
);
|
8
sqlite/security_preferences.sql
Normal file
8
sqlite/security_preferences.sql
Normal file
@ -0,0 +1,8 @@
|
||||
-- security_preferences definition
|
||||
|
||||
CREATE TABLE "security_preferences" (
|
||||
id INTEGER NOT NULL,
|
||||
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
|
||||
);
|
10
sqlite/users.sql
Normal file
10
sqlite/users.sql
Normal file
@ -0,0 +1,10 @@
|
||||
-- users definition
|
||||
|
||||
CREATE TABLE users (
|
||||
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||
user_name TEXT NOT NULL,
|
||||
display_name TEXT,
|
||||
activated INTEGER DEFAULT 0 NOT NULL,
|
||||
created INTEGER NOT NULL,
|
||||
last_online INTEGER
|
||||
);
|
Loading…
Reference in New Issue
Block a user