schema: add separate otp_secret column

This commit is contained in:
Andrew Dolgov 2021-03-05 17:16:48 +03:00
parent ecb94ec23d
commit 2aed79d729
5 changed files with 7 additions and 1 deletions

View File

@ -6,7 +6,7 @@ class Config {
const T_STRING = 2; const T_STRING = 2;
const T_INT = 3; const T_INT = 3;
const SCHEMA_VERSION = 142; const SCHEMA_VERSION = 143;
// override defaults, defined below in _DEFAULTS[], via environment: DB_TYPE becomes TTRSS_DB_TYPE, etc // override defaults, defined below in _DEFAULTS[], via environment: DB_TYPE becomes TTRSS_DB_TYPE, etc

View File

@ -0,0 +1,2 @@
alter table ttrss_users add column otp_secret varchar(250);
alter table ttrss_users alter column otp_secret set default null;

View File

@ -53,6 +53,7 @@ create table ttrss_users (id integer primary key not null auto_increment,
created datetime default null, created datetime default null,
twitter_oauth longtext default null, twitter_oauth longtext default null,
otp_enabled boolean not null default false, otp_enabled boolean not null default false,
otp_secret varchar(250) default null,
resetpass_token varchar(250) default null) ENGINE=InnoDB DEFAULT CHARSET=UTF8; resetpass_token varchar(250) default null) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
insert into ttrss_users (login,pwd_hash,access_level) values ('admin', insert into ttrss_users (login,pwd_hash,access_level) values ('admin',

View File

@ -0,0 +1,2 @@
alter table ttrss_users add column otp_secret varchar(250);
alter table ttrss_users alter column otp_secret set default null;

View File

@ -50,6 +50,7 @@ create table ttrss_users (id serial not null primary key,
salt varchar(250) not null default '', salt varchar(250) not null default '',
twitter_oauth text default null, twitter_oauth text default null,
otp_enabled boolean not null default false, otp_enabled boolean not null default false,
otp_secret varchar(250) default null,
resetpass_token varchar(250) default null, resetpass_token varchar(250) default null,
created timestamp default null); created timestamp default null);