diff options
author | Sean Dague | 2008-04-02 15:24:31 +0000 |
---|---|---|
committer | Sean Dague | 2008-04-02 15:24:31 +0000 |
commit | c52c68f314c67c76c7181a6d0828f476290fbd66 (patch) | |
tree | 66ab347502892902a096fa985f31b25738eb1381 /OpenSim/Data/MySQL/Resources/UpgradeRegionsTableToVersion3.sql | |
parent | reorganizing namespaces to put all the Data stuff into it's own namespace (diff) | |
download | opensim-SC_OLD-c52c68f314c67c76c7181a6d0828f476290fbd66.zip opensim-SC_OLD-c52c68f314c67c76c7181a6d0828f476290fbd66.tar.gz opensim-SC_OLD-c52c68f314c67c76c7181a6d0828f476290fbd66.tar.bz2 opensim-SC_OLD-c52c68f314c67c76c7181a6d0828f476290fbd66.tar.xz |
whole lot more moving
Diffstat (limited to 'OpenSim/Data/MySQL/Resources/UpgradeRegionsTableToVersion3.sql')
-rw-r--r-- | OpenSim/Data/MySQL/Resources/UpgradeRegionsTableToVersion3.sql | 18 |
1 files changed, 18 insertions, 0 deletions
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 @@ | |||
1 | DROP PROCEDURE IF EXISTS upgraderegions3; | ||
2 | |||
3 | create procedure upgraderegions3() | ||
4 | BEGIN | ||
5 | DECLARE db_name varchar(64); | ||
6 | select database() into db_name; | ||
7 | IF ((select count(*) from information_schema.columns where table_name='regions' and column_name='owner_uuid' and table_schema=db_name) > 0) | ||
8 | THEN | ||
9 | ALTER TABLE `regions`, COMMENT='Rev. 3'; | ||
10 | ELSE | ||
11 | ALTER TABLE `regions` | ||
12 | ADD COLUMN `owner_uuid` varchar(36) default '00000000-0000-0000-0000-000000000000' not null after serverRemotingPort, COMMENT='Rev. 3'; | ||
13 | END IF; | ||
14 | END; | ||
15 | |||
16 | call upgraderegions3(); | ||
17 | |||
18 | |||