From b158103f2f6a3295d00dc4a1344b8bc38bcb43a4 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 1 Nov 2019 13:30:12 +0300 Subject: [PATCH] schema: add missing stuff --- schema/ttrss_schema_mysql.sql | 8 ++++++++ schema/ttrss_schema_pgsql.sql | 2 ++ schema/versions/mysql/139.sql | 2 ++ schema/versions/pgsql/139.sql | 2 ++ 4 files changed, 14 insertions(+) diff --git a/schema/ttrss_schema_mysql.sql b/schema/ttrss_schema_mysql.sql index d4e3f3d1d..8f7fb8d31 100644 --- a/schema/ttrss_schema_mysql.sql +++ b/schema/ttrss_schema_mysql.sql @@ -58,6 +58,14 @@ create table ttrss_users (id integer primary key not null auto_increment, insert into ttrss_users (login,pwd_hash,access_level) values ('admin', 'SHA1:5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8', 10); +create table ttrss_app_passwords (id integer not null primary key auto_increment, + title varchar(250) not null, + pwd_hash text not null, + service varchar(100) not null, + created datetime not null, + last_used datetime default null, + owner_uid integer not null references ttrss_users(id) on delete cascade); + create table ttrss_feed_categories(id integer not null primary key auto_increment, owner_uid integer not null, title varchar(200) not null, diff --git a/schema/ttrss_schema_pgsql.sql b/schema/ttrss_schema_pgsql.sql index a0b76ab62..edd347cfd 100644 --- a/schema/ttrss_schema_pgsql.sql +++ b/schema/ttrss_schema_pgsql.sql @@ -60,6 +60,8 @@ create table ttrss_app_passwords (id serial not null primary key, title varchar(250) not null, pwd_hash text not null, service varchar(100) not null, + created timestamp not null, + last_used timestamp default null, owner_uid integer not null references ttrss_users(id) on delete cascade); create table ttrss_feed_categories(id serial not null primary key, diff --git a/schema/versions/mysql/139.sql b/schema/versions/mysql/139.sql index 45c4d6266..d2071d49e 100644 --- a/schema/versions/mysql/139.sql +++ b/schema/versions/mysql/139.sql @@ -4,6 +4,8 @@ create table ttrss_app_passwords (id integer not null primary key auto_increment title varchar(250) not null, pwd_hash text not null, service varchar(100) not null, + created datetime not null, + last_used datetime default null, owner_uid integer not null references ttrss_users(id) on delete cascade); update ttrss_version set schema_version = 139; diff --git a/schema/versions/pgsql/139.sql b/schema/versions/pgsql/139.sql index 6001ee139..b2617390c 100644 --- a/schema/versions/pgsql/139.sql +++ b/schema/versions/pgsql/139.sql @@ -4,6 +4,8 @@ create table ttrss_app_passwords (id serial not null primary key, title varchar(250) not null, pwd_hash text not null, service varchar(100) not null, + created timestamp not null, + last_used timestamp default null, owner_uid integer not null references ttrss_users(id) on delete cascade); update ttrss_version set schema_version = 139;