From 9507ab7f9272556ab0ea28a3688b995b4a14538a Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 1 Apr 2011 15:25:19 +0400 Subject: [PATCH] schema: remove ttrss_themes --- schema/ttrss_schema_mysql.sql | 12 +----------- schema/ttrss_schema_pgsql.sql | 12 +----------- schema/versions/mysql/83.sql | 3 +++ schema/versions/pgsql/83.sql | 3 +++ 4 files changed, 8 insertions(+), 22 deletions(-) diff --git a/schema/ttrss_schema_mysql.sql b/schema/ttrss_schema_mysql.sql index 4b528f94..0e176087 100644 --- a/schema/ttrss_schema_mysql.sql +++ b/schema/ttrss_schema_mysql.sql @@ -32,15 +32,6 @@ drop table if exists ttrss_sessions; begin; -create table ttrss_themes(id integer not null primary key auto_increment, - theme_name varchar(200) not null, - theme_path varchar(200) not null) TYPE=InnoDB DEFAULT CHARSET=UTF8; - -insert into ttrss_themes (theme_name, theme_path) values ('Old-skool', 'compat'); -insert into ttrss_themes (theme_name, theme_path) values ('Graycube', 'graycube'); -insert into ttrss_themes (theme_name, theme_path) values ('Default (Compact)', 'compact'); -insert into ttrss_themes (theme_name, theme_path) values ('Three-pane', '3pane'); - create table ttrss_users (id integer primary key not null auto_increment, login varchar(120) not null unique, pwd_hash varchar(250) not null, @@ -53,8 +44,7 @@ create table ttrss_users (id integer primary key not null auto_increment, last_digest_sent datetime default null, created datetime default null, twitter_oauth longtext default null, - index (theme_id), - foreign key (theme_id) references ttrss_themes(id)) TYPE=InnoDB DEFAULT CHARSET=UTF8; + index (theme_id)) TYPE=InnoDB DEFAULT CHARSET=UTF8; insert into ttrss_users (login,pwd_hash,access_level) values ('admin', 'SHA1:5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8', 10); diff --git a/schema/ttrss_schema_pgsql.sql b/schema/ttrss_schema_pgsql.sql index bb870703..57621342 100644 --- a/schema/ttrss_schema_pgsql.sql +++ b/schema/ttrss_schema_pgsql.sql @@ -30,15 +30,6 @@ drop function SUBSTRING_FOR_DATE(timestamp, int, int); begin; -create table ttrss_themes(id serial not null primary key, - theme_name varchar(200) not null, - theme_path varchar(200) not null); - -insert into ttrss_themes (theme_name, theme_path) values ('Old-skool', 'compat'); -insert into ttrss_themes (theme_name, theme_path) values ('Graycube', 'graycube'); -insert into ttrss_themes (theme_name, theme_path) values ('Default (Compact)', 'compact'); -insert into ttrss_themes (theme_name, theme_path) values ('Three-pane', '3pane'); - create table ttrss_users (id serial not null primary key, login varchar(120) not null unique, pwd_hash varchar(250) not null, @@ -49,8 +40,7 @@ create table ttrss_users (id serial not null primary key, email_digest boolean not null default false, last_digest_sent timestamp default null, twitter_oauth text default null, - created timestamp default null, - theme_id integer references ttrss_themes(id) default null); + created timestamp default null); insert into ttrss_users (login,pwd_hash,access_level) values ('admin', 'SHA1:5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8', 10); diff --git a/schema/versions/mysql/83.sql b/schema/versions/mysql/83.sql index 6457539a..6c7d5ce4 100644 --- a/schema/versions/mysql/83.sql +++ b/schema/versions/mysql/83.sql @@ -24,6 +24,9 @@ update ttrss_feeds set pubsub_state = 0; alter table ttrss_feeds change pubsub_state pubsub_state integer not null; alter table ttrss_feeds alter column pubsub_state set default 0; +alter table ttrss_users drop column theme_id; +drop table ttrss_themes; + update ttrss_version set schema_version = 83; commit; diff --git a/schema/versions/pgsql/83.sql b/schema/versions/pgsql/83.sql index c622f813..a8908655 100644 --- a/schema/versions/pgsql/83.sql +++ b/schema/versions/pgsql/83.sql @@ -24,6 +24,9 @@ update ttrss_feeds set pubsub_state = 0; alter table ttrss_feeds alter column pubsub_state set not null; alter table ttrss_feeds alter column pubsub_state set default 0; +alter table ttrss_users drop column theme_id; +drop table ttrss_themes; + update ttrss_version set schema_version = 83; commit; -- 2.39.5