aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDavid Walter Seikel2013-03-15 01:05:46 +1000
committerDavid Walter Seikel2013-03-15 01:05:46 +1000
commit532787d4d1d0b59d9610f76276c2fd65fa039fb5 (patch)
tree86544df6f7785c21564ef22d8b3b2c9f1caef217
parentAdd backups directory. (diff)
downloadopensim-SC_OLD-532787d4d1d0b59d9610f76276c2fd65fa039fb5.zip
opensim-SC_OLD-532787d4d1d0b59d9610f76276c2fd65fa039fb5.tar.gz
opensim-SC_OLD-532787d4d1d0b59d9610f76276c2fd65fa039fb5.tar.bz2
opensim-SC_OLD-532787d4d1d0b59d9610f76276c2fd65fa039fb5.tar.xz
Add the SQL update scripts.
-rw-r--r--sql/groups.sql111
-rw-r--r--sql/offline.sql5
-rw-r--r--sql/osprofile.sql68
-rw-r--r--sql/ossearch-migrations.sql36
-rw-r--r--sql/ossearch.sql187
-rw-r--r--sql/update-usernotes.sql3
-rw-r--r--sql/update-userprofile.sql2
7 files changed, 412 insertions, 0 deletions
diff --git a/sql/groups.sql b/sql/groups.sql
new file mode 100644
index 0000000..1815203
--- /dev/null
+++ b/sql/groups.sql
@@ -0,0 +1,111 @@
1--
2-- Table structure for table `osagent`
3--
4
5CREATE TABLE `osagent` (
6 `AgentID` char(36) NOT NULL default '',
7 `ActiveGroupID` char(36) NOT NULL default '',
8 PRIMARY KEY (`AgentID`)
9) ENGINE=MyISAM;
10
11-- --------------------------------------------------------
12
13--
14-- Table structure for table `osgroup`
15--
16
17CREATE TABLE `osgroup` (
18 `GroupID` char(36) NOT NULL default '',
19 `Name` varchar(255) NOT NULL default '',
20 `Charter` text NOT NULL,
21 `InsigniaID` char(36) NOT NULL default '',
22 `FounderID` char(36) NOT NULL default '',
23 `MembershipFee` int(11) NOT NULL default '0',
24 `OpenEnrollment` varchar(255) NOT NULL default '',
25 `ShowInList` tinyint(1) NOT NULL default '0',
26 `AllowPublish` tinyint(1) NOT NULL default '0',
27 `MaturePublish` tinyint(1) NOT NULL default '0',
28 `OwnerRoleID` char(36) NOT NULL default '',
29 PRIMARY KEY (`GroupID`),
30 UNIQUE KEY `Name` (`Name`),
31 FULLTEXT KEY `Name_2` (`Name`)
32) ENGINE=MyISAM;
33
34-- --------------------------------------------------------
35
36--
37-- Table structure for table `osgroupinvite`
38--
39
40CREATE TABLE `osgroupinvite` (
41 `InviteID` char(36) NOT NULL default '',
42 `GroupID` char(36) NOT NULL default '',
43 `RoleID` char(36) NOT NULL default '',
44 `AgentID` char(36) NOT NULL default '',
45 `TMStamp` timestamp NOT NULL,
46 PRIMARY KEY (`InviteID`),
47 UNIQUE KEY `GroupID` (`GroupID`,`RoleID`,`AgentID`)
48) ENGINE=MyISAM;
49
50-- --------------------------------------------------------
51
52--
53-- Table structure for table `osgroupmembership`
54--
55
56CREATE TABLE `osgroupmembership` (
57 `GroupID`char(36) NOT NULL default '',
58 `AgentID` char(36) NOT NULL default '',
59 `SelectedRoleID` char(36) NOT NULL default '',
60 `Contribution` int(11) NOT NULL default '0',
61 `ListInProfile` int(11) NOT NULL default '1',
62 `AcceptNotices` int(11) NOT NULL default '1',
63 PRIMARY KEY (`GroupID`,`AgentID`)
64) ENGINE=MyISAM;
65
66-- --------------------------------------------------------
67
68--
69-- Table structure for table `osgroupnotice`
70--
71
72CREATE TABLE `osgroupnotice` (
73 `GroupID` char(36) NOT NULL default '',
74 `NoticeID` char(36) NOT NULL default '',
75 `Timestamp` int(10) unsigned NOT NULL default '0',
76 `FromName` varchar(255) NOT NULL default '',
77 `Subject` varchar(255) NOT NULL default '',
78 `Message` text NOT NULL,
79 `BinaryBucket` text NOT NULL,
80 PRIMARY KEY (`GroupID`,`NoticeID`),
81 KEY `Timestamp` (`Timestamp`)
82) ENGINE=MyISAM;
83
84-- --------------------------------------------------------
85
86--
87-- Table structure for table `osgrouprolemembership`
88--
89
90CREATE TABLE `osgrouprolemembership` (
91 `GroupID` char(36) NOT NULL default '',
92 `RoleID` char(36) NOT NULL default '',
93 `AgentID` char(36) NOT NULL default '',
94 PRIMARY KEY (`GroupID`,`RoleID`,`AgentID`)
95) ENGINE=MyISAM;
96
97-- --------------------------------------------------------
98
99--
100-- Table structure for table `osrole`
101--
102
103CREATE TABLE `osrole` (
104 `GroupID` char(36) NOT NULL default '',
105 `RoleID` char(36) NOT NULL default '',
106 `Name` varchar(255) NOT NULL default '',
107 `Description` varchar(255) NOT NULL default '',
108 `Title` varchar(255) NOT NULL default '',
109 `Powers` bigint(20) unsigned NOT NULL default '0',
110 PRIMARY KEY (`GroupID`,`RoleID`)
111) ENGINE=MyISAM;
diff --git a/sql/offline.sql b/sql/offline.sql
new file mode 100644
index 0000000..2959b54
--- /dev/null
+++ b/sql/offline.sql
@@ -0,0 +1,5 @@
1CREATE TABLE IF NOT EXISTS `Offline_IM` (
2 `uuid` varchar(36) NOT NULL,
3 `message` text NOT NULL,
4 PRIMARY KEY (`uuid`)
5) ENGINE=MyISAM DEFAULT CHARSET=latin1;
diff --git a/sql/osprofile.sql b/sql/osprofile.sql
new file mode 100644
index 0000000..bcd5be0
--- /dev/null
+++ b/sql/osprofile.sql
@@ -0,0 +1,68 @@
1CREATE TABLE IF NOT EXISTS `classifieds` (
2 `classifieduuid` char(36) NOT NULL,
3 `creatoruuid` char(36) NOT NULL,
4 `creationdate` int(20) NOT NULL,
5 `expirationdate` int(20) NOT NULL,
6 `category` varchar(20) NOT NULL,
7 `name` varchar(255) NOT NULL,
8 `description` text NOT NULL,
9 `parceluuid` char(36) NOT NULL,
10 `parentestate` int(11) NOT NULL,
11 `snapshotuuid` char(36) NOT NULL,
12 `simname` varchar(255) NOT NULL,
13 `posglobal` varchar(255) NOT NULL,
14 `parcelname` varchar(255) NOT NULL,
15 `classifiedflags` int(8) NOT NULL,
16 `priceforlisting` int(5) NOT NULL,
17 PRIMARY KEY (`classifieduuid`)
18) ENGINE=MyISAM DEFAULT CHARSET=latin1;
19
20CREATE TABLE IF NOT EXISTS `usernotes` (
21 `useruuid` varchar(36) NOT NULL,
22 `targetuuid` varchar(36) NOT NULL,
23 `notes` text NOT NULL,
24 UNIQUE KEY `useruuid` (`useruuid`,`targetuuid`)
25) ENGINE=MyISAM DEFAULT CHARSET=latin1;
26
27CREATE TABLE IF NOT EXISTS `userpicks` (
28 `pickuuid` varchar(36) NOT NULL,
29 `creatoruuid` varchar(36) NOT NULL,
30 `toppick` enum('true','false') NOT NULL,
31 `parceluuid` varchar(36) NOT NULL,
32 `name` varchar(255) NOT NULL,
33 `description` text NOT NULL,
34 `snapshotuuid` varchar(36) NOT NULL,
35 `user` varchar(255) NOT NULL,
36 `originalname` varchar(255) NOT NULL,
37 `simname` varchar(255) NOT NULL,
38 `posglobal` varchar(255) NOT NULL,
39 `sortorder` int(2) NOT NULL,
40 `enabled` enum('true','false') NOT NULL,
41 PRIMARY KEY (`pickuuid`)
42) ENGINE=MyISAM DEFAULT CHARSET=latin1;
43
44CREATE TABLE IF NOT EXISTS `userprofile` (
45 `useruuid` varchar(36) NOT NULL,
46 `profilePartner` varchar(36) NOT NULL,
47 `profileAllowPublish` binary(1) NOT NULL,
48 `profileMaturePublish` binary(1) NOT NULL,
49 `profileURL` varchar(255) NOT NULL,
50 `profileWantToMask` int(3) NOT NULL,
51 `profileWantToText` text NOT NULL,
52 `profileSkillsMask` int(3) NOT NULL,
53 `profileSkillsText` text NOT NULL,
54 `profileLanguages` text NOT NULL,
55 `profileImage` varchar(36) NOT NULL,
56 `profileAboutText` text NOT NULL,
57 `profileFirstImage` varchar(36) NOT NULL,
58 `profileFirstText` text NOT NULL,
59 PRIMARY KEY (`useruuid`)
60) ENGINE=MyISAM DEFAULT CHARSET=latin1;
61
62CREATE TABLE IF NOT EXISTS `usersettings` (
63 `useruuid` varchar(36) NOT NULL,
64 `imviaemail` enum('true','false') NOT NULL,
65 `visible` enum('true','false') NOT NULL,
66 `email` varchar(254) NOT NULL,
67 PRIMARY KEY (`useruuid`)
68) ENGINE=MyISAM DEFAULT CHARSET=latin1;
diff --git a/sql/ossearch-migrations.sql b/sql/ossearch-migrations.sql
new file mode 100644
index 0000000..65b4cad
--- /dev/null
+++ b/sql/ossearch-migrations.sql
@@ -0,0 +1,36 @@
1#This file updates the tables used by OpenSimSearch to the latest schema.
2#Use this file if you are updating an existing installation of the search
3#module. If you are doing a first time install, use the ossearch.sql file.
4
5#SVN revision 126
6BEGIN;
7ALTER TABLE `parcelsales` CHANGE `mature` `mature` varchar(32) NOT NULL DEFAULT 'PG';
8COMMIT;
9
10#SVN revision 142
11BEGIN;
12ALTER TABLE `hostsregister` DROP `lastcheck`;
13ALTER TABLE `hostsregister` ADD `nextcheck` int(10) NOT NULL AFTER `register`;
14ALTER TABLE `hostsregister` ADD `checked` tinyint(1) NOT NULL AFTER `nextcheck`;
15ALTER TABLE `hostsregister` CHANGE `failcounter` `failcounter` int(10) NOT NULL;
16COMMIT;
17
18#SVN revision 149
19BEGIN;
20ALTER TABLE `events` DROP `mature`;
21ALTER TABLE `events` CHANGE `eventflags` `eventflags` tinyint(1) NOT NULL;
22ALTER TABLE `parcels` ADD `mature` VARCHAR( 10 ) NOT NULL;
23ALTER TABLE `parcelsales` CHANGE `mature` `mature` VARCHAR( 10 ) NOT NULL DEFAULT 'PG';
24ALTER TABLE `popularplaces` CHANGE `has_picture` `has_picture` tinyint(1) NOT NULL;
25COMMIT;
26
27#SVN revision 153
28BEGIN;
29ALTER TABLE `parcels` CHANGE `mature` `mature` VARCHAR( 10 ) NOT NULL DEFAULT 'PG';
30COMMIT;
31
32#SVN revision 154
33BEGIN;
34ALTER TABLE `events` CHANGE `dateUTC` `dateUTC` int(10) NOT NULL;
35ALTER TABLE `events` CHANGE `covercharge` `covercharge` tinyint(1) NOT NULL;
36COMMIT;
diff --git a/sql/ossearch.sql b/sql/ossearch.sql
new file mode 100644
index 0000000..a1ef08f
--- /dev/null
+++ b/sql/ossearch.sql
@@ -0,0 +1,187 @@
1-- phpMyAdmin SQL Dump
2-- version 2.7.0-beta1
3-- http://www.phpmyadmin.net
4--
5-- Host: localhost
6-- Generatie Tijd: 24 Jan 2009 om 15:48
7-- Server versie: 5.0.67
8-- PHP Versie: 5.2.6-2ubuntu5
9--
10-- Database: `ossearch`
11--
12
13-- --------------------------------------------------------
14
15--
16-- Tabel structuur voor tabel `allparcels`
17--
18
19CREATE TABLE `allparcels` (
20 `regionUUID` varchar(255) NOT NULL,
21 `parcelname` varchar(255) NOT NULL,
22 `ownerUUID` char(36) NOT NULL default '00000000-0000-0000-0000-000000000000',
23 `groupUUID` char(36) NOT NULL default '00000000-0000-0000-0000-000000000000',
24 `landingpoint` varchar(255) NOT NULL,
25 `parcelUUID` char(36) NOT NULL default '00000000-0000-0000-0000-000000000000',
26 `infoUUID` char(36) NOT NULL default '00000000-0000-0000-0000-000000000000',
27 `parcelarea` int(11) NOT NULL,
28 PRIMARY KEY (`parcelUUID`),
29 KEY `regionUUID` (`regionUUID`)
30) ENGINE=MyISAM DEFAULT CHARSET=latin1;
31
32-- --------------------------------------------------------
33
34--
35-- Tabel structuur voor tabel `classifieds`
36--
37
38CREATE TABLE `classifieds` (
39 `classifieduuid` char(36) NOT NULL,
40 `creatoruuid` char(36) NOT NULL,
41 `creationdate` int(20) NOT NULL,
42 `expirationdate` int(20) NOT NULL,
43 `category` varchar(20) NOT NULL,
44 `name` varchar(255) NOT NULL,
45 `description` text NOT NULL,
46 `parceluuid` char(36) NOT NULL,
47 `parentestate` int(11) NOT NULL,
48 `snapshotuuid` char(36) NOT NULL,
49 `simname` varchar(255) NOT NULL,
50 `posglobal` varchar(255) NOT NULL,
51 `parcelname` varchar(255) NOT NULL,
52 `classifiedflags` int(8) NOT NULL,
53 `priceforlisting` int(5) NOT NULL,
54 PRIMARY KEY (`classifieduuid`)
55) ENGINE=InnoDB DEFAULT CHARSET=latin1;
56
57-- --------------------------------------------------------
58
59--
60-- Tabel structuur voor tabel `events`
61--
62
63CREATE TABLE `events` (
64 `owneruuid` char(40) NOT NULL,
65 `name` varchar(255) NOT NULL,
66 `eventid` int(11) NOT NULL auto_increment,
67 `creatoruuid` char(40) NOT NULL,
68 `category` int(2) NOT NULL,
69 `description` text NOT NULL,
70 `dateUTC` int(10) NOT NULL,
71 `duration` int(3) NOT NULL,
72 `covercharge` tinyint(1) NOT NULL,
73 `coveramount` int(10) NOT NULL,
74 `simname` varchar(255) NOT NULL,
75 `globalPos` varchar(255) NOT NULL,
76 `eventflags` int(1) NOT NULL,
77 PRIMARY KEY (`eventid`)
78) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
79
80-- --------------------------------------------------------
81
82--
83-- Tabel structuur voor tabel `hostsregister`
84--
85
86CREATE TABLE `hostsregister` (
87 `host` varchar(255) NOT NULL,
88 `port` int(5) NOT NULL,
89 `register` int(10) NOT NULL,
90 `nextcheck` int(10) NOT NULL,
91 `checked` tinyint(1) NOT NULL,
92 `failcounter` int(10) NOT NULL,
93 PRIMARY KEY (`host`,`port`)
94) ENGINE=MyISAM DEFAULT CHARSET=latin1;
95
96-- --------------------------------------------------------
97
98--
99-- Tabel structuur voor tabel `objects`
100--
101
102CREATE TABLE `objects` (
103 `objectuuid` varchar(255) NOT NULL,
104 `parceluuid` varchar(255) NOT NULL,
105 `location` varchar(255) NOT NULL,
106 `name` varchar(255) NOT NULL,
107 `description` varchar(255) NOT NULL,
108 `regionuuid` varchar(255) NOT NULL default '',
109 PRIMARY KEY (`objectuuid`,`parceluuid`)
110) ENGINE=MyISAM DEFAULT CHARSET=latin1;
111
112-- --------------------------------------------------------
113
114--
115-- Tabel structuur voor tabel `parcels`
116--
117
118CREATE TABLE `parcels` (
119 `regionUUID` varchar(255) NOT NULL,
120 `parcelname` varchar(255) NOT NULL,
121 `parcelUUID` varchar(255) NOT NULL,
122 `landingpoint` varchar(255) NOT NULL,
123 `description` varchar(255) NOT NULL,
124 `searchcategory` varchar(50) NOT NULL,
125 `build` enum('true','false') NOT NULL,
126 `script` enum('true','false') NOT NULL,
127 `public` enum('true','false') NOT NULL,
128 `dwell` float NOT NULL default '0',
129 `infouuid` varchar(255) NOT NULL default '',
130 `mature` varchar(10) NOT NULL default 'PG',
131 PRIMARY KEY (`regionUUID`,`parcelUUID`),
132 KEY `name` (`parcelname`),
133 KEY `description` (`description`),
134 KEY `searchcategory` (`searchcategory`),
135 KEY `dwell` (`dwell`)
136) ENGINE=MyISAM DEFAULT CHARSET=latin1;
137
138-- --------------------------------------------------------
139
140--
141-- Tabel structuur voor tabel `parcelsales`
142--
143
144CREATE TABLE `parcelsales` (
145 `regionUUID` varchar(255) NOT NULL,
146 `parcelname` varchar(255) NOT NULL,
147 `parcelUUID` varchar(255) NOT NULL,
148 `area` int(6) NOT NULL,
149 `saleprice` int(11) NOT NULL,
150 `landingpoint` varchar(255) NOT NULL,
151 `infoUUID` char(36) NOT NULL default '00000000-0000-0000-0000-000000000000',
152 `dwell` int(11) NOT NULL,
153 `parentestate` int(11) NOT NULL default '1',
154 `mature` varchar(10) NOT NULL default 'PG',
155 PRIMARY KEY (`regionUUID`,`parcelUUID`)
156) ENGINE=MyISAM DEFAULT CHARSET=latin1;
157
158-- --------------------------------------------------------
159
160--
161-- Tabel structuur voor tabel `popularplaces`
162--
163
164CREATE TABLE `popularplaces` (
165 `parcelUUID` char(36) NOT NULL,
166 `name` varchar(255) NOT NULL,
167 `dwell` float NOT NULL,
168 `infoUUID` char(36) NOT NULL,
169 `has_picture` tinyint(1) NOT NULL,
170 `mature` tinyint(4) NOT NULL
171) ENGINE=MyISAM DEFAULT CHARSET=latin1;
172
173-- --------------------------------------------------------
174
175--
176-- Tabel structuur voor tabel `regions`
177--
178
179CREATE TABLE `osregions` (
180 `regionname` varchar(255) NOT NULL,
181 `regionuuid` varchar(255) NOT NULL,
182 `regionhandle` varchar(255) NOT NULL,
183 `url` varchar(255) NOT NULL,
184 `owner` varchar(255) NOT NULL,
185 `owneruuid` varchar(255) NOT NULL,
186 PRIMARY KEY (`regionuuid`)
187) ENGINE=MyISAM DEFAULT CHARSET=latin1;
diff --git a/sql/update-usernotes.sql b/sql/update-usernotes.sql
new file mode 100644
index 0000000..e4538d9
--- /dev/null
+++ b/sql/update-usernotes.sql
@@ -0,0 +1,3 @@
1ALTER TABLE `usernotes` DROP PRIMARY KEY ;
2ALTER TABLE `usernotes` ADD UNIQUE ( `useruuid` , `targetuuid` );
3
diff --git a/sql/update-userprofile.sql b/sql/update-userprofile.sql
new file mode 100644
index 0000000..1cbe1c2
--- /dev/null
+++ b/sql/update-userprofile.sql
@@ -0,0 +1,2 @@
1ALTER TABLE `userprofile` ADD `profileImage` VARCHAR( 36 ) NOT NULL AFTER `profileLanguages`,
2ADD `profileAboutText` TEXT NOT NULL AFTER `profileImage` ;