diff --git a/sqlite/external_servers_preferences.sql b/sqlite/external_servers_preferences.sql new file mode 100644 index 0000000..922ec40 --- /dev/null +++ b/sqlite/external_servers_preferences.sql @@ -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 +); \ No newline at end of file diff --git a/sqlite/external_servers_privacy_preferences.sql b/sqlite/external_servers_privacy_preferences.sql new file mode 100644 index 0000000..9d6b558 --- /dev/null +++ b/sqlite/external_servers_privacy_preferences.sql @@ -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 +); \ No newline at end of file diff --git a/sqlite/notification_preferences.sql b/sqlite/notification_preferences.sql new file mode 100644 index 0000000..766489e --- /dev/null +++ b/sqlite/notification_preferences.sql @@ -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 +); \ No newline at end of file diff --git a/sqlite/privacy_preferences.sql b/sqlite/privacy_preferences.sql new file mode 100644 index 0000000..6e65bf1 --- /dev/null +++ b/sqlite/privacy_preferences.sql @@ -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 +); \ No newline at end of file diff --git a/sqlite/security_preferences.sql b/sqlite/security_preferences.sql new file mode 100644 index 0000000..965d0f3 --- /dev/null +++ b/sqlite/security_preferences.sql @@ -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 +); \ No newline at end of file diff --git a/sqlite/users.sql b/sqlite/users.sql new file mode 100644 index 0000000..121e75a --- /dev/null +++ b/sqlite/users.sql @@ -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 +); \ No newline at end of file