From 81dde650b6eea3c8623e3b173d8e9bc93a69f616 Mon Sep 17 00:00:00 2001
From: Andrew Dolgov <fox@bah.spb.su>
Date: Wed, 23 Nov 2005 13:51:50 +0100
Subject: fix table drop order in schema

---
 schema/ttrss_schema_pgsql.sql | 28 +++++++++-------------------
 1 file changed, 9 insertions(+), 19 deletions(-)

(limited to 'schema/ttrss_schema_pgsql.sql')

diff --git a/schema/ttrss_schema_pgsql.sql b/schema/ttrss_schema_pgsql.sql
index cd1ea5506..d761576c1 100644
--- a/schema/ttrss_schema_pgsql.sql
+++ b/schema/ttrss_schema_pgsql.sql
@@ -1,16 +1,17 @@
+drop table ttrss_version;
+drop table ttrss_labels;
+drop table ttrss_filters;
+drop table ttrss_filter_types;
+drop table ttrss_user_prefs;
+drop table ttrss_prefs;
+drop table ttrss_prefs_types;
+drop table ttrss_prefs_sections; 
 drop table ttrss_tags;
-
-drop table ttrss_user_entries;
 drop table ttrss_entry_comments;
+drop table ttrss_user_entries;
 drop table ttrss_entries;
-
 drop table ttrss_feeds;
-drop table ttrss_labels;
-drop table ttrss_filters;
 drop table ttrss_feed_categories;
-drop table ttrss_feeds;
-
-drop table ttrss_user_prefs;
 drop table ttrss_users;
 
 create table ttrss_users (id serial not null primary key,
@@ -84,9 +85,6 @@ create table ttrss_entry_comments (id serial not null primary key,
 create index ttrss_entry_comments_ref_id_index on ttrss_entry_comments(ref_id);
 create index ttrss_entry_comments_owner_uid_index on ttrss_entry_comments(owner_uid);
 
-drop table ttrss_filters;
-drop table ttrss_filter_types;
-
 create table ttrss_filter_types (id integer not null primary key, 
 	name varchar(120) unique not null, 
 	description varchar(250) not null unique);
@@ -105,8 +103,6 @@ create table ttrss_filters (id serial not null primary key,
 	reg_exp varchar(250) not null,
 	description varchar(250) not null default '');
 
-drop table ttrss_labels;
-
 create table ttrss_labels (id serial not null primary key, 
 	owner_uid integer not null references ttrss_users(id) on delete cascade,
 	sql_exp varchar(250) not null,
@@ -127,16 +123,10 @@ create table ttrss_tags (id serial not null primary key,
 
 create index ttrss_tags_owner_uid_index on ttrss_tags(owner_uid);
 
-drop table ttrss_version;
-
 create table ttrss_version (schema_version int not null);
 
 insert into ttrss_version values (2);
 
-drop table ttrss_prefs;
-drop table ttrss_prefs_types;
-drop table ttrss_prefs_sections;
-
 create table ttrss_prefs_types (id integer not null primary key, 
 	type_name varchar(100) not null);
 
-- 
cgit v1.2.3

