From c52c68f314c67c76c7181a6d0828f476290fbd66 Mon Sep 17 00:00:00 2001
From: Sean Dague
Date: Wed, 2 Apr 2008 15:24:31 +0000
Subject: whole lot more moving

---
 .../MySQL/Resources/UpgradeRegionsTableToVersion3.sql  | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 OpenSim/Data/MySQL/Resources/UpgradeRegionsTableToVersion3.sql

(limited to 'OpenSim/Data/MySQL/Resources/UpgradeRegionsTableToVersion3.sql')

diff --git a/OpenSim/Data/MySQL/Resources/UpgradeRegionsTableToVersion3.sql b/OpenSim/Data/MySQL/Resources/UpgradeRegionsTableToVersion3.sql
new file mode 100644
index 0000000..b48afec
--- /dev/null
+++ b/OpenSim/Data/MySQL/Resources/UpgradeRegionsTableToVersion3.sql
@@ -0,0 +1,18 @@
+DROP PROCEDURE IF EXISTS upgraderegions3;
+
+create procedure upgraderegions3()
+BEGIN
+DECLARE db_name varchar(64);
+select database() into db_name;
+IF ((select count(*) from information_schema.columns where table_name='regions' and column_name='owner_uuid' and table_schema=db_name) > 0)
+THEN
+    ALTER TABLE `regions`, COMMENT='Rev. 3';
+ELSE
+    ALTER TABLE `regions`
+        ADD COLUMN `owner_uuid` varchar(36) default '00000000-0000-0000-0000-000000000000' not null after serverRemotingPort, COMMENT='Rev. 3';
+END IF;
+END; 
+
+call upgraderegions3();
+
+
-- 
cgit v1.1

