diff options
author | 2024-01-31 16:50:01 +0300 | |
---|---|---|
committer | 2024-02-01 19:18:13 +0300 | |
commit | 5ef424120ed694b1f69daeafaa1454455d13dee2 (patch) | |
tree | 72c0e5cedcdb5420f2760856c6e762cedf31c6de /src/main/resources/schema-sqlite.sql | |
parent | 3cf580867600494615a7bdc9ab43ef0735d5aedb (diff) |
CI: enable SQLite
* SQLite JDBC driver does not support generated keys feature. So we implement `returningId` helper
* only one connection should be used from connection pooler
* changes made to prevent connection locking
Diffstat (limited to 'src/main/resources/schema-sqlite.sql')
-rw-r--r-- | src/main/resources/schema-sqlite.sql | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/main/resources/schema-sqlite.sql b/src/main/resources/schema-sqlite.sql index b0858f1b..74ba28b6 100644 --- a/src/main/resources/schema-sqlite.sql +++ b/src/main/resources/schema-sqlite.sql @@ -1,5 +1,3 @@ -PRAGMA journal_mode=WAL; -PRAGMA busy_timeout=30000; CREATE TABLE user_services ( user_id INTEGER NOT NULL, regid character varying(1024) NOT NULL, @@ -44,7 +42,7 @@ CREATE TABLE facebook ( ts DEFAULT (strftime('%s','now') || substr(strftime('%f','now'),4)) NOT NULL, fb_name character varying(64), fb_link character varying(255) NOT NULL, - crosspost boolean DEFAULT true NOT NULL, + crosspost boolean DEFAULT TRUE NOT NULL, FOREIGN KEY (user_id) REFERENCES users(id) ); CREATE TABLE favorites ( @@ -91,7 +89,7 @@ CREATE TABLE messages ( replies smallint DEFAULT (0) NOT NULL, maxreplyid smallint DEFAULT (0) NOT NULL, privacy smallint DEFAULT (1) NOT NULL, - readonly boolean DEFAULT false NOT NULL, + readonly boolean DEFAULT FALSE NOT NULL, attach TEXT CHECK (attach IN ('jpg', 'mp4', 'png')), place_id bigint, lat numeric(10,7), @@ -215,7 +213,7 @@ CREATE TABLE twitter ( access_token_secret character varying(64) NOT NULL, uname character varying(64) NOT NULL, ts DEFAULT (strftime('%s','now') || substr(strftime('%f','now'),4)) NOT NULL, - crosspost boolean DEFAULT true NOT NULL, + crosspost boolean DEFAULT TRUE NOT NULL, FOREIGN KEY (user_id) REFERENCES users(id) ); CREATE TABLE users ( |