schema: add ttrss_feeds.order_id
This commit is contained in:
parent
49c6c279ab
commit
567810362c
5 changed files with 25 additions and 3 deletions
|
@ -2,7 +2,7 @@
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
|
|
||||||
define('EXPECTED_CONFIG_VERSION', 20);
|
define('EXPECTED_CONFIG_VERSION', 20);
|
||||||
define('SCHEMA_VERSION', 74);
|
define('SCHEMA_VERSION', 75);
|
||||||
|
|
||||||
if (!file_exists("config.php")) {
|
if (!file_exists("config.php")) {
|
||||||
print "<b>Fatal Error</b>: You forgot to copy
|
print "<b>Fatal Error</b>: You forgot to copy
|
||||||
|
|
|
@ -114,6 +114,7 @@ create table ttrss_feeds (id integer not null auto_increment primary key,
|
||||||
last_update_started datetime default null,
|
last_update_started datetime default null,
|
||||||
always_display_enclosures boolean not null default false,
|
always_display_enclosures boolean not null default false,
|
||||||
update_method integer not null default 0,
|
update_method integer not null default 0,
|
||||||
|
order_id integer not null default 0,
|
||||||
index(owner_uid),
|
index(owner_uid),
|
||||||
foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE,
|
foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE,
|
||||||
index(cat_id),
|
index(cat_id),
|
||||||
|
@ -246,7 +247,7 @@ create table ttrss_tags (id integer primary key auto_increment,
|
||||||
|
|
||||||
create table ttrss_version (schema_version int not null) TYPE=InnoDB DEFAULT CHARSET=UTF8;
|
create table ttrss_version (schema_version int not null) TYPE=InnoDB DEFAULT CHARSET=UTF8;
|
||||||
|
|
||||||
insert into ttrss_version values (74);
|
insert into ttrss_version values (75);
|
||||||
|
|
||||||
create table ttrss_enclosures (id integer primary key auto_increment,
|
create table ttrss_enclosures (id integer primary key auto_increment,
|
||||||
content_url text not null,
|
content_url text not null,
|
||||||
|
|
|
@ -83,6 +83,7 @@ create table ttrss_feeds (id serial not null primary key,
|
||||||
last_update_started timestamp default null,
|
last_update_started timestamp default null,
|
||||||
update_method integer not null default 0,
|
update_method integer not null default 0,
|
||||||
always_display_enclosures boolean not null default false,
|
always_display_enclosures boolean not null default false,
|
||||||
|
order_id integer not null default 0,
|
||||||
auth_pass_encrypted boolean not null default false);
|
auth_pass_encrypted boolean not null default false);
|
||||||
|
|
||||||
create index ttrss_feeds_owner_uid_index on ttrss_feeds(owner_uid);
|
create index ttrss_feeds_owner_uid_index on ttrss_feeds(owner_uid);
|
||||||
|
@ -221,7 +222,7 @@ create index ttrss_tags_post_int_id_idx on ttrss_tags(post_int_id);
|
||||||
|
|
||||||
create table ttrss_version (schema_version int not null);
|
create table ttrss_version (schema_version int not null);
|
||||||
|
|
||||||
insert into ttrss_version values (74);
|
insert into ttrss_version values (75);
|
||||||
|
|
||||||
create table ttrss_enclosures (id serial not null primary key,
|
create table ttrss_enclosures (id serial not null primary key,
|
||||||
content_url text not null,
|
content_url text not null,
|
||||||
|
|
10
schema/versions/mysql/75.sql
Normal file
10
schema/versions/mysql/75.sql
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
begin;
|
||||||
|
|
||||||
|
alter table ttrss_feeds add column order_id integer;
|
||||||
|
update ttrss_feeds set order_id = 0;
|
||||||
|
alter table ttrss_feeds change order_id order_id integer not null;
|
||||||
|
alter table ttrss_feeds alter column order_id set default 0;
|
||||||
|
|
||||||
|
update ttrss_version set schema_version = 75;
|
||||||
|
|
||||||
|
commit;
|
10
schema/versions/pgsql/75.sql
Normal file
10
schema/versions/pgsql/75.sql
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
begin;
|
||||||
|
|
||||||
|
alter table ttrss_feeds add column order_id integer;
|
||||||
|
update ttrss_feeds set order_id = 0;
|
||||||
|
alter table ttrss_feeds alter column order_id set not null;
|
||||||
|
alter table ttrss_feeds alter column order_id set default 0;
|
||||||
|
|
||||||
|
update ttrss_version set schema_version = 75;
|
||||||
|
|
||||||
|
commit;
|
Loading…
Reference in a new issue