Change data types according to sqlx
Co-authored-by: Elias Schriefer
This commit is contained in:
		| @@ -1,7 +1,7 @@ | ||||
| -- external_servers_preferences definition | ||||
|  | ||||
| CREATE TABLE external_servers_preferences ( | ||||
| 	id INTEGER NOT NULL PRIMARY KEY, | ||||
| 	id BLOB NOT NULL PRIMARY KEY, | ||||
| 	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 | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| -- external_servers_privacy_preferences definition | ||||
|  | ||||
| CREATE TABLE external_servers_privacy_preferences ( | ||||
| 	id INTEGER NOT NULL PRIMARY KEY, | ||||
| 	id BLOB NOT NULL PRIMARY KEY, | ||||
| 	discovery BLOB NOT NULL, | ||||
| 	discovery_user_limit TEXT NOT NULL, | ||||
| 	discovery_server_limit TEXT NOT NULL, | ||||
|   | ||||
| @@ -1,8 +1,8 @@ | ||||
| -- notification_preferences definition | ||||
|  | ||||
| CREATE TABLE notification_preferences ( | ||||
| 	id INTEGER NOT NULL PRIMARY KEY, | ||||
| 	lock_details INTEGER DEFAULT 0 NOT NULL, | ||||
| 	do_not_disturb INTEGER DEFAULT 0 NOT NULL, | ||||
| 	id BLOB NOT NULL PRIMARY KEY, | ||||
| 	lock_details BOOLEAN DEFAULT 0 NOT NULL CHECK (lock_details IN (0, 1)), | ||||
| 	do_not_disturb INTEGER DEFAULT 0 NOT NULL CHECK (do_not_disturb IN (0, 1)), | ||||
| 	CONSTRAINT notification_preferences_FK FOREIGN KEY (id) REFERENCES users(id) ON DELETE CASCADE ON UPDATE CASCADE | ||||
| ); | ||||
| @@ -1,14 +1,14 @@ | ||||
| -- privacy_preferences definition | ||||
|  | ||||
| CREATE TABLE privacy_preferences ( | ||||
| 	id INTEGER NOT NULL PRIMARY KEY, | ||||
| 	id BLOB NOT NULL PRIMARY KEY, | ||||
| 	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, | ||||
| 	last_seen_course BOOLEAN DEFAULT 0 NOT NULL CHECK (last_seen_course IN (0, 1)), | ||||
| 	info BLOB NOT NULL, | ||||
| 	info_user_limit TEXT NOT NULL, | ||||
| 	info_server_limit TEXT NOT NULL, | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| -- security_preferences definition | ||||
|  | ||||
| CREATE TABLE "security_preferences" ( | ||||
| 	id INTEGER NOT NULL PRIMARY KEY, | ||||
| 	id BLOB NOT NULL PRIMARY KEY, | ||||
| 	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 | ||||
|   | ||||
| @@ -1,10 +1,10 @@ | ||||
| -- users definition | ||||
|  | ||||
| CREATE TABLE users ( | ||||
| 	id INTEGER NOT NULL PRIMARY KEY, | ||||
| 	id BLOB NOT NULL PRIMARY KEY, | ||||
| 	user_name TEXT NOT NULL, | ||||
| 	display_name TEXT, | ||||
| 	activated INTEGER DEFAULT 0 NOT NULL, | ||||
| 	activated BOOLEAN DEFAULT 0 NOT NULL CHECK (activated IN (0, 1)), | ||||
| 	created INTEGER NOT NULL, | ||||
| 	last_online INTEGER | ||||
| ); | ||||
		Reference in New Issue
	
	Block a user