summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2024-02-18 15:19:40 +0300
committerAndrew Dolgov <[email protected]>2024-02-18 15:19:40 +0300
commit5ba3f6ef77410f03341aecc111058b9ee82d56b4 (patch)
tree23cc19dde7b4d12a2a88bff32183393c910f29be /sql
parenta7e5b30e034d7b656a7f1a58b40fff47b38b0dd9 (diff)
sessions to pgsql
Diffstat (limited to 'sql')
-rw-r--r--sql/pgsql/migrations/2.sql5
-rw-r--r--sql/pgsql/schema.sql6
-rw-r--r--sql/sqlite/migrations/2.sql1
3 files changed, 12 insertions, 0 deletions
diff --git a/sql/pgsql/migrations/2.sql b/sql/pgsql/migrations/2.sql
new file mode 100644
index 0000000..a354573
--- /dev/null
+++ b/sql/pgsql/migrations/2.sql
@@ -0,0 +1,5 @@
+create table if not exists epube_sessions (id varchar(250) not null primary key,
+ data text,
+ expire integer not null);
+
+create index epube_sessions_expire_index on epube_sessions(expire);
diff --git a/sql/pgsql/schema.sql b/sql/pgsql/schema.sql
index 3616f06..2d02190 100644
--- a/sql/pgsql/schema.sql
+++ b/sql/pgsql/schema.sql
@@ -21,3 +21,9 @@ create table if not exists epube_favorites(
id serial not null primary key,
bookid bigint not null,
owner varchar(200) not null references epube_users(username) on delete cascade);
+
+create table if not exists epube_sessions (id varchar(250) not null primary key,
+ data text,
+ expire integer not null);
+
+create index epube_sessions_expire_index on epube_sessions(expire);
diff --git a/sql/sqlite/migrations/2.sql b/sql/sqlite/migrations/2.sql
new file mode 100644
index 0000000..e0298b7
--- /dev/null
+++ b/sql/sqlite/migrations/2.sql
@@ -0,0 +1 @@
+select true;