update schema for app-specific passwords

This commit is contained in:
Andrew Dolgov 2019-11-01 11:57:36 +03:00
parent 178bcd4349
commit 84e9f1d5cc
5 changed files with 33 additions and 3 deletions

View File

@ -1,6 +1,6 @@
<?php
define('EXPECTED_CONFIG_VERSION', 26);
define('SCHEMA_VERSION', 138);
define('SCHEMA_VERSION', 139);
define('LABEL_BASE_INDEX', -1024);
define('PLUGIN_FEED_BASE_INDEX', -128);

View File

@ -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;
@ -287,7 +288,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,

View File

@ -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,12 @@ 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,
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,
@ -269,7 +276,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,

View File

@ -0,0 +1,11 @@
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,
owner_uid integer not null references ttrss_users(id) on delete cascade);
update ttrss_version set schema_version = 139;
commit;

View File

@ -0,0 +1,11 @@
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,
owner_uid integer not null references ttrss_users(id) on delete cascade);
update ttrss_version set schema_version = 139;
commit;