Skip to content

Commit

Permalink
schema: add resetpass_token (bump schema)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Dolgov committed Mar 9, 2014
1 parent b41c574 commit 3b19a53
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/functions.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
define('EXPECTED_CONFIG_VERSION', 26);
define('SCHEMA_VERSION', 123);
define('SCHEMA_VERSION', 124);

define('LABEL_BASE_INDEX', -1024);
define('PLUGIN_FEED_BASE_INDEX', -128);
Expand Down
3 changes: 2 additions & 1 deletion schema/ttrss_schema_mysql.sql
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ create table ttrss_users (id integer primary key not null auto_increment,
created datetime default null,
twitter_oauth longtext default null,
otp_enabled boolean not null default false,
resetpass_token varchar(250) default null,
index (theme_id)) ENGINE=InnoDB DEFAULT CHARSET=UTF8;

insert into ttrss_users (login,pwd_hash,access_level) values ('admin',
Expand Down Expand Up @@ -302,7 +303,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 (123);
insert into ttrss_version values (124);

create table ttrss_enclosures (id integer primary key auto_increment,
content_url text not null,
Expand Down
3 changes: 2 additions & 1 deletion schema/ttrss_schema_pgsql.sql
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ create table ttrss_users (id serial not null primary key,
salt varchar(250) not null default '',
twitter_oauth text default null,
otp_enabled boolean not null default false,
resetpass_token varchar(250) default null,
created timestamp default null);

insert into ttrss_users (login,pwd_hash,access_level) values ('admin',
Expand Down Expand Up @@ -260,7 +261,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 (123);
insert into ttrss_version values (124);

create table ttrss_enclosures (id serial not null primary key,
content_url text not null,
Expand Down
8 changes: 8 additions & 0 deletions schema/versions/mysql/124.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
begin;

alter table ttrss_users add column resetpass_token boolean;
alter table ttrss_users alter column resetpass_token set default null;

update ttrss_version set schema_version = 124;

commit;
8 changes: 8 additions & 0 deletions schema/versions/pgsql/124.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
begin;

alter table ttrss_users add column resetpass_token varchar(250);
alter table ttrss_users alter column resetpass_token set default null;

update ttrss_version set schema_version = 124;

commit;

0 comments on commit 3b19a53

Please sign in to comment.