From b7e7c8f9501850a38705e0a1f18a8ae6e25f1be1 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Wed, 9 Jan 2013 15:57:29 +0100
Subject: Added new database upgrade script, converted DDL scripts to new
 format

---
 SQL/sqlite/2013011000.sql | 6 ++++++
 1 file changed, 6 insertions(+)
 create mode 100644 SQL/sqlite/2013011000.sql

(limited to 'SQL/sqlite/2013011000.sql')

diff --git a/SQL/sqlite/2013011000.sql b/SQL/sqlite/2013011000.sql
new file mode 100644
index 000000000..2c66ef95e
--- /dev/null
+++ b/SQL/sqlite/2013011000.sql
@@ -0,0 +1,6 @@
+-- Updates from version 0.9-beta
+
+CREATE TABLE system (
+  name varchar(64) NOT NULL PRIMARY KEY,
+  value text NOT NULL
+);
-- 
cgit v1.2.3


From bcfdac6660b2c3d1527d1e993f63f345992d0afa Mon Sep 17 00:00:00 2001
From: Thomas Bruederli <thomas@roundcube.net>
Date: Thu, 28 Mar 2013 17:42:09 +0100
Subject: Add 'if not exists' to system table creation. Just in case some
 previous db update routine was aborted or failed

---
 SQL/mysql/2013011000.sql  | 2 +-
 SQL/sqlite/2013011000.sql | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

(limited to 'SQL/sqlite/2013011000.sql')

diff --git a/SQL/mysql/2013011000.sql b/SQL/mysql/2013011000.sql
index f0b5e6a03..d1ea001db 100644
--- a/SQL/mysql/2013011000.sql
+++ b/SQL/mysql/2013011000.sql
@@ -1,6 +1,6 @@
 -- Upgrade from 0.9-beta
 
-CREATE TABLE `system` (
+CREATE TABLE IF NOT EXISTS `system` (
  `name` varchar(64) NOT NULL,
  `value` mediumtext,
  PRIMARY KEY(`name`)
diff --git a/SQL/sqlite/2013011000.sql b/SQL/sqlite/2013011000.sql
index 2c66ef95e..ec261a635 100644
--- a/SQL/sqlite/2013011000.sql
+++ b/SQL/sqlite/2013011000.sql
@@ -1,6 +1,6 @@
 -- Updates from version 0.9-beta
 
-CREATE TABLE system (
+CREATE TABLE IF NOT EXISTS system (
   name varchar(64) NOT NULL PRIMARY KEY,
   value text NOT NULL
 );
-- 
cgit v1.2.3

