diff --git a/schema/ttrss_schema_mysql.sql b/schema/ttrss_schema_mysql.sql index f7eefa672..93a2aa299 100644 --- a/schema/ttrss_schema_mysql.sql +++ b/schema/ttrss_schema_mysql.sql @@ -84,3 +84,10 @@ create table ttrss_tags (id integer primary key auto_increment, index (post_id), foreign key (post_id) references ttrss_entries(id) ON DELETE CASCADE) TYPE=InnoDB; +drop table ttrss_version; + +create table ttrss_version (schema_version int not null) TYPE=InnoDB; + +insert into ttrss_version values (1); + + diff --git a/schema/ttrss_schema_pgsql.sql b/schema/ttrss_schema_pgsql.sql index 2ab310cc5..3a20588eb 100644 --- a/schema/ttrss_schema_pgsql.sql +++ b/schema/ttrss_schema_pgsql.sql @@ -79,3 +79,9 @@ create table ttrss_tags (id serial primary key, tag_name varchar(250) not null, post_id integer references ttrss_entries(id) ON DELETE CASCADE not null); +drop table ttrss_version; + +create table ttrss_version (schema_version int not null); + +insert into ttrss_version values (1); + diff --git a/schema/upgrade-1.0.6-1.0.7-pgsql.sql b/schema/upgrade-1.0.6-1.0.7-pgsql.sql index 123da12e3..ffdce1c9e 100644 --- a/schema/upgrade-1.0.6-1.0.7-pgsql.sql +++ b/schema/upgrade-1.0.6-1.0.7-pgsql.sql @@ -12,4 +12,8 @@ alter table ttrss_feeds alter column last_error set default ''; alter table ttrss_feeds alter column site_url set not null; alter table ttrss_feeds alter column site_url set default ''; +create table ttrss_version (schema_version int not null); + +insert into ttrss_version values (1); + commit;