From: Andrew Dolgov Date: Sun, 26 Feb 2006 06:39:09 +0000 (+0100) Subject: add author column to ttrss_entries, add upgrade script for 1.1.4, bump schema version X-Git-Tag: schema_freeze_for_1.1.4~45 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=4bc760da51ebb36a13edf8b34d3efee0276abaf6;p=tt-rss.git add author column to ttrss_entries, add upgrade script for 1.1.4, bump schema version --- diff --git a/schema/obsolete/upgrade-1.1.2-1.1.3-mysql.sql b/schema/obsolete/upgrade-1.1.2-1.1.3-mysql.sql new file mode 100644 index 00000000..e3ddb035 --- /dev/null +++ b/schema/obsolete/upgrade-1.1.2-1.1.3-mysql.sql @@ -0,0 +1,12 @@ +begin; + +create table ttrss_scheduled_updates (id integer not null primary key auto_increment, + owner_uid integer not null, + feed_id integer default null, + entered datetime not null, + foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE, + foreign key (feed_id) references ttrss_feeds(id) ON DELETE CASCADE) TYPE=InnoDB; + +update ttrss_version set schema_version = 5; + +commit; diff --git a/schema/obsolete/upgrade-1.1.2-1.1.3-pgsql.sql b/schema/obsolete/upgrade-1.1.2-1.1.3-pgsql.sql new file mode 100644 index 00000000..1292daa3 --- /dev/null +++ b/schema/obsolete/upgrade-1.1.2-1.1.3-pgsql.sql @@ -0,0 +1,10 @@ +begin; + +create table ttrss_scheduled_updates (id serial not null primary key, + owner_uid integer not null references ttrss_users(id) ON DELETE CASCADE, + feed_id integer default null references ttrss_feeds(id) ON DELETE CASCADE, + entered timestamp not null default NOW()); + +update ttrss_version set schema_version = 5; + +commit; diff --git a/schema/ttrss_schema_mysql.sql b/schema/ttrss_schema_mysql.sql index a8fb8698..eb107699 100644 --- a/schema/ttrss_schema_mysql.sql +++ b/schema/ttrss_schema_mysql.sql @@ -83,7 +83,8 @@ create table ttrss_entries (id integer not null primary key auto_increment, no_orig_date bool not null default 0, date_entered datetime not null, num_comments integer not null default 0, - comments varchar(250) not null default '') TYPE=InnoDB; + comments varchar(250) not null default '', + author varchar(250) not null default '') TYPE=InnoDB; create table ttrss_user_entries ( int_id integer not null primary key auto_increment, diff --git a/schema/ttrss_schema_pgsql.sql b/schema/ttrss_schema_pgsql.sql index b9398450..97434ce2 100644 --- a/schema/ttrss_schema_pgsql.sql +++ b/schema/ttrss_schema_pgsql.sql @@ -75,7 +75,8 @@ create table ttrss_entries (id serial not null primary key, no_orig_date boolean not null default false, date_entered timestamp not null default NOW(), num_comments integer not null default 0, - comments varchar(250) not null default ''); + comments varchar(250) not null default '', + author varchar(250) not null default ''); create index ttrss_entries_guid_index on ttrss_entries(guid); create index ttrss_entries_title_index on ttrss_entries(title); diff --git a/schema/upgrade-1.1.2-1.1.3-mysql.sql b/schema/upgrade-1.1.2-1.1.3-mysql.sql deleted file mode 100644 index e3ddb035..00000000 --- a/schema/upgrade-1.1.2-1.1.3-mysql.sql +++ /dev/null @@ -1,12 +0,0 @@ -begin; - -create table ttrss_scheduled_updates (id integer not null primary key auto_increment, - owner_uid integer not null, - feed_id integer default null, - entered datetime not null, - foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE, - foreign key (feed_id) references ttrss_feeds(id) ON DELETE CASCADE) TYPE=InnoDB; - -update ttrss_version set schema_version = 5; - -commit; diff --git a/schema/upgrade-1.1.2-1.1.3-pgsql.sql b/schema/upgrade-1.1.2-1.1.3-pgsql.sql deleted file mode 100644 index 1292daa3..00000000 --- a/schema/upgrade-1.1.2-1.1.3-pgsql.sql +++ /dev/null @@ -1,10 +0,0 @@ -begin; - -create table ttrss_scheduled_updates (id serial not null primary key, - owner_uid integer not null references ttrss_users(id) ON DELETE CASCADE, - feed_id integer default null references ttrss_feeds(id) ON DELETE CASCADE, - entered timestamp not null default NOW()); - -update ttrss_version set schema_version = 5; - -commit; diff --git a/schema/upgrade-1.1.3-1.1.4-mysql.sql b/schema/upgrade-1.1.3-1.1.4-mysql.sql new file mode 100644 index 00000000..a4e2e7ab --- /dev/null +++ b/schema/upgrade-1.1.3-1.1.4-mysql.sql @@ -0,0 +1,9 @@ +alter table ttrss_entries add column author varchar(250); + +update ttrss_entries set author = ;;; + +alter table ttrss_entries change author author varchar(250) not null; +alter table ttrss_entries alter column author set default ''; + +update ttrss_version set schema_version = 6; + diff --git a/schema/upgrade-1.1.3-1.1.4-pgsql.sql b/schema/upgrade-1.1.3-1.1.4-pgsql.sql new file mode 100644 index 00000000..92025c4a --- /dev/null +++ b/schema/upgrade-1.1.3-1.1.4-pgsql.sql @@ -0,0 +1,12 @@ +begin; + +alter table ttrss_entries add column author varchar(250); + +update ttrss_entries set author = ''; + +alter table ttrss_entries alter column author set not null; +alter table ttrss_entries alter column author set default ''; + +update ttrss_version set schema_version = 6; + +commit;