mirror of
https://github.com/opensim/opensim.git
synced 2026-07-07 13:15:47 +08:00
Fix to solve mantis 717 problem. Makes sure the region DB schema is up to date and consistent
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user