diff options
Diffstat (limited to 'sql')
| -rw-r--r-- | sql/pgsql/migrations/3.sql | 2 | ||||
| -rw-r--r-- | sql/pgsql/schema.sql | 6 | ||||
| -rw-r--r-- | sql/sqlite/migrations/3.sql | 2 | ||||
| -rw-r--r-- | sql/sqlite/schema.sql | 5 |
4 files changed, 12 insertions, 3 deletions
diff --git a/sql/pgsql/migrations/3.sql b/sql/pgsql/migrations/3.sql new file mode 100644 index 0000000..e23d0ca --- /dev/null +++ b/sql/pgsql/migrations/3.sql @@ -0,0 +1,2 @@ +alter table epube_users add column last_auth_attempt bigint default null; +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 2d02190..df76b16 100644 --- a/sql/pgsql/schema.sql +++ b/sql/pgsql/schema.sql @@ -1,7 +1,8 @@ create table if not exists epube_users ( id serial not null primary key, username varchar(100) not null unique, - pass varchar(200) not null); + pass varchar(200) not null, + last_auth_attempt bigint default null); create table if not exists epube_pagination ( id serial not null primary key, @@ -26,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 new file mode 100644 index 0000000..e23d0ca --- /dev/null +++ b/sql/sqlite/migrations/3.sql @@ -0,0 +1,2 @@ +alter table epube_users add column last_auth_attempt bigint default null; +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 eeab2f9..dacb1f2 100644 --- a/sql/sqlite/schema.sql +++ b/sql/sqlite/schema.sql @@ -7,7 +7,8 @@ create table if not exists epube_pagination ( create table if not exists epube_users ( id integer not null primary key autoincrement, username varchar(100) not null, - pass varchar(200) not null); + pass varchar(200) not null, + last_auth_attempt bigint default null); create table if not exists epube_books ( id integer not null primary key autoincrement, @@ -21,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); |
