aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLite/Resources/EstateStore.migrations
diff options
context:
space:
mode:
authorAlexRa2010-05-17 17:37:16 +0200
committerAlexRa2010-05-23 11:48:16 +0300
commitebc2b6d4f6ebb0392ec0081bea913d24e9753786 (patch)
tree7faf0a526f0010c0b980f0c18ad6d162cbc30e64 /OpenSim/Data/SQLite/Resources/EstateStore.migrations
parentPrebuild: removed DB-specific test projects, added refs to Data.Tests (diff)
downloadopensim-SC-ebc2b6d4f6ebb0392ec0081bea913d24e9753786.zip
opensim-SC-ebc2b6d4f6ebb0392ec0081bea913d24e9753786.tar.gz
opensim-SC-ebc2b6d4f6ebb0392ec0081bea913d24e9753786.tar.bz2
opensim-SC-ebc2b6d4f6ebb0392ec0081bea913d24e9753786.tar.xz
Split migrations for RegionStore and EstateStore (see WARNING!)
ok, so the estate stores now want their own migration files, but as it happened the SQL definition were inside the Region migrations. It seems better/cleaner to keep each 'store' separately updatable. WARNING: any editing in the middle of the migration scripts (as opposite to just appending to them) has the potential of messing up updates of existing databases. As far as I can see, this one is (probably) safe, the worst that could happen is the EstateStore migration silently fail if the estate the tables are already there.
Diffstat (limited to 'OpenSim/Data/SQLite/Resources/EstateStore.migrations')
-rw-r--r--OpenSim/Data/SQLite/Resources/EstateStore.migrations88
1 files changed, 88 insertions, 0 deletions
diff --git a/OpenSim/Data/SQLite/Resources/EstateStore.migrations b/OpenSim/Data/SQLite/Resources/EstateStore.migrations
new file mode 100644
index 0000000..62f6464
--- /dev/null
+++ b/OpenSim/Data/SQLite/Resources/EstateStore.migrations
@@ -0,0 +1,88 @@
1:VERSION 6
2
3BEGIN TRANSACTION;
4
5CREATE TABLE estate_groups (
6 EstateID int(10) NOT NULL,
7 uuid char(36) NOT NULL
8);
9
10CREATE TABLE estate_managers (
11 EstateID int(10) NOT NULL,
12 uuid char(36) NOT NULL
13);
14
15CREATE TABLE estate_map (
16 RegionID char(36) NOT NULL default '00000000-0000-0000-0000-000000000000',
17 EstateID int(11) NOT NULL
18);
19
20CREATE TABLE estate_settings (
21 EstateID INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
22 EstateName varchar(64) default NULL,
23 AbuseEmailToEstateOwner tinyint(4) NOT NULL,
24 DenyAnonymous tinyint(4) NOT NULL,
25 ResetHomeOnTeleport tinyint(4) NOT NULL,
26 FixedSun tinyint(4) NOT NULL,
27 DenyTransacted tinyint(4) NOT NULL,
28 BlockDwell tinyint(4) NOT NULL,
29 DenyIdentified tinyint(4) NOT NULL,
30 AllowVoice tinyint(4) NOT NULL,
31 UseGlobalTime tinyint(4) NOT NULL,
32 PricePerMeter int(11) NOT NULL,
33 TaxFree tinyint(4) NOT NULL,
34 AllowDirectTeleport tinyint(4) NOT NULL,
35 RedirectGridX int(11) NOT NULL,
36 RedirectGridY int(11) NOT NULL,
37 ParentEstateID int(10) NOT NULL,
38 SunPosition double NOT NULL,
39 EstateSkipScripts tinyint(4) NOT NULL,
40 BillableFactor float NOT NULL,
41 PublicAccess tinyint(4) NOT NULL
42);
43
44insert into estate_settings (
45 EstateID,EstateName,AbuseEmailToEstateOwner,DenyAnonymous,ResetHomeOnTeleport,FixedSun,DenyTransacted,BlockDwell,DenyIdentified,AllowVoice,UseGlobalTime,PricePerMeter,TaxFree,AllowDirectTeleport,RedirectGridX,RedirectGridY,ParentEstateID,SunPosition,PublicAccess,EstateSkipScripts,BillableFactor)
46 values ( 99, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '');
47delete from estate_settings;
48
49CREATE TABLE estate_users (
50 EstateID int(10) NOT NULL,
51 uuid char(36) NOT NULL
52);
53
54CREATE TABLE estateban (
55 EstateID int(10) NOT NULL,
56 bannedUUID varchar(36) NOT NULL,
57 bannedIp varchar(16) NOT NULL,
58 bannedIpHostMask varchar(16) NOT NULL,
59 bannedNameMask varchar(64) default NULL
60);
61
62CREATE INDEX estate_ban_estate_id on estateban(EstateID);
63CREATE INDEX estate_groups_estate_id on estate_groups(EstateID);
64CREATE INDEX estate_managers_estate_id on estate_managers(EstateID);
65CREATE INDEX estate_map_estate_id on estate_map(EstateID);
66CREATE UNIQUE INDEX estate_map_region_id on estate_map(RegionID);
67CREATE INDEX estate_users_estate_id on estate_users(EstateID);
68
69COMMIT;
70
71
72:VERSION 7
73
74begin;
75
76alter table estate_settings add column AbuseEmail varchar(255) not null default '';
77
78alter table estate_settings add column EstateOwner varchar(36) not null default '';
79
80commit;
81
82:VERSION 8
83
84begin;
85
86alter table estate_settings add column DenyMinors tinyint not null default 0;
87
88commit;