Fix migrations and cleanup old db file
This commit is contained in:
parent
d323d21c19
commit
792300ab9e
7 changed files with 11 additions and 12 deletions
Binary file not shown.
|
@ -3,3 +3,4 @@ DROP TABLE "auth_request";
|
||||||
DROP TABLE "user";
|
DROP TABLE "user";
|
||||||
DROP TABLE "backend";
|
DROP TABLE "backend";
|
||||||
DROP TABLE "client";
|
DROP TABLE "client";
|
||||||
|
DROP TABLE "refresh_token";
|
||||||
|
|
|
@ -44,6 +44,7 @@ CREATE TABLE "auth_request" (
|
||||||
code_challenge_method STRING NOT NULL DEFAULT '',
|
code_challenge_method STRING NOT NULL DEFAULT '',
|
||||||
auth_time timestamp,
|
auth_time timestamp,
|
||||||
user_id TEXT NOT NULL DEFAULT '',
|
user_id TEXT NOT NULL DEFAULT '',
|
||||||
|
consent INTEGER NOT NULL DEFAULT 0,
|
||||||
FOREIGN KEY(backend_id) REFERENCES backend(id),
|
FOREIGN KEY(backend_id) REFERENCES backend(id),
|
||||||
FOREIGN KEY(client_id) REFERENCES client(id),
|
FOREIGN KEY(client_id) REFERENCES client(id),
|
||||||
FOREIGN KEY(user_id) REFERENCES user(id)
|
FOREIGN KEY(user_id) REFERENCES user(id)
|
||||||
|
@ -56,3 +57,12 @@ CREATE TABLE "auth_code" (
|
||||||
FOREIGN KEY(auth_request_id) REFERENCES auth_request(id)
|
FOREIGN KEY(auth_request_id) REFERENCES auth_request(id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE TABLE refresh_token (
|
||||||
|
id TEXT NOT NULL PRIMARY KEY,
|
||||||
|
client_id TEXT NOT NULL,
|
||||||
|
user_id TEXT NOT NULL,
|
||||||
|
scopes blob NOT NULL, -- list of strings, json-encoded
|
||||||
|
auth_time timestamp NOT NULL,
|
||||||
|
FOREIGN KEY(client_id) REFERENCES client(id),
|
||||||
|
FOREIGN KEY(user_id) REFERENCES user(id)
|
||||||
|
);
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
DROP TABLE refresh_token;
|
|
|
@ -1,9 +0,0 @@
|
||||||
CREATE TABLE refresh_token (
|
|
||||||
id TEXT NOT NULL PRIMARY KEY,
|
|
||||||
client_id TEXT NOT NULL,
|
|
||||||
user_id TEXT NOT NULL,
|
|
||||||
scopes blob NOT NULL, -- list of strings, json-encoded
|
|
||||||
auth_time timestamp NOT NULL,
|
|
||||||
FOREIGN KEY(client_id) REFERENCES client(id),
|
|
||||||
FOREIGN KEY(user_id) REFERENCES user(id)
|
|
||||||
);
|
|
|
@ -1 +0,0 @@
|
||||||
ALTER TABLE "auth_request" DROP COLUMN consent;
|
|
|
@ -1 +0,0 @@
|
||||||
ALTER TABLE "auth_request" ADD COLUMN consent INTEGER NOT NULL DEFAULT 0;
|
|
Loading…
Reference in a new issue