summaryrefslogtreecommitdiff
path: root/schema
diff options
context:
space:
mode:
Diffstat (limited to 'schema')
-rw-r--r--schema/ttrss_schema_mysql.sql13
-rw-r--r--schema/ttrss_schema_pgsql.sql13
-rw-r--r--schema/versions/mysql/139.sql13
-rw-r--r--schema/versions/pgsql/139.sql13
4 files changed, 48 insertions, 4 deletions
diff --git a/schema/ttrss_schema_mysql.sql b/schema/ttrss_schema_mysql.sql
index fcff9c9bb..60b121e37 100644
--- a/schema/ttrss_schema_mysql.sql
+++ b/schema/ttrss_schema_mysql.sql
@@ -33,6 +33,7 @@ drop table if exists ttrss_cat_counters_cache;
drop table if exists ttrss_feeds;
drop table if exists ttrss_archived_feeds;
drop table if exists ttrss_feed_categories;
+drop table if exists ttrss_app_passwords;
drop table if exists ttrss_users;
drop table if exists ttrss_themes;
drop table if exists ttrss_sessions;
@@ -57,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) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
+
create table ttrss_feed_categories(id integer not null primary key auto_increment,
owner_uid integer not null,
title varchar(200) not null,
@@ -137,7 +146,7 @@ create table ttrss_feeds (id integer not null auto_increment primary key,
unique(feed_url(255), owner_uid)) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
insert into ttrss_feeds (owner_uid, title, feed_url) values
- (1, 'Tiny Tiny RSS: Forum', 'http://tt-rss.org/forum/rss.php');
+ ((select id from ttrss_users where login = 'admin'), 'Tiny Tiny RSS: Forum', 'https://tt-rss.org/forum/rss.php');
create table ttrss_entries (id integer not null primary key auto_increment,
title text not null,
@@ -287,7 +296,7 @@ create table ttrss_tags (id integer primary key auto_increment,
create table ttrss_version (schema_version int not null) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
-insert into ttrss_version values (138);
+insert into ttrss_version values (139);
create table ttrss_enclosures (id integer primary key auto_increment,
content_url text not null,
diff --git a/schema/ttrss_schema_pgsql.sql b/schema/ttrss_schema_pgsql.sql
index ac1b38315..c818596b8 100644
--- a/schema/ttrss_schema_pgsql.sql
+++ b/schema/ttrss_schema_pgsql.sql
@@ -30,6 +30,7 @@ drop table if exists ttrss_cat_counters_cache;
drop table if exists ttrss_archived_feeds;
drop table if exists ttrss_feeds;
drop table if exists ttrss_feed_categories;
+drop table if exists ttrss_app_passwords;
drop table if exists ttrss_users;
drop table if exists ttrss_themes;
drop table if exists ttrss_sessions;
@@ -55,6 +56,14 @@ create table ttrss_users (id serial not null primary key,
insert into ttrss_users (login,pwd_hash,access_level) values ('admin',
'SHA1:5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8', 10);
+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,
owner_uid integer not null references ttrss_users(id) on delete cascade,
collapsed boolean not null default false,
@@ -106,7 +115,7 @@ create index ttrss_feeds_owner_uid_index on ttrss_feeds(owner_uid);
create index ttrss_feeds_cat_id_idx on ttrss_feeds(cat_id);
insert into ttrss_feeds (owner_uid, title, feed_url) values
- (1, 'Tiny Tiny RSS: Forum', 'http://tt-rss.org/forum/rss.php');
+ ((select id from ttrss_users where login = 'admin'), 'Tiny Tiny RSS: Forum', 'https://tt-rss.org/forum/rss.php');
create table ttrss_archived_feeds (id integer not null primary key,
owner_uid integer not null references ttrss_users(id) on delete cascade,
@@ -269,7 +278,7 @@ create index ttrss_tags_post_int_id_idx on ttrss_tags(post_int_id);
create table ttrss_version (schema_version int not null);
-insert into ttrss_version values (138);
+insert into ttrss_version values (139);
create table ttrss_enclosures (id serial not null primary key,
content_url text not null,
diff --git a/schema/versions/mysql/139.sql b/schema/versions/mysql/139.sql
new file mode 100644
index 000000000..88dfb69c7
--- /dev/null
+++ b/schema/versions/mysql/139.sql
@@ -0,0 +1,13 @@
+begin;
+
+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) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
+
+update ttrss_version set schema_version = 139;
+
+commit;
diff --git a/schema/versions/pgsql/139.sql b/schema/versions/pgsql/139.sql
new file mode 100644
index 000000000..b2617390c
--- /dev/null
+++ b/schema/versions/pgsql/139.sql
@@ -0,0 +1,13 @@
+begin;
+
+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;
+
+commit;