mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-09-29 03:59:29 -04:00
Change full_schemas/11 to work with postgres
This commit is contained in:
parent
5b31afcbd1
commit
cf04cedf21
13 changed files with 90 additions and 84 deletions
|
@ -16,8 +16,8 @@ CREATE TABLE IF NOT EXISTS users(
|
|||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
name VARCHAR(150),
|
||||
password_hash VARCHAR(150),
|
||||
creation_ts BIGINT UNSIGNED,
|
||||
admin BOOL DEFAULT 0 NOT NULL,
|
||||
creation_ts BIGINT,
|
||||
admin SMALLINT DEFAULT 0 NOT NULL,
|
||||
UNIQUE(name)
|
||||
);
|
||||
|
||||
|
@ -26,7 +26,7 @@ CREATE TABLE IF NOT EXISTS access_tokens(
|
|||
user_id VARCHAR(150) NOT NULL,
|
||||
device_id VARCHAR(150),
|
||||
token VARCHAR(150) NOT NULL,
|
||||
last_used BIGINT UNSIGNED,
|
||||
last_used BIGINT,
|
||||
UNIQUE(token)
|
||||
);
|
||||
|
||||
|
@ -36,8 +36,8 @@ CREATE TABLE IF NOT EXISTS user_ips (
|
|||
device_id VARCHAR(150),
|
||||
ip VARCHAR(150) NOT NULL,
|
||||
user_agent VARCHAR(150) NOT NULL,
|
||||
last_seen BIGINT UNSIGNED NOT NULL,
|
||||
last_seen BIGINT NOT NULL,
|
||||
UNIQUE (user, access_token, ip, user_agent)
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS user_ips_user ON user_ips(user);
|
||||
CREATE INDEX user_ips_user ON user_ips(user);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue