aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Data.MySQL/Resources/UpgradeRegionsTableToVersion3.sql
diff options
context:
space:
mode:
authorJohan Berntsson2008-03-07 08:10:52 +0000
committerJohan Berntsson2008-03-07 08:10:52 +0000
commitb99455d23d57d10c221929a9233520026aed2cd4 (patch)
tree681bea0b0dfcaf3c13c6d86afe9f7862138eca77 /OpenSim/Framework/Data.MySQL/Resources/UpgradeRegionsTableToVersion3.sql
parent* Fix for exception in landmanager crash. (diff)
downloadopensim-SC-b99455d23d57d10c221929a9233520026aed2cd4.zip
opensim-SC-b99455d23d57d10c221929a9233520026aed2cd4.tar.gz
opensim-SC-b99455d23d57d10c221929a9233520026aed2cd4.tar.bz2
opensim-SC-b99455d23d57d10c221929a9233520026aed2cd4.tar.xz
Fix to solve mantis 717 problem. Makes sure the region DB schema is up to date and consistent
Diffstat (limited to 'OpenSim/Framework/Data.MySQL/Resources/UpgradeRegionsTableToVersion3.sql')
-rw-r--r--OpenSim/Framework/Data.MySQL/Resources/UpgradeRegionsTableToVersion3.sql18
1 files changed, 18 insertions, 0 deletions
diff --git a/OpenSim/Framework/Data.MySQL/Resources/UpgradeRegionsTableToVersion3.sql b/OpenSim/Framework/Data.MySQL/Resources/UpgradeRegionsTableToVersion3.sql
new file mode 100644
index 0000000..b48afec
--- /dev/null
+++ b/OpenSim/Framework/Data.MySQL/Resources/UpgradeRegionsTableToVersion3.sql
@@ -0,0 +1,18 @@
1DROP PROCEDURE IF EXISTS upgraderegions3;
2
3create procedure upgraderegions3()
4BEGIN
5DECLARE db_name varchar(64);
6select database() into db_name;
7IF ((select count(*) from information_schema.columns where table_name='regions' and column_name='owner_uuid' and table_schema=db_name) > 0)
8THEN
9 ALTER TABLE `regions`, COMMENT='Rev. 3';
10ELSE
11 ALTER TABLE `regions`
12 ADD COLUMN `owner_uuid` varchar(36) default '00000000-0000-0000-0000-000000000000' not null after serverRemotingPort, COMMENT='Rev. 3';
13END IF;
14END;
15
16call upgraderegions3();
17
18