[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Add 'IF NOT EXISTS' to table creation

2016-09-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add 'IF NOT EXISTS' to table creation
..


Add 'IF NOT EXISTS' to table creation

Because too lazy for proper schema migration

Change-Id: Ic25887e9f591c6997dc19172c442de71f59cf25b
---
M Schema/mysql/001_CreatePendingTable.sql
M Schema/mysql/002_CreateDamagedTable.sql
M Schema/mysql/003_CreatePaymentsInitialTable.sql
M Schema/sqlite/001_CreatePendingTable.sql
M Schema/sqlite/002_CreateDamagedTable.sql
M Schema/sqlite/003_CreatePaymentsInitialTable.sql
6 files changed, 6 insertions(+), 6 deletions(-)

Approvals:
  Awight: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/Schema/mysql/001_CreatePendingTable.sql 
b/Schema/mysql/001_CreatePendingTable.sql
index f39d495..76dd361 100644
--- a/Schema/mysql/001_CreatePendingTable.sql
+++ b/Schema/mysql/001_CreatePendingTable.sql
@@ -1,4 +1,4 @@
-CREATE TABLE pending (
+CREATE TABLE IF NOT EXISTS pending (
   `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
   `date` datetime NOT NULL,
   `gateway` varchar(255) NOT NULL,
diff --git a/Schema/mysql/002_CreateDamagedTable.sql 
b/Schema/mysql/002_CreateDamagedTable.sql
index 138966b..677a8e6 100644
--- a/Schema/mysql/002_CreateDamagedTable.sql
+++ b/Schema/mysql/002_CreateDamagedTable.sql
@@ -1,4 +1,4 @@
-CREATE TABLE damaged (
+CREATE TABLE IF NOT EXISTS damaged (
   `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
   `original_date` datetime NOT NULL,
   `damaged_date` datetime NOT NULL,
diff --git a/Schema/mysql/003_CreatePaymentsInitialTable.sql 
b/Schema/mysql/003_CreatePaymentsInitialTable.sql
index cac4ebc..26bc744 100644
--- a/Schema/mysql/003_CreatePaymentsInitialTable.sql
+++ b/Schema/mysql/003_CreatePaymentsInitialTable.sql
@@ -1,4 +1,4 @@
-CREATE TABLE payments_initial (
+CREATE TABLE IF NOT EXISTS payments_initial (
   `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
   `contribution_tracking_id` int(11) DEFAULT NULL,
   `gateway` varchar(255) DEFAULT NULL,
diff --git a/Schema/sqlite/001_CreatePendingTable.sql 
b/Schema/sqlite/001_CreatePendingTable.sql
index c6e7b41..0edcd69 100644
--- a/Schema/sqlite/001_CreatePendingTable.sql
+++ b/Schema/sqlite/001_CreatePendingTable.sql
@@ -1,4 +1,4 @@
-CREATE TABLE pending (
+CREATE TABLE IF NOT EXISTS pending (
   `id` integer primary key,
   `date` datetime NOT NULL,
   `gateway` varchar(255) NOT NULL,
diff --git a/Schema/sqlite/002_CreateDamagedTable.sql 
b/Schema/sqlite/002_CreateDamagedTable.sql
index 64eb97f..e13a8bb 100644
--- a/Schema/sqlite/002_CreateDamagedTable.sql
+++ b/Schema/sqlite/002_CreateDamagedTable.sql
@@ -1,4 +1,4 @@
-CREATE TABLE damaged (
+CREATE TABLE IF NOT EXISTS damaged (
   `id` integer primary key,
   `original_date` datetime NOT NULL,
   `damaged_date` datetime NOT NULL,
diff --git a/Schema/sqlite/003_CreatePaymentsInitialTable.sql 
b/Schema/sqlite/003_CreatePaymentsInitialTable.sql
index c3ecd22..b06d6e6 100644
--- a/Schema/sqlite/003_CreatePaymentsInitialTable.sql
+++ b/Schema/sqlite/003_CreatePaymentsInitialTable.sql
@@ -1,4 +1,4 @@
-CREATE TABLE payments_initial (
+CREATE TABLE IF NOT EXISTS payments_initial (
   `id` integer primary key,
   `contribution_tracking_id` integer NULL,
   `gateway` varchar(255) NULL,

-- 
To view, visit https://gerrit.wikimedia.org/r/310707
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic25887e9f591c6997dc19172c442de71f59cf25b
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Springle 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Add 'IF NOT EXISTS' to table creation

2016-09-14 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/310707

Change subject: Add 'IF NOT EXISTS' to table creation
..

Add 'IF NOT EXISTS' to table creation

Because too lazy for proper schema migration

Change-Id: Ic25887e9f591c6997dc19172c442de71f59cf25b
---
M Schema/mysql/001_CreatePendingTable.sql
M Schema/mysql/002_CreateDamagedTable.sql
M Schema/mysql/003_CreatePaymentsInitialTable.sql
M Schema/sqlite/001_CreatePendingTable.sql
M Schema/sqlite/002_CreateDamagedTable.sql
M Schema/sqlite/003_CreatePaymentsInitialTable.sql
6 files changed, 6 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/07/310707/1

diff --git a/Schema/mysql/001_CreatePendingTable.sql 
b/Schema/mysql/001_CreatePendingTable.sql
index f39d495..76dd361 100644
--- a/Schema/mysql/001_CreatePendingTable.sql
+++ b/Schema/mysql/001_CreatePendingTable.sql
@@ -1,4 +1,4 @@
-CREATE TABLE pending (
+CREATE TABLE IF NOT EXISTS pending (
   `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
   `date` datetime NOT NULL,
   `gateway` varchar(255) NOT NULL,
diff --git a/Schema/mysql/002_CreateDamagedTable.sql 
b/Schema/mysql/002_CreateDamagedTable.sql
index 138966b..677a8e6 100644
--- a/Schema/mysql/002_CreateDamagedTable.sql
+++ b/Schema/mysql/002_CreateDamagedTable.sql
@@ -1,4 +1,4 @@
-CREATE TABLE damaged (
+CREATE TABLE IF NOT EXISTS damaged (
   `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
   `original_date` datetime NOT NULL,
   `damaged_date` datetime NOT NULL,
diff --git a/Schema/mysql/003_CreatePaymentsInitialTable.sql 
b/Schema/mysql/003_CreatePaymentsInitialTable.sql
index cac4ebc..26bc744 100644
--- a/Schema/mysql/003_CreatePaymentsInitialTable.sql
+++ b/Schema/mysql/003_CreatePaymentsInitialTable.sql
@@ -1,4 +1,4 @@
-CREATE TABLE payments_initial (
+CREATE TABLE IF NOT EXISTS payments_initial (
   `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
   `contribution_tracking_id` int(11) DEFAULT NULL,
   `gateway` varchar(255) DEFAULT NULL,
diff --git a/Schema/sqlite/001_CreatePendingTable.sql 
b/Schema/sqlite/001_CreatePendingTable.sql
index c6e7b41..0edcd69 100644
--- a/Schema/sqlite/001_CreatePendingTable.sql
+++ b/Schema/sqlite/001_CreatePendingTable.sql
@@ -1,4 +1,4 @@
-CREATE TABLE pending (
+CREATE TABLE IF NOT EXISTS pending (
   `id` integer primary key,
   `date` datetime NOT NULL,
   `gateway` varchar(255) NOT NULL,
diff --git a/Schema/sqlite/002_CreateDamagedTable.sql 
b/Schema/sqlite/002_CreateDamagedTable.sql
index 64eb97f..e13a8bb 100644
--- a/Schema/sqlite/002_CreateDamagedTable.sql
+++ b/Schema/sqlite/002_CreateDamagedTable.sql
@@ -1,4 +1,4 @@
-CREATE TABLE damaged (
+CREATE TABLE IF NOT EXISTS damaged (
   `id` integer primary key,
   `original_date` datetime NOT NULL,
   `damaged_date` datetime NOT NULL,
diff --git a/Schema/sqlite/003_CreatePaymentsInitialTable.sql 
b/Schema/sqlite/003_CreatePaymentsInitialTable.sql
index c3ecd22..b06d6e6 100644
--- a/Schema/sqlite/003_CreatePaymentsInitialTable.sql
+++ b/Schema/sqlite/003_CreatePaymentsInitialTable.sql
@@ -1,4 +1,4 @@
-CREATE TABLE payments_initial (
+CREATE TABLE IF NOT EXISTS payments_initial (
   `id` integer primary key,
   `contribution_tracking_id` integer NULL,
   `gateway` varchar(255) NULL,

-- 
To view, visit https://gerrit.wikimedia.org/r/310707
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic25887e9f591c6997dc19172c442de71f59cf25b
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits