about summary refs log tree commit diff stats
path: root/sql
diff options
context:
space:
mode:
authorAndrew Dolgov <fox@fakecake.org>2026-06-21 14:39:37 +0300
committerAndrew Dolgov <fox@fakecake.org>2026-06-21 14:39:37 +0300
commit69c16fafa9671c99cf5c39e7227e2d5f39428374 (patch)
treed155d0afe470b86cdf349da9bb3de1c5770eef18 /sql
parent5a2b451afb7a5c794b5da19dd22b4ba40c256b03 (diff)
downloadthe-epube-69c16fafa9671c99cf5c39e7227e2d5f39428374.tar.gz
the-epube-69c16fafa9671c99cf5c39e7227e2d5f39428374.tar.xz
normalize index names
Diffstat (limited to 'sql')
-rw-r--r--sql/pgsql/migrations/3.sql2
-rw-r--r--sql/pgsql/schema.sql3
-rw-r--r--sql/sqlite/migrations/3.sql2
-rw-r--r--sql/sqlite/schema.sql2
4 files changed, 6 insertions, 3 deletions
diff --git a/sql/pgsql/migrations/3.sql b/sql/pgsql/migrations/3.sql
index 450a5f1..e23d0ca 100644
--- a/sql/pgsql/migrations/3.sql
+++ b/sql/pgsql/migrations/3.sql
@@ -1,2 +1,2 @@
 alter table epube_users add column last_auth_attempt bigint default null;
-create index if not exists idx_epube_users_last_auth_attempt on epube_users(last_auth_attempt);
+create index epube_users_last_auth_attempt on epube_users(last_auth_attempt);
diff --git a/sql/pgsql/schema.sql b/sql/pgsql/schema.sql
index 950bfad..df76b16 100644
--- a/sql/pgsql/schema.sql
+++ b/sql/pgsql/schema.sql
@@ -27,4 +27,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);
+create index if not exists epube_sessions_expire_index on epube_sessions(expire);
+create index if not exists epube_users_last_auth_attempt on epube_users(last_auth_attempt);
diff --git a/sql/sqlite/migrations/3.sql b/sql/sqlite/migrations/3.sql
index 450a5f1..e23d0ca 100644
--- a/sql/sqlite/migrations/3.sql
+++ b/sql/sqlite/migrations/3.sql
@@ -1,2 +1,2 @@
 alter table epube_users add column last_auth_attempt bigint default null;
-create index if not exists idx_epube_users_last_auth_attempt on epube_users(last_auth_attempt);
+create index epube_users_last_auth_attempt on epube_users(last_auth_attempt);
diff --git a/sql/sqlite/schema.sql b/sql/sqlite/schema.sql
index f14bcf9..dacb1f2 100644
--- a/sql/sqlite/schema.sql
+++ b/sql/sqlite/schema.sql
@@ -22,3 +22,5 @@ create table if not exists epube_favorites(
 	id integer not null primary key autoincrement,
 	bookid integer not null,
 	owner varchar(200) not null);
+
+create index if not exists epube_users_last_auth_attempt on epube_users(last_auth_attempt);