schema: wrap table creation in transaction block
This commit is contained in:
parent
e93a3c96bb
commit
855d0ecfda
|
@ -16,6 +16,8 @@ drop table if exists ttrss_feed_categories;
|
||||||
drop table if exists ttrss_users;
|
drop table if exists ttrss_users;
|
||||||
drop table if exists ttrss_themes;
|
drop table if exists ttrss_themes;
|
||||||
|
|
||||||
|
begin;
|
||||||
|
|
||||||
create table ttrss_themes(id integer not null primary key auto_increment,
|
create table ttrss_themes(id integer not null primary key auto_increment,
|
||||||
theme_name varchar(200) not null,
|
theme_name varchar(200) not null,
|
||||||
theme_path varchar(200) not null) TYPE=InnoDB;
|
theme_path varchar(200) not null) TYPE=InnoDB;
|
||||||
|
@ -235,4 +237,4 @@ create table ttrss_user_prefs (
|
||||||
index (pref_name),
|
index (pref_name),
|
||||||
foreign key (pref_name) references ttrss_prefs(pref_name) ON DELETE CASCADE) TYPE=InnoDB;
|
foreign key (pref_name) references ttrss_prefs(pref_name) ON DELETE CASCADE) TYPE=InnoDB;
|
||||||
|
|
||||||
|
commit;
|
||||||
|
|
|
@ -16,6 +16,8 @@ drop table ttrss_feed_categories;
|
||||||
drop table ttrss_users;
|
drop table ttrss_users;
|
||||||
drop table ttrss_themes;
|
drop table ttrss_themes;
|
||||||
|
|
||||||
|
begin;
|
||||||
|
|
||||||
create table ttrss_themes(id serial not null primary key,
|
create table ttrss_themes(id serial not null primary key,
|
||||||
theme_name varchar(200) not null,
|
theme_name varchar(200) not null,
|
||||||
theme_path varchar(200) not null);
|
theme_path varchar(200) not null);
|
||||||
|
@ -214,4 +216,4 @@ create table ttrss_user_prefs (
|
||||||
create index ttrss_user_prefs_owner_uid_index on ttrss_user_prefs(owner_uid);
|
create index ttrss_user_prefs_owner_uid_index on ttrss_user_prefs(owner_uid);
|
||||||
create index ttrss_user_prefs_value_index on ttrss_user_prefs(value);
|
create index ttrss_user_prefs_value_index on ttrss_user_prefs(value);
|
||||||
|
|
||||||
|
commit;
|
||||||
|
|
Loading…
Reference in New Issue