From f4450ccf4f76db7f6e18c483ac48f30e0907eb2a Mon Sep 17 00:00:00 2001 From: AlexRa Date: Sun, 16 May 2010 16:22:38 +0300 Subject: Migration.cs supports single-file migration history format Scans for migration resources in either old-style "scattered" (one file per version) or new-style "integrated" format (single file "Resources/{StoreName}.migrations[.nnn]") with ":VERSION nnn" sections). In the new-style migrations it also recognizes ':GO' separators for parts of the SQL script that must be sent to the server separately. The old-style migrations are loaded each in one piece and don't support the ':GO' feature. Status: TESTED and works fine in all modes! --- OpenSim/Data/Migration.cs | 337 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 233 insertions(+), 104 deletions(-) diff --git a/OpenSim/Data/Migration.cs b/OpenSim/Data/Migration.cs index 06defe4..7980c35 100644 --- a/OpenSim/Data/Migration.cs +++ b/OpenSim/Data/Migration.cs @@ -70,61 +70,111 @@ namespace OpenSim.Data public class Migration { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + protected static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - private string _type; - private DbConnection _conn; - // private string _subtype; - private Assembly _assem; - private Regex _match; + protected string _type; + protected DbConnection _conn; + protected Assembly _assem; - private static readonly string _migrations_create = "create table migrations(name varchar(100), version int)"; - // private static readonly string _migrations_init = "insert into migrations values('migrations', 1)"; - // private static readonly string _migrations_find = "select version from migrations where name='migrations'"; + private Regex _match_old; + private Regex _match_new; + /// Have the parameterless constructor just so we can specify it as a generic parameter with the new() constraint. + /// Currently this is only used in the tests. A Migration instance created this way must be then + /// initialized with Initialize(). Regular creation should be through the parameterized constructors. + /// + public Migration() + { + } - public Migration(DbConnection conn, Assembly assem, string type) + public Migration(DbConnection conn, Assembly assem, string subtype, string type) { - _type = type; - _conn = conn; - _assem = assem; - _match = new Regex(@"\.(\d\d\d)_" + _type + @"\.sql"); - Initialize(); + Initialize(conn, assem, type, subtype); } - public Migration(DbConnection conn, Assembly assem, string subtype, string type) + public Migration(DbConnection conn, Assembly assem, string type) + { + Initialize(conn, assem, type, ""); + } + + /// Must be called after creating with the parameterless constructor. + /// NOTE that the Migration class now doesn't access database in any way during initialization. + /// Specifically, it won't check if the [migrations] table exists. Such checks are done later: + /// automatically on Update(), or you can explicitly call InitMigrationsTable(). + /// + /// + /// + /// + /// + public void Initialize (DbConnection conn, Assembly assem, string type, string subtype) { _type = type; _conn = conn; _assem = assem; - _match = new Regex(subtype + @"\.(\d\d\d)_" + _type + @"\.sql"); - Initialize(); + _match_old = new Regex(subtype + @"\.(\d\d\d)_" + _type + @"\.sql"); + string s = String.IsNullOrEmpty(subtype) ? _type : _type + @"\." + subtype; + _match_new = new Regex(@"\." + s + @"\.migrations(?:\.(?\d+)$|.*)"); } - private void Initialize() + public void InitMigrationsTable() { - // clever, eh, we figure out which migrations version we are - int migration_version = FindVersion(_conn, "migrations"); - - if (migration_version > 0) - return; + // NOTE: normally when the [migrations] table is created, the version record for 'migrations' is + // added immediately. However, if for some reason the table is there but empty, we want to handle that as well. + int ver = FindVersion(_conn, "migrations"); + if (ver <= 0) // -1 = no table, 0 = no version record + { + if( ver < 0 ) + ExecuteScript("create table migrations(name varchar(100), version int)"); + InsertVersion("migrations", 1); + } + } - // If not, create the migration tables - using (DbCommand cmd = _conn.CreateCommand()) + /// Executes a script, possibly in a database-specific way. + /// It can be redefined for a specific DBMS, if necessary. Specifically, + /// to avoid problems with proc definitions in MySQL, we must use + /// MySqlScript class instead of just DbCommand. We don't want to bring + /// MySQL references here, so instead define a MySQLMigration class + /// in OpenSim.Data.MySQL + /// + /// + /// Array of strings, one-per-batch (often just one) + protected virtual void ExecuteScript(DbConnection conn, string[] script) + { + using (DbCommand cmd = conn.CreateCommand()) { - cmd.CommandText = _migrations_create; - cmd.ExecuteNonQuery(); + cmd.CommandTimeout = 0; + foreach (string sql in script) + { + cmd.CommandText = sql; + cmd.ExecuteNonQuery(); + } } + } + + protected void ExecuteScript(DbConnection conn, string sql) + { + ExecuteScript(conn, new string[]{sql}); + } + + protected void ExecuteScript(string sql) + { + ExecuteScript(_conn, sql); + } - InsertVersion("migrations", 1); + protected void ExecuteScript(string[] script) + { + ExecuteScript(_conn, script); } + + public void Update() { - int version = 0; - version = FindVersion(_conn, _type); + InitMigrationsTable(); - SortedList migrations = GetMigrationsAfter(version); + int version = FindVersion(_conn, _type); + + SortedList migrations = GetMigrationsAfter(version); if (migrations.Count < 1) return; @@ -132,57 +182,41 @@ namespace OpenSim.Data m_log.InfoFormat("[MIGRATIONS] Upgrading {0} to latest revision {1}.", _type, migrations.Keys[migrations.Count - 1]); m_log.Info("[MIGRATIONS] NOTE: this may take a while, don't interupt this process!"); - using (DbCommand cmd = _conn.CreateCommand()) + foreach (KeyValuePair kvp in migrations) { - foreach (KeyValuePair kvp in migrations) + int newversion = kvp.Key; + // we need to up the command timeout to infinite as we might be doing long migrations. + + /* [AlexRa 01-May-10]: We can't always just run any SQL in a single batch (= ExecuteNonQuery()). Things like + * stored proc definitions might have to be sent to the server each in a separate batch. + * This is certainly so for MS SQL; not sure how the MySQL connector sorts out the mess + * with 'delimiter @@'/'delimiter ;' around procs. So each "script" this code executes now is not + * a single string, but an array of strings, executed separately. + */ + try { - int newversion = kvp.Key; - cmd.CommandText = kvp.Value; - // we need to up the command timeout to infinite as we might be doing long migrations. - cmd.CommandTimeout = 0; - try - { - cmd.ExecuteNonQuery(); - } - catch (Exception e) - { - m_log.DebugFormat("[MIGRATIONS] Cmd was {0}", cmd.CommandText); - m_log.DebugFormat("[MIGRATIONS]: An error has occurred in the migration {0}.\n This may mean you could see errors trying to run OpenSim. If you see database related errors, you will need to fix the issue manually. Continuing.", e.Message); - cmd.CommandText = "ROLLBACK;"; - cmd.ExecuteNonQuery(); - } + ExecuteScript(kvp.Value); + } + catch (Exception e) + { + m_log.DebugFormat("[MIGRATIONS] Cmd was {0}", kvp.Value.ToString()); + m_log.DebugFormat("[MIGRATIONS]: An error has occurred in the migration {0}.\n This may mean you could see errors trying to run OpenSim. If you see database related errors, you will need to fix the issue manually. Migration aborted.", e.Message); + ExecuteScript("ROLLBACK;"); + return; + } - if (version == 0) - { - InsertVersion(_type, newversion); - } - else - { - UpdateVersion(_type, newversion); - } - version = newversion; + if (version == 0) + { + InsertVersion(_type, newversion); } + else + { + UpdateVersion(_type, newversion); + } + version = newversion; } } - // private int MaxVersion() - // { - // int max = 0; - // string[] names = _assem.GetManifestResourceNames(); - - // foreach (string s in names) - // { - // Match m = _match.Match(s); - // if (m.Success) - // { - // int MigrationVersion = int.Parse(m.Groups[1].ToString()); - // if (MigrationVersion > max) - // max = MigrationVersion; - // } - // } - // return max; - // } - public int Version { get { return FindVersion(_conn, _type); } @@ -206,7 +240,7 @@ namespace OpenSim.Data try { cmd.CommandText = "select version from migrations where name='" + type + "' order by version desc"; - using (IDataReader reader = cmd.ExecuteReader()) + using (DbDataReader reader = cmd.ExecuteReader()) { if (reader.Read()) { @@ -217,7 +251,8 @@ namespace OpenSim.Data } catch { - // Something went wrong, so we're version 0 + // Something went wrong (probably no table), so we're at version -1 + version = -1; } } return version; @@ -225,57 +260,151 @@ namespace OpenSim.Data private void InsertVersion(string type, int version) { - using (DbCommand cmd = _conn.CreateCommand()) - { - cmd.CommandText = "insert into migrations(name, version) values('" + type + "', " + version + ")"; - m_log.InfoFormat("[MIGRATIONS]: Creating {0} at version {1}", type, version); - cmd.ExecuteNonQuery(); - } + m_log.InfoFormat("[MIGRATIONS]: Creating {0} at version {1}", type, version); + ExecuteScript("insert into migrations(name, version) values('" + type + "', " + version + ")"); } private void UpdateVersion(string type, int version) { - using (DbCommand cmd = _conn.CreateCommand()) - { - cmd.CommandText = "update migrations set version=" + version + " where name='" + type + "'"; - m_log.InfoFormat("[MIGRATIONS]: Updating {0} to version {1}", type, version); - cmd.ExecuteNonQuery(); - } + m_log.InfoFormat("[MIGRATIONS]: Updating {0} to version {1}", type, version); + ExecuteScript("update migrations set version=" + version + " where name='" + type + "'"); } - // private SortedList GetAllMigrations() - // { - // return GetMigrationsAfter(0); - // } + private delegate void FlushProc(); - private SortedList GetMigrationsAfter(int after) + /// Scans for migration resources in either old-style "scattered" (one file per version) + /// or new-style "integrated" format (single file with ":VERSION nnn" sections). + /// In the new-style migrations it also recognizes ':GO' separators for parts of the SQL script + /// that must be sent to the server separately. The old-style migrations are loaded each in one piece + /// and don't support the ':GO' feature. + /// + /// The version we are currently at. Scan for any higher versions + /// A list of string arrays, representing the scripts. + private SortedList GetMigrationsAfter(int after) { + SortedList migrations = new SortedList(); + string[] names = _assem.GetManifestResourceNames(); - SortedList migrations = new SortedList(); - // because life is funny if we don't - Array.Sort(names); + if( names.Length == 0 ) // should never happen + return migrations; + + Array.Sort(names); // we want all the migrations ordered + + int nLastVerFound = 0; + Match m = null; + string sFile = Array.FindLast(names, nm => { m = _match_new.Match(nm); return m.Success; }); // ; nm.StartsWith(sPrefix, StringComparison.InvariantCultureIgnoreCase + + if( (m != null) && !String.IsNullOrEmpty(sFile) ) + { + /* The filename should be '.migrations[.NNN]' where NNN + * is the last version number defined in the file. If the '.NNN' part is recognized, the code can skip + * the file without looking inside if we have a higher version already. Without the suffix we read + * the file anyway and use the version numbers inside. Any unrecognized suffix (such as '.sql') + * is valid but ignored. + * + * NOTE that we expect only one 'merged' migration file. If there are several, we take the last one. + * If you are numbering them, leave only the latest one in the project or at least make sure they numbered + * to come up in the correct order (e.g. 'SomeStore.migrations.001' rather than 'SomeStore.migrations.1') + */ + + if (m.Groups.Count > 1 && int.TryParse(m.Groups[1].Value, out nLastVerFound)) + { + if( nLastVerFound <= after ) + goto scan_old_style; + } + + System.Text.StringBuilder sb = new System.Text.StringBuilder(4096); + int nVersion = -1; + + List script = new List(); + + FlushProc flush = delegate() + { + if (sb.Length > 0) // last SQL stmt to script list + { + script.Add(sb.ToString()); + sb.Length = 0; + } + + if ( (nVersion > 0) && (nVersion > after) && (script.Count > 0) && !migrations.ContainsKey(nVersion)) // script to the versioned script list + { + migrations[nVersion] = script.ToArray(); + } + script.Clear(); + }; + using (Stream resource = _assem.GetManifestResourceStream(sFile)) + using (StreamReader resourceReader = new StreamReader(resource)) + { + int nLineNo = 0; + while (!resourceReader.EndOfStream) + { + string sLine = resourceReader.ReadLine(); + nLineNo++; + + if( String.IsNullOrEmpty(sLine) || sLine.StartsWith("#") ) // ignore a comment or empty line + continue; + + if (sLine.Trim().Equals(":GO", StringComparison.InvariantCultureIgnoreCase)) + { + if (sb.Length == 0) continue; + if (nVersion > after) + script.Add(sb.ToString()); + sb.Length = 0; + continue; + } + + if (sLine.StartsWith(":VERSION ", StringComparison.InvariantCultureIgnoreCase)) // ":VERSION nnn" + { + flush(); + + int n = sLine.IndexOf('#'); // Comment is allowed in version sections, ignored + if (n >= 0) + sLine = sLine.Substring(0, n); + + if (!int.TryParse(sLine.Substring(9).Trim(), out nVersion)) + { + m_log.ErrorFormat("[MIGRATIONS]: invalid version marker at {0}: line {1}. Migration failed!", sFile, nLineNo); + break; + } + } + else + { + sb.AppendLine(sLine); + } + } + flush(); + + // If there are scattered migration files as well, only look for those with higher version numbers. + if (after < nVersion) + after = nVersion; + } + } + +scan_old_style: + // scan "old style" migration pieces anyway, ignore any versions already filled from the single file foreach (string s in names) { - Match m = _match.Match(s); + m = _match_old.Match(s); if (m.Success) { int version = int.Parse(m.Groups[1].ToString()); - if (version > after) + if ( (version > after) && !migrations.ContainsKey(version) ) { using (Stream resource = _assem.GetManifestResourceStream(s)) { using (StreamReader resourceReader = new StreamReader(resource)) { - string resourceString = resourceReader.ReadToEnd(); - migrations.Add(version, resourceString); + string sql = resourceReader.ReadToEnd(); + migrations.Add(version, new string[]{sql}); } } } } } - - if (migrations.Count < 1) { + + if (migrations.Count < 1) + { m_log.InfoFormat("[MIGRATIONS]: {0} up to date, no migrations to apply", _type); } return migrations; -- cgit v1.1 From ade2e5a9d21f7ee10afea4f315e37999b4b760a0 Mon Sep 17 00:00:00 2001 From: AlexRa Date: Sun, 16 May 2010 16:24:50 +0300 Subject: Embedded MySql.Data.dll updated to 6.2.3.0. This is necessary to correct a known problem with the DELIMITER command in previous versions of the client library. --- bin/MySql.Data.dll | Bin 294912 -> 335872 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/bin/MySql.Data.dll b/bin/MySql.Data.dll index a94dd3d..7aa95ec 100644 Binary files a/bin/MySql.Data.dll and b/bin/MySql.Data.dll differ -- cgit v1.1 From 4ebb985b46385b8c03ac572648a1c628262f65d0 Mon Sep 17 00:00:00 2001 From: AlexRa Date: Wed, 5 May 2010 22:34:41 +0300 Subject: Added MySqlMigrations.cs (supports stored proc/funcs) Uses MySqlScript class to correctly run proc/func definitions that need delimiter change. Requires MySql.Data.dll 6.2 or later. --- OpenSim/Data/MySQL/MySQLMigrations.cs | 85 +++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 OpenSim/Data/MySQL/MySQLMigrations.cs diff --git a/OpenSim/Data/MySQL/MySQLMigrations.cs b/OpenSim/Data/MySQL/MySQLMigrations.cs new file mode 100644 index 0000000..b16655d --- /dev/null +++ b/OpenSim/Data/MySQL/MySQLMigrations.cs @@ -0,0 +1,85 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.Common; +using System.IO; +using System.Reflection; +using System.Text.RegularExpressions; +using log4net; +using MySql.Data.MySqlClient; + +namespace OpenSim.Data.MySQL +{ + /// This is a MySQL-customized migration processor. The only difference is in how + /// it executes SQL scripts (using MySqlScript instead of MyCommand) + /// + /// + public class MySqlMigration : Migration + { + public MySqlMigration() + : base() + { + } + + public MySqlMigration(DbConnection conn, Assembly assem, string subtype, string type) : + base(conn, assem, subtype, type) + { + } + + public MySqlMigration(DbConnection conn, Assembly assem, string type) : + base(conn, assem, type) + { + } + + protected override void ExecuteScript(DbConnection conn, string[] script) + { + if (!(conn is MySqlConnection)) + { + base.ExecuteScript(conn, script); + return; + } + + MySqlScript scr = new MySqlScript((MySqlConnection)conn); + { + foreach (string sql in script) + { + scr.Query = sql; + scr.Error += delegate(object sender, MySqlScriptErrorEventArgs args) + { + m_log.ErrorFormat("[MySQL MIGRATION]: Error {0}", args.Exception.Message); + m_log.ErrorFormat("[MySQL MIGRATION]: In SQL: {0}", args.StatementText); + throw args.Exception; + }; + scr.Execute(); + } + } + } + } +} -- cgit v1.1 From e4419c34c30e1cf6529ced125f0c05aed24644a4 Mon Sep 17 00:00:00 2001 From: AlexRa Date: Sat, 1 May 2010 17:43:10 +0300 Subject: Converted MySQL migration history to the new format Replaced all NNN_StoreName.sql migration resources with a more readable, single-file-per-store --- OpenSim/Data/MSSQL/Resources/002_Presence.sql | 6 - OpenSim/Data/MySQL/Resources/001_AssetStore.sql | 15 - OpenSim/Data/MySQL/Resources/001_AuthStore.sql | 21 - OpenSim/Data/MySQL/Resources/001_Avatar.sql | 5 - OpenSim/Data/MySQL/Resources/001_Friends.sql | 9 - OpenSim/Data/MySQL/Resources/001_FriendsStore.sql | 5 - OpenSim/Data/MySQL/Resources/001_GridStore.sql | 32 - .../Data/MySQL/Resources/001_InventoryStore.sql | 40 - OpenSim/Data/MySQL/Resources/001_LogStore.sql | 10 - OpenSim/Data/MySQL/Resources/001_Presence.sql | 13 - OpenSim/Data/MySQL/Resources/001_RegionStore.sql | 154 ---- OpenSim/Data/MySQL/Resources/001_UserAccount.sql | 13 - OpenSim/Data/MySQL/Resources/001_UserStore.sql | 107 --- OpenSim/Data/MySQL/Resources/002_AssetStore.sql | 9 - OpenSim/Data/MySQL/Resources/002_AuthStore.sql | 5 - OpenSim/Data/MySQL/Resources/002_Friends.sql | 5 - OpenSim/Data/MySQL/Resources/002_FriendsStore.sql | 5 - OpenSim/Data/MySQL/Resources/002_GridStore.sql | 5 - .../Data/MySQL/Resources/002_InventoryStore.sql | 31 - OpenSim/Data/MySQL/Resources/002_RegionStore.sql | 6 - OpenSim/Data/MySQL/Resources/002_UserAccount.sql | 5 - OpenSim/Data/MySQL/Resources/002_UserStore.sql | 5 - OpenSim/Data/MySQL/Resources/003_AssetStore.sql | 9 - OpenSim/Data/MySQL/Resources/003_AuthStore.sql | 5 - OpenSim/Data/MySQL/Resources/003_GridStore.sql | 7 - .../Data/MySQL/Resources/003_InventoryStore.sql | 5 - OpenSim/Data/MySQL/Resources/003_RegionStore.sql | 5 - OpenSim/Data/MySQL/Resources/003_UserAccount.sql | 9 - OpenSim/Data/MySQL/Resources/003_UserStore.sql | 6 - OpenSim/Data/MySQL/Resources/004_AssetStore.sql | 5 - OpenSim/Data/MySQL/Resources/004_GridStore.sql | 6 - .../Data/MySQL/Resources/004_InventoryStore.sql | 7 - OpenSim/Data/MySQL/Resources/004_RegionStore.sql | 5 - OpenSim/Data/MySQL/Resources/004_UserAccount.sql | 8 - OpenSim/Data/MySQL/Resources/004_UserStore.sql | 6 - OpenSim/Data/MySQL/Resources/005_AssetStore.sql | 6 - OpenSim/Data/MySQL/Resources/005_GridStore.sql | 6 - OpenSim/Data/MySQL/Resources/005_RegionStore.sql | 40 - OpenSim/Data/MySQL/Resources/005_UserStore.sql | 5 - OpenSim/Data/MySQL/Resources/006_AssetStore.sql | 1 - OpenSim/Data/MySQL/Resources/006_GridStore.sql | 5 - OpenSim/Data/MySQL/Resources/006_RegionStore.sql | 12 - OpenSim/Data/MySQL/Resources/006_UserStore.sql | 5 - OpenSim/Data/MySQL/Resources/007_GridStore.sql | 7 - OpenSim/Data/MySQL/Resources/007_RegionStore.sql | 25 - OpenSim/Data/MySQL/Resources/007_UserStore.sql | 5 - OpenSim/Data/MySQL/Resources/008_RegionStore.sql | 9 - OpenSim/Data/MySQL/Resources/008_UserStore.sql | 5 - OpenSim/Data/MySQL/Resources/009_RegionStore.sql | 31 - OpenSim/Data/MySQL/Resources/010_RegionStore.sql | 9 - OpenSim/Data/MySQL/Resources/011_RegionStore.sql | 9 - OpenSim/Data/MySQL/Resources/012_RegionStore.sql | 5 - OpenSim/Data/MySQL/Resources/013_RegionStore.sql | 103 --- OpenSim/Data/MySQL/Resources/014_RegionStore.sql | 8 - OpenSim/Data/MySQL/Resources/015_RegionStore.sql | 6 - OpenSim/Data/MySQL/Resources/016_RegionStore.sql | 27 - OpenSim/Data/MySQL/Resources/017_RegionStore.sql | 9 - OpenSim/Data/MySQL/Resources/018_RegionStore.sql | 6 - OpenSim/Data/MySQL/Resources/019_RegionStore.sql | 6 - OpenSim/Data/MySQL/Resources/020_RegionStore.sql | 7 - OpenSim/Data/MySQL/Resources/021_RegionStore.sql | 8 - OpenSim/Data/MySQL/Resources/022_RegionStore.sql | 6 - OpenSim/Data/MySQL/Resources/023_RegionStore.sql | 6 - OpenSim/Data/MySQL/Resources/024_RegionStore.sql | 18 - OpenSim/Data/MySQL/Resources/025_RegionStore.sql | 46 -- OpenSim/Data/MySQL/Resources/026_RegionStore.sql | 41 -- OpenSim/Data/MySQL/Resources/027_RegionStore.sql | 5 - OpenSim/Data/MySQL/Resources/028_RegionStore.sql | 79 -- OpenSim/Data/MySQL/Resources/029_RegionStore.sql | 5 - OpenSim/Data/MySQL/Resources/030_RegionStore.sql | 7 - OpenSim/Data/MySQL/Resources/031_RegionStore.sql | 7 - OpenSim/Data/MySQL/Resources/032_RegionStore.sql | 3 - OpenSim/Data/MySQL/Resources/AssetStore.migrations | 69 ++ OpenSim/Data/MySQL/Resources/AuthStore.migrations | 39 + OpenSim/Data/MySQL/Resources/Avatar.migrations | 12 + .../Data/MySQL/Resources/FriendsStore.migrations | 25 + OpenSim/Data/MySQL/Resources/GridStore.migrations | 89 +++ .../Data/MySQL/Resources/InventoryStore.migrations | 93 +++ OpenSim/Data/MySQL/Resources/LogStore.migrations | 13 + OpenSim/Data/MySQL/Resources/Presence.migrations | 36 + .../Data/MySQL/Resources/RegionStore.migrations | 806 +++++++++++++++++++++ .../Data/MySQL/Resources/UserAccount.migrations | 47 ++ OpenSim/Data/MySQL/Resources/UserStore.migrations | 168 +++++ 83 files changed, 1397 insertions(+), 1177 deletions(-) delete mode 100644 OpenSim/Data/MSSQL/Resources/002_Presence.sql delete mode 100644 OpenSim/Data/MySQL/Resources/001_AssetStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/001_AuthStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/001_Avatar.sql delete mode 100644 OpenSim/Data/MySQL/Resources/001_Friends.sql delete mode 100644 OpenSim/Data/MySQL/Resources/001_FriendsStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/001_GridStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/001_InventoryStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/001_LogStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/001_Presence.sql delete mode 100644 OpenSim/Data/MySQL/Resources/001_RegionStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/001_UserAccount.sql delete mode 100644 OpenSim/Data/MySQL/Resources/001_UserStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/002_AssetStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/002_AuthStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/002_Friends.sql delete mode 100644 OpenSim/Data/MySQL/Resources/002_FriendsStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/002_GridStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/002_InventoryStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/002_RegionStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/002_UserAccount.sql delete mode 100644 OpenSim/Data/MySQL/Resources/002_UserStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/003_AssetStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/003_AuthStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/003_GridStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/003_InventoryStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/003_RegionStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/003_UserAccount.sql delete mode 100644 OpenSim/Data/MySQL/Resources/003_UserStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/004_AssetStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/004_GridStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/004_InventoryStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/004_RegionStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/004_UserAccount.sql delete mode 100644 OpenSim/Data/MySQL/Resources/004_UserStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/005_AssetStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/005_GridStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/005_RegionStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/005_UserStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/006_AssetStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/006_GridStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/006_RegionStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/006_UserStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/007_GridStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/007_RegionStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/007_UserStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/008_RegionStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/008_UserStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/009_RegionStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/010_RegionStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/011_RegionStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/012_RegionStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/013_RegionStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/014_RegionStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/015_RegionStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/016_RegionStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/017_RegionStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/018_RegionStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/019_RegionStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/020_RegionStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/021_RegionStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/022_RegionStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/023_RegionStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/024_RegionStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/025_RegionStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/026_RegionStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/027_RegionStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/028_RegionStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/029_RegionStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/030_RegionStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/031_RegionStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/032_RegionStore.sql create mode 100644 OpenSim/Data/MySQL/Resources/AssetStore.migrations create mode 100644 OpenSim/Data/MySQL/Resources/AuthStore.migrations create mode 100644 OpenSim/Data/MySQL/Resources/Avatar.migrations create mode 100644 OpenSim/Data/MySQL/Resources/FriendsStore.migrations create mode 100644 OpenSim/Data/MySQL/Resources/GridStore.migrations create mode 100644 OpenSim/Data/MySQL/Resources/InventoryStore.migrations create mode 100644 OpenSim/Data/MySQL/Resources/LogStore.migrations create mode 100644 OpenSim/Data/MySQL/Resources/Presence.migrations create mode 100644 OpenSim/Data/MySQL/Resources/RegionStore.migrations create mode 100644 OpenSim/Data/MySQL/Resources/UserAccount.migrations create mode 100644 OpenSim/Data/MySQL/Resources/UserStore.migrations diff --git a/OpenSim/Data/MSSQL/Resources/002_Presence.sql b/OpenSim/Data/MSSQL/Resources/002_Presence.sql deleted file mode 100644 index a67671d..0000000 --- a/OpenSim/Data/MSSQL/Resources/002_Presence.sql +++ /dev/null @@ -1,6 +0,0 @@ -BEGIN TRANSACTION - -CREATE UNIQUE INDEX SessionID ON Presence(SessionID); -CREATE INDEX UserID ON Presence(UserID); - -COMMIT \ No newline at end of file diff --git a/OpenSim/Data/MySQL/Resources/001_AssetStore.sql b/OpenSim/Data/MySQL/Resources/001_AssetStore.sql deleted file mode 100644 index 6a9a127..0000000 --- a/OpenSim/Data/MySQL/Resources/001_AssetStore.sql +++ /dev/null @@ -1,15 +0,0 @@ -BEGIN; - -CREATE TABLE `assets` ( - `id` binary(16) NOT NULL, - `name` varchar(64) NOT NULL, - `description` varchar(64) NOT NULL, - `assetType` tinyint(4) NOT NULL, - `invType` tinyint(4) NOT NULL, - `local` tinyint(1) NOT NULL, - `temporary` tinyint(1) NOT NULL, - `data` longblob NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1'; - -COMMIT; \ No newline at end of file diff --git a/OpenSim/Data/MySQL/Resources/001_AuthStore.sql b/OpenSim/Data/MySQL/Resources/001_AuthStore.sql deleted file mode 100644 index c7e16fb..0000000 --- a/OpenSim/Data/MySQL/Resources/001_AuthStore.sql +++ /dev/null @@ -1,21 +0,0 @@ -begin; - -CREATE TABLE `auth` ( - `UUID` char(36) NOT NULL, - `passwordHash` char(32) NOT NULL default '', - `passwordSalt` char(32) NOT NULL default '', - `webLoginKey` varchar(255) NOT NULL default '', - PRIMARY KEY (`UUID`) -) ENGINE=InnoDB; - -CREATE TABLE `tokens` ( - `UUID` char(36) NOT NULL, - `token` varchar(255) NOT NULL, - `validity` datetime NOT NULL, - UNIQUE KEY `uuid_token` (`UUID`,`token`), - KEY `UUID` (`UUID`), - KEY `token` (`token`), - KEY `validity` (`validity`) -) ENGINE=InnoDB; - -commit; diff --git a/OpenSim/Data/MySQL/Resources/001_Avatar.sql b/OpenSim/Data/MySQL/Resources/001_Avatar.sql deleted file mode 100644 index 27a3072..0000000 --- a/OpenSim/Data/MySQL/Resources/001_Avatar.sql +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN; - -CREATE TABLE Avatars (PrincipalID CHAR(36) NOT NULL, Name VARCHAR(32) NOT NULL, Value VARCHAR(255) NOT NULL DEFAULT '', PRIMARY KEY(PrincipalID, Name), KEY(PrincipalID)); - -COMMIT; diff --git a/OpenSim/Data/MySQL/Resources/001_Friends.sql b/OpenSim/Data/MySQL/Resources/001_Friends.sql deleted file mode 100644 index e158a2c..0000000 --- a/OpenSim/Data/MySQL/Resources/001_Friends.sql +++ /dev/null @@ -1,9 +0,0 @@ -BEGIN; - -CREATE TABLE `Friends` ( - `PrincipalID` CHAR(36) NOT NULL, - `FriendID` VARCHAR(255) NOT NULL, - `Flags` CHAR(16) NOT NULL DEFAULT '0' -) ENGINE=InnoDB; - -COMMIT; diff --git a/OpenSim/Data/MySQL/Resources/001_FriendsStore.sql b/OpenSim/Data/MySQL/Resources/001_FriendsStore.sql deleted file mode 100644 index da2c59c..0000000 --- a/OpenSim/Data/MySQL/Resources/001_FriendsStore.sql +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN; - -CREATE TABLE `Friends` (`PrincipalID` CHAR(36) NOT NULL, `Friend` VARCHAR(255) NOT NULL, `Flags` VARCHAR(16) NOT NULL DEFAULT 0, `Offered` VARCHAR(32) NOT NULL DEFAULT 0, PRIMARY KEY(`PrincipalID`, `Friend`), KEY(`PrincipalID`)); - -COMMIT; diff --git a/OpenSim/Data/MySQL/Resources/001_GridStore.sql b/OpenSim/Data/MySQL/Resources/001_GridStore.sql deleted file mode 100644 index cb0f9bd..0000000 --- a/OpenSim/Data/MySQL/Resources/001_GridStore.sql +++ /dev/null @@ -1,32 +0,0 @@ -CREATE TABLE `regions` ( - `uuid` varchar(36) NOT NULL, - `regionHandle` bigint(20) unsigned NOT NULL, - `regionName` varchar(32) default NULL, - `regionRecvKey` varchar(128) default NULL, - `regionSendKey` varchar(128) default NULL, - `regionSecret` varchar(128) default NULL, - `regionDataURI` varchar(255) default NULL, - `serverIP` varchar(64) default NULL, - `serverPort` int(10) unsigned default NULL, - `serverURI` varchar(255) default NULL, - `locX` int(10) unsigned default NULL, - `locY` int(10) unsigned default NULL, - `locZ` int(10) unsigned default NULL, - `eastOverrideHandle` bigint(20) unsigned default NULL, - `westOverrideHandle` bigint(20) unsigned default NULL, - `southOverrideHandle` bigint(20) unsigned default NULL, - `northOverrideHandle` bigint(20) unsigned default NULL, - `regionAssetURI` varchar(255) default NULL, - `regionAssetRecvKey` varchar(128) default NULL, - `regionAssetSendKey` varchar(128) default NULL, - `regionUserURI` varchar(255) default NULL, - `regionUserRecvKey` varchar(128) default NULL, - `regionUserSendKey` varchar(128) default NULL, `regionMapTexture` varchar(36) default NULL, - `serverHttpPort` int(10) default NULL, `serverRemotingPort` int(10) default NULL, - `owner_uuid` varchar(36) default '00000000-0000-0000-0000-000000000000' not null, - `originUUID` varchar(36), - PRIMARY KEY (`uuid`), - KEY `regionName` (`regionName`), - KEY `regionHandle` (`regionHandle`), - KEY `overrideHandles` (`eastOverrideHandle`,`westOverrideHandle`,`southOverrideHandle`,`northOverrideHandle`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Rev. 3'; diff --git a/OpenSim/Data/MySQL/Resources/001_InventoryStore.sql b/OpenSim/Data/MySQL/Resources/001_InventoryStore.sql deleted file mode 100644 index 40dc91c..0000000 --- a/OpenSim/Data/MySQL/Resources/001_InventoryStore.sql +++ /dev/null @@ -1,40 +0,0 @@ -BEGIN; - -CREATE TABLE `inventoryfolders` ( - `folderID` varchar(36) NOT NULL default '', - `agentID` varchar(36) default NULL, - `parentFolderID` varchar(36) default NULL, - `folderName` varchar(64) default NULL, - `type` smallint NOT NULL default 0, - `version` int NOT NULL default 0, - PRIMARY KEY (`folderID`), - KEY `owner` (`agentID`), - KEY `parent` (`parentFolderID`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE `inventoryitems` ( - `inventoryID` varchar(36) NOT NULL default '', - `assetID` varchar(36) default NULL, - `assetType` int(11) default NULL, - `parentFolderID` varchar(36) default NULL, - `avatarID` varchar(36) default NULL, - `inventoryName` varchar(64) default NULL, - `inventoryDescription` varchar(128) default NULL, - `inventoryNextPermissions` int(10) unsigned default NULL, - `inventoryCurrentPermissions` int(10) unsigned default NULL, - `invType` int(11) default NULL, - `creatorID` varchar(36) default NULL, - `inventoryBasePermissions` int(10) unsigned NOT NULL default 0, - `inventoryEveryOnePermissions` int(10) unsigned NOT NULL default 0, - `salePrice` int(11) NOT NULL default 0, - `saleType` tinyint(4) NOT NULL default 0, - `creationDate` int(11) NOT NULL default 0, - `groupID` varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000', - `groupOwned` tinyint(4) NOT NULL default 0, - `flags` int(11) unsigned NOT NULL default 0, - PRIMARY KEY (`inventoryID`), - KEY `owner` (`avatarID`), - KEY `folder` (`parentFolderID`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -COMMIT; \ No newline at end of file diff --git a/OpenSim/Data/MySQL/Resources/001_LogStore.sql b/OpenSim/Data/MySQL/Resources/001_LogStore.sql deleted file mode 100644 index b4c29fb..0000000 --- a/OpenSim/Data/MySQL/Resources/001_LogStore.sql +++ /dev/null @@ -1,10 +0,0 @@ -CREATE TABLE `logs` ( - `logID` int(10) unsigned NOT NULL auto_increment, - `target` varchar(36) default NULL, - `server` varchar(64) default NULL, - `method` varchar(64) default NULL, - `arguments` varchar(255) default NULL, - `priority` int(11) default NULL, - `message` text, - PRIMARY KEY (`logID`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/OpenSim/Data/MySQL/Resources/001_Presence.sql b/OpenSim/Data/MySQL/Resources/001_Presence.sql deleted file mode 100644 index 84fa057..0000000 --- a/OpenSim/Data/MySQL/Resources/001_Presence.sql +++ /dev/null @@ -1,13 +0,0 @@ -BEGIN; - -CREATE TABLE `Presence` ( - `UserID` VARCHAR(255) NOT NULL, - `RegionID` CHAR(36) NOT NULL, - `SessionID` CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', - `SecureSessionID` CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000' -) ENGINE=InnoDB; - -CREATE UNIQUE INDEX SessionID ON Presence(SessionID); -CREATE INDEX UserID ON Presence(UserID); - -COMMIT; diff --git a/OpenSim/Data/MySQL/Resources/001_RegionStore.sql b/OpenSim/Data/MySQL/Resources/001_RegionStore.sql deleted file mode 100644 index 31164b3..0000000 --- a/OpenSim/Data/MySQL/Resources/001_RegionStore.sql +++ /dev/null @@ -1,154 +0,0 @@ -BEGIN; - -CREATE TABLE `prims` ( - `UUID` varchar(255) NOT NULL, - `RegionUUID` varchar(255) default NULL, - `ParentID` int(11) default NULL, - `CreationDate` int(11) default NULL, - `Name` varchar(255) default NULL, - `SceneGroupID` varchar(255) default NULL, - `Text` varchar(255) default NULL, - `Description` varchar(255) default NULL, - `SitName` varchar(255) default NULL, - `TouchName` varchar(255) default NULL, - `ObjectFlags` int(11) default NULL, - `CreatorID` varchar(255) default NULL, - `OwnerID` varchar(255) default NULL, - `GroupID` varchar(255) default NULL, - `LastOwnerID` varchar(255) default NULL, - `OwnerMask` int(11) default NULL, - `NextOwnerMask` int(11) default NULL, - `GroupMask` int(11) default NULL, - `EveryoneMask` int(11) default NULL, - `BaseMask` int(11) default NULL, - `PositionX` float default NULL, - `PositionY` float default NULL, - `PositionZ` float default NULL, - `GroupPositionX` float default NULL, - `GroupPositionY` float default NULL, - `GroupPositionZ` float default NULL, - `VelocityX` float default NULL, - `VelocityY` float default NULL, - `VelocityZ` float default NULL, - `AngularVelocityX` float default NULL, - `AngularVelocityY` float default NULL, - `AngularVelocityZ` float default NULL, - `AccelerationX` float default NULL, - `AccelerationY` float default NULL, - `AccelerationZ` float default NULL, - `RotationX` float default NULL, - `RotationY` float default NULL, - `RotationZ` float default NULL, - `RotationW` float default NULL, - `SitTargetOffsetX` float default NULL, - `SitTargetOffsetY` float default NULL, - `SitTargetOffsetZ` float default NULL, - `SitTargetOrientW` float default NULL, - `SitTargetOrientX` float default NULL, - `SitTargetOrientY` float default NULL, - `SitTargetOrientZ` float default NULL, - PRIMARY KEY (`UUID`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - -CREATE TABLE `primshapes` ( - `UUID` varchar(255) NOT NULL, - `Shape` int(11) default NULL, - `ScaleX` float default NULL, - `ScaleY` float default NULL, - `ScaleZ` float default NULL, - `PCode` int(11) default NULL, - `PathBegin` int(11) default NULL, - `PathEnd` int(11) default NULL, - `PathScaleX` int(11) default NULL, - `PathScaleY` int(11) default NULL, - `PathShearX` int(11) default NULL, - `PathShearY` int(11) default NULL, - `PathSkew` int(11) default NULL, - `PathCurve` int(11) default NULL, - `PathRadiusOffset` int(11) default NULL, - `PathRevolutions` int(11) default NULL, - `PathTaperX` int(11) default NULL, - `PathTaperY` int(11) default NULL, - `PathTwist` int(11) default NULL, - `PathTwistBegin` int(11) default NULL, - `ProfileBegin` int(11) default NULL, - `ProfileEnd` int(11) default NULL, - `ProfileCurve` int(11) default NULL, - `ProfileHollow` int(11) default NULL, - `State` int(11) default NULL, - `Texture` longblob, - `ExtraParams` longblob, - PRIMARY KEY (`UUID`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - -CREATE TABLE `primitems` ( - `itemID` varchar(255) NOT NULL, - `primID` varchar(255) default NULL, - `assetID` varchar(255) default NULL, - `parentFolderID` varchar(255) default NULL, - `invType` int(11) default NULL, - `assetType` int(11) default NULL, - `name` varchar(255) default NULL, - `description` varchar(255) default NULL, - `creationDate` bigint(20) default NULL, - `creatorID` varchar(255) default NULL, - `ownerID` varchar(255) default NULL, - `lastOwnerID` varchar(255) default NULL, - `groupID` varchar(255) default NULL, - `nextPermissions` int(11) default NULL, - `currentPermissions` int(11) default NULL, - `basePermissions` int(11) default NULL, - `everyonePermissions` int(11) default NULL, - `groupPermissions` int(11) default NULL, - PRIMARY KEY (`itemID`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - -CREATE TABLE `terrain` ( - `RegionUUID` varchar(255) default NULL, - `Revision` int(11) default NULL, - `Heightfield` longblob -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - -CREATE TABLE `land` ( - `UUID` varchar(255) NOT NULL, - `RegionUUID` varchar(255) default NULL, - `LocalLandID` int(11) default NULL, - `Bitmap` longblob, - `Name` varchar(255) default NULL, - `Description` varchar(255) default NULL, - `OwnerUUID` varchar(255) default NULL, - `IsGroupOwned` int(11) default NULL, - `Area` int(11) default NULL, - `AuctionID` int(11) default NULL, - `Category` int(11) default NULL, - `ClaimDate` int(11) default NULL, - `ClaimPrice` int(11) default NULL, - `GroupUUID` varchar(255) default NULL, - `SalePrice` int(11) default NULL, - `LandStatus` int(11) default NULL, - `LandFlags` int(11) default NULL, - `LandingType` int(11) default NULL, - `MediaAutoScale` int(11) default NULL, - `MediaTextureUUID` varchar(255) default NULL, - `MediaURL` varchar(255) default NULL, - `MusicURL` varchar(255) default NULL, - `PassHours` float default NULL, - `PassPrice` int(11) default NULL, - `SnapshotUUID` varchar(255) default NULL, - `UserLocationX` float default NULL, - `UserLocationY` float default NULL, - `UserLocationZ` float default NULL, - `UserLookAtX` float default NULL, - `UserLookAtY` float default NULL, - `UserLookAtZ` float default NULL, - `AuthbuyerID` varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000', - PRIMARY KEY (`UUID`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE `landaccesslist` ( - `LandUUID` varchar(255) default NULL, - `AccessUUID` varchar(255) default NULL, - `Flags` int(11) default NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - -COMMIT; \ No newline at end of file diff --git a/OpenSim/Data/MySQL/Resources/001_UserAccount.sql b/OpenSim/Data/MySQL/Resources/001_UserAccount.sql deleted file mode 100644 index 07da571..0000000 --- a/OpenSim/Data/MySQL/Resources/001_UserAccount.sql +++ /dev/null @@ -1,13 +0,0 @@ -BEGIN; - -CREATE TABLE `UserAccounts` ( - `PrincipalID` CHAR(36) NOT NULL, - `ScopeID` CHAR(36) NOT NULL, - `FirstName` VARCHAR(64) NOT NULL, - `LastName` VARCHAR(64) NOT NULL, - `Email` VARCHAR(64), - `ServiceURLs` TEXT, - `Created` INT(11) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -COMMIT; diff --git a/OpenSim/Data/MySQL/Resources/001_UserStore.sql b/OpenSim/Data/MySQL/Resources/001_UserStore.sql deleted file mode 100644 index 29ebc7d..0000000 --- a/OpenSim/Data/MySQL/Resources/001_UserStore.sql +++ /dev/null @@ -1,107 +0,0 @@ -BEGIN; - -SET FOREIGN_KEY_CHECKS=0; --- ---------------------------- --- Table structure for agents --- ---------------------------- -CREATE TABLE `agents` ( - `UUID` varchar(36) NOT NULL, - `sessionID` varchar(36) NOT NULL, - `secureSessionID` varchar(36) NOT NULL, - `agentIP` varchar(16) NOT NULL, - `agentPort` int(11) NOT NULL, - `agentOnline` tinyint(4) NOT NULL, - `loginTime` int(11) NOT NULL, - `logoutTime` int(11) NOT NULL, - `currentRegion` varchar(36) NOT NULL, - `currentHandle` bigint(20) unsigned NOT NULL, - `currentPos` varchar(64) NOT NULL, - PRIMARY KEY (`UUID`), - UNIQUE KEY `session` (`sessionID`), - UNIQUE KEY `ssession` (`secureSessionID`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- Create schema avatar_appearance --- - -CREATE TABLE `avatarappearance` ( - Owner char(36) NOT NULL, - Serial int(10) unsigned NOT NULL, - Visual_Params blob NOT NULL, - Texture blob NOT NULL, - Avatar_Height float NOT NULL, - Body_Item char(36) NOT NULL, - Body_Asset char(36) NOT NULL, - Skin_Item char(36) NOT NULL, - Skin_Asset char(36) NOT NULL, - Hair_Item char(36) NOT NULL, - Hair_Asset char(36) NOT NULL, - Eyes_Item char(36) NOT NULL, - Eyes_Asset char(36) NOT NULL, - Shirt_Item char(36) NOT NULL, - Shirt_Asset char(36) NOT NULL, - Pants_Item char(36) NOT NULL, - Pants_Asset char(36) NOT NULL, - Shoes_Item char(36) NOT NULL, - Shoes_Asset char(36) NOT NULL, - Socks_Item char(36) NOT NULL, - Socks_Asset char(36) NOT NULL, - Jacket_Item char(36) NOT NULL, - Jacket_Asset char(36) NOT NULL, - Gloves_Item char(36) NOT NULL, - Gloves_Asset char(36) NOT NULL, - Undershirt_Item char(36) NOT NULL, - Undershirt_Asset char(36) NOT NULL, - Underpants_Item char(36) NOT NULL, - Underpants_Asset char(36) NOT NULL, - Skirt_Item char(36) NOT NULL, - Skirt_Asset char(36) NOT NULL, - PRIMARY KEY (`Owner`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -SET FOREIGN_KEY_CHECKS=0; --- ---------------------------- --- Table structure for users --- ---------------------------- -CREATE TABLE `userfriends` ( - `ownerID` VARCHAR(37) NOT NULL, - `friendID` VARCHAR(37) NOT NULL, - `friendPerms` INT NOT NULL, - `datetimestamp` INT NOT NULL, - UNIQUE KEY (`ownerID`, `friendID`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; --- ---------------------------- --- Table structure for users --- ---------------------------- -CREATE TABLE `users` ( - `UUID` varchar(36) NOT NULL default '', - `username` varchar(32) NOT NULL, - `lastname` varchar(32) NOT NULL, - `passwordHash` varchar(32) NOT NULL, - `passwordSalt` varchar(32) NOT NULL, - `homeRegion` bigint(20) unsigned default NULL, - `homeLocationX` float default NULL, - `homeLocationY` float default NULL, - `homeLocationZ` float default NULL, - `homeLookAtX` float default NULL, - `homeLookAtY` float default NULL, - `homeLookAtZ` float default NULL, - `created` int(11) NOT NULL, - `lastLogin` int(11) NOT NULL, - `userInventoryURI` varchar(255) default NULL, - `userAssetURI` varchar(255) default NULL, - `profileCanDoMask` int(10) unsigned default NULL, - `profileWantDoMask` int(10) unsigned default NULL, - `profileAboutText` text, - `profileFirstText` text, - `profileImage` varchar(36) default NULL, - `profileFirstImage` varchar(36) default NULL, - `webLoginKey` varchar(36) default NULL, - PRIMARY KEY (`UUID`), - UNIQUE KEY `usernames` (`username`,`lastname`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- ---------------------------- --- Records --- ---------------------------- -COMMIT; \ No newline at end of file diff --git a/OpenSim/Data/MySQL/Resources/002_AssetStore.sql b/OpenSim/Data/MySQL/Resources/002_AssetStore.sql deleted file mode 100644 index a7d7fca..0000000 --- a/OpenSim/Data/MySQL/Resources/002_AssetStore.sql +++ /dev/null @@ -1,9 +0,0 @@ -BEGIN; - -ALTER TABLE assets change id oldid binary(16); -ALTER TABLE assets add id varchar(36) not null default ''; -UPDATE assets set id = concat(substr(hex(oldid),1,8),"-",substr(hex(oldid),9,4),"-",substr(hex(oldid),13,4),"-",substr(hex(oldid),17,4),"-",substr(hex(oldid),21,12)); -ALTER TABLE assets drop oldid; -ALTER TABLE assets add constraint primary key(id); - -COMMIT; \ No newline at end of file diff --git a/OpenSim/Data/MySQL/Resources/002_AuthStore.sql b/OpenSim/Data/MySQL/Resources/002_AuthStore.sql deleted file mode 100644 index dc7dfe0..0000000 --- a/OpenSim/Data/MySQL/Resources/002_AuthStore.sql +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN; - -INSERT INTO auth (UUID, passwordHash, passwordSalt, webLoginKey) SELECT `UUID` AS UUID, `passwordHash` AS passwordHash, `passwordSalt` AS passwordSalt, `webLoginKey` AS webLoginKey FROM users; - -COMMIT; diff --git a/OpenSim/Data/MySQL/Resources/002_Friends.sql b/OpenSim/Data/MySQL/Resources/002_Friends.sql deleted file mode 100644 index 5ff6438..0000000 --- a/OpenSim/Data/MySQL/Resources/002_Friends.sql +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN; - -INSERT INTO Friends (PrincipalID, FriendID, Flags) SELECT ownerID, friendID, friendPerms FROM userfriends; - -COMMIT; diff --git a/OpenSim/Data/MySQL/Resources/002_FriendsStore.sql b/OpenSim/Data/MySQL/Resources/002_FriendsStore.sql deleted file mode 100644 index a363867..0000000 --- a/OpenSim/Data/MySQL/Resources/002_FriendsStore.sql +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN; - -INSERT INTO `Friends` SELECT `ownerID`, `friendID`, `friendPerms`, 0 FROM `userfriends`; - -COMMIT; diff --git a/OpenSim/Data/MySQL/Resources/002_GridStore.sql b/OpenSim/Data/MySQL/Resources/002_GridStore.sql deleted file mode 100644 index 35b9be1..0000000 --- a/OpenSim/Data/MySQL/Resources/002_GridStore.sql +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN; - -ALTER TABLE regions add column access integer unsigned default 1; - -COMMIT; diff --git a/OpenSim/Data/MySQL/Resources/002_InventoryStore.sql b/OpenSim/Data/MySQL/Resources/002_InventoryStore.sql deleted file mode 100644 index c161a68..0000000 --- a/OpenSim/Data/MySQL/Resources/002_InventoryStore.sql +++ /dev/null @@ -1,31 +0,0 @@ -BEGIN; - -ALTER TABLE inventoryfolders change folderID folderIDold varchar(36); -ALTER TABLE inventoryfolders change agentID agentIDold varchar(36); -ALTER TABLE inventoryfolders change parentFolderID parentFolderIDold varchar(36); -ALTER TABLE inventoryfolders add folderID char(36) not null default '00000000-0000-0000-0000-000000000000'; -ALTER TABLE inventoryfolders add agentID char(36) default NULL; -ALTER TABLE inventoryfolders add parentFolderID char(36) default NULL; -UPDATE inventoryfolders set folderID = folderIDold, agentID = agentIDold, parentFolderID = parentFolderIDold; -ALTER TABLE inventoryfolders drop folderIDold; -ALTER TABLE inventoryfolders drop agentIDold; -ALTER TABLE inventoryfolders drop parentFolderIDold; -ALTER TABLE inventoryfolders add constraint primary key(folderID); -ALTER TABLE inventoryfolders add index inventoryfolders_agentid(agentID); -ALTER TABLE inventoryfolders add index inventoryfolders_parentFolderid(parentFolderID); - -ALTER TABLE inventoryitems change inventoryID inventoryIDold varchar(36); -ALTER TABLE inventoryitems change avatarID avatarIDold varchar(36); -ALTER TABLE inventoryitems change parentFolderID parentFolderIDold varchar(36); -ALTER TABLE inventoryitems add inventoryID char(36) not null default '00000000-0000-0000-0000-000000000000'; -ALTER TABLE inventoryitems add avatarID char(36) default NULL; -ALTER TABLE inventoryitems add parentFolderID char(36) default NULL; -UPDATE inventoryitems set inventoryID = inventoryIDold, avatarID = avatarIDold, parentFolderID = parentFolderIDold; -ALTER TABLE inventoryitems drop inventoryIDold; -ALTER TABLE inventoryitems drop avatarIDold; -ALTER TABLE inventoryitems drop parentFolderIDold; -ALTER TABLE inventoryitems add constraint primary key(inventoryID); -ALTER TABLE inventoryitems add index inventoryitems_avatarid(avatarID); -ALTER TABLE inventoryitems add index inventoryitems_parentFolderid(parentFolderID); - -COMMIT; \ No newline at end of file diff --git a/OpenSim/Data/MySQL/Resources/002_RegionStore.sql b/OpenSim/Data/MySQL/Resources/002_RegionStore.sql deleted file mode 100644 index 45bf959..0000000 --- a/OpenSim/Data/MySQL/Resources/002_RegionStore.sql +++ /dev/null @@ -1,6 +0,0 @@ -BEGIN; - -CREATE index prims_regionuuid on prims(RegionUUID); -CREATE index primitems_primid on primitems(primID); - -COMMIT; \ No newline at end of file diff --git a/OpenSim/Data/MySQL/Resources/002_UserAccount.sql b/OpenSim/Data/MySQL/Resources/002_UserAccount.sql deleted file mode 100644 index ad2ddda..0000000 --- a/OpenSim/Data/MySQL/Resources/002_UserAccount.sql +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN; - -INSERT INTO UserAccounts (PrincipalID, ScopeID, FirstName, LastName, Email, ServiceURLs, Created) SELECT `UUID` AS PrincipalID, '00000000-0000-0000-0000-000000000000' AS ScopeID, username AS FirstName, lastname AS LastName, email as Email, CONCAT('AssetServerURI=', userAssetURI, ' InventoryServerURI=', userInventoryURI, ' GatewayURI= HomeURI=') AS ServiceURLs, created as Created FROM users; - -COMMIT; diff --git a/OpenSim/Data/MySQL/Resources/002_UserStore.sql b/OpenSim/Data/MySQL/Resources/002_UserStore.sql deleted file mode 100644 index 393cea0..0000000 --- a/OpenSim/Data/MySQL/Resources/002_UserStore.sql +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN; - -ALTER TABLE users add homeRegionID char(36) NOT NULL default '00000000-0000-0000-0000-000000000000'; - -COMMIT; diff --git a/OpenSim/Data/MySQL/Resources/003_AssetStore.sql b/OpenSim/Data/MySQL/Resources/003_AssetStore.sql deleted file mode 100644 index d489278..0000000 --- a/OpenSim/Data/MySQL/Resources/003_AssetStore.sql +++ /dev/null @@ -1,9 +0,0 @@ -BEGIN; - -ALTER TABLE assets change id oldid varchar(36); -ALTER TABLE assets add id char(36) not null default '00000000-0000-0000-0000-000000000000'; -UPDATE assets set id = oldid; -ALTER TABLE assets drop oldid; -ALTER TABLE assets add constraint primary key(id); - -COMMIT; \ No newline at end of file diff --git a/OpenSim/Data/MySQL/Resources/003_AuthStore.sql b/OpenSim/Data/MySQL/Resources/003_AuthStore.sql deleted file mode 100644 index af9ffe6..0000000 --- a/OpenSim/Data/MySQL/Resources/003_AuthStore.sql +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN; - -ALTER TABLE `auth` ADD COLUMN `accountType` VARCHAR(32) NOT NULL DEFAULT 'UserAccount'; - -COMMIT; diff --git a/OpenSim/Data/MySQL/Resources/003_GridStore.sql b/OpenSim/Data/MySQL/Resources/003_GridStore.sql deleted file mode 100644 index bc3fe7d..0000000 --- a/OpenSim/Data/MySQL/Resources/003_GridStore.sql +++ /dev/null @@ -1,7 +0,0 @@ -BEGIN; - -ALTER TABLE regions add column ScopeID char(36) not null default '00000000-0000-0000-0000-000000000000'; - -create index ScopeID on regions(ScopeID); - -COMMIT; diff --git a/OpenSim/Data/MySQL/Resources/003_InventoryStore.sql b/OpenSim/Data/MySQL/Resources/003_InventoryStore.sql deleted file mode 100644 index 4c6da91..0000000 --- a/OpenSim/Data/MySQL/Resources/003_InventoryStore.sql +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN; - -alter table inventoryitems add column inventoryGroupPermissions integer unsigned not null default 0; - -COMMIT; diff --git a/OpenSim/Data/MySQL/Resources/003_RegionStore.sql b/OpenSim/Data/MySQL/Resources/003_RegionStore.sql deleted file mode 100644 index cb0a614..0000000 --- a/OpenSim/Data/MySQL/Resources/003_RegionStore.sql +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN; - - CREATE TABLE regionban (regionUUID VARCHAR(36) NOT NULL, bannedUUID VARCHAR(36) NOT NULL, bannedIp VARCHAR(16) NOT NULL, bannedIpHostMask VARCHAR(16) NOT NULL) ENGINE=INNODB DEFAULT CHARSET=utf8 COMMENT='Rev. 1'; - -COMMIT; \ No newline at end of file diff --git a/OpenSim/Data/MySQL/Resources/003_UserAccount.sql b/OpenSim/Data/MySQL/Resources/003_UserAccount.sql deleted file mode 100644 index e42d93b..0000000 --- a/OpenSim/Data/MySQL/Resources/003_UserAccount.sql +++ /dev/null @@ -1,9 +0,0 @@ -BEGIN; - -CREATE UNIQUE INDEX PrincipalID ON UserAccounts(PrincipalID); -CREATE INDEX Email ON UserAccounts(Email); -CREATE INDEX FirstName ON UserAccounts(FirstName); -CREATE INDEX LastName ON UserAccounts(LastName); -CREATE INDEX Name ON UserAccounts(FirstName,LastName); - -COMMIT; diff --git a/OpenSim/Data/MySQL/Resources/003_UserStore.sql b/OpenSim/Data/MySQL/Resources/003_UserStore.sql deleted file mode 100644 index 6f890ee..0000000 --- a/OpenSim/Data/MySQL/Resources/003_UserStore.sql +++ /dev/null @@ -1,6 +0,0 @@ -BEGIN; - -ALTER TABLE users add userFlags integer NOT NULL default 0; -ALTER TABLE users add godLevel integer NOT NULL default 0; - -COMMIT; diff --git a/OpenSim/Data/MySQL/Resources/004_AssetStore.sql b/OpenSim/Data/MySQL/Resources/004_AssetStore.sql deleted file mode 100644 index ae1951d..0000000 --- a/OpenSim/Data/MySQL/Resources/004_AssetStore.sql +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN; - -ALTER TABLE assets drop InvType; - -COMMIT; diff --git a/OpenSim/Data/MySQL/Resources/004_GridStore.sql b/OpenSim/Data/MySQL/Resources/004_GridStore.sql deleted file mode 100644 index 2238a88..0000000 --- a/OpenSim/Data/MySQL/Resources/004_GridStore.sql +++ /dev/null @@ -1,6 +0,0 @@ -BEGIN; - -ALTER TABLE regions add column sizeX integer not null default 0; -ALTER TABLE regions add column sizeY integer not null default 0; - -COMMIT; diff --git a/OpenSim/Data/MySQL/Resources/004_InventoryStore.sql b/OpenSim/Data/MySQL/Resources/004_InventoryStore.sql deleted file mode 100644 index c45f773..0000000 --- a/OpenSim/Data/MySQL/Resources/004_InventoryStore.sql +++ /dev/null @@ -1,7 +0,0 @@ -BEGIN; - -update inventoryitems set creatorID = '00000000-0000-0000-0000-000000000000' where creatorID is NULL; -update inventoryitems set creatorID = '00000000-0000-0000-0000-000000000000' where creatorID = ''; -alter table inventoryitems modify column creatorID varchar(36) not NULL default '00000000-0000-0000-0000-000000000000'; - -COMMIT; diff --git a/OpenSim/Data/MySQL/Resources/004_RegionStore.sql b/OpenSim/Data/MySQL/Resources/004_RegionStore.sql deleted file mode 100644 index 4db2f75..0000000 --- a/OpenSim/Data/MySQL/Resources/004_RegionStore.sql +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN; - -ALTER TABLE primitems add flags integer not null default 0; - -COMMIT; \ No newline at end of file diff --git a/OpenSim/Data/MySQL/Resources/004_UserAccount.sql b/OpenSim/Data/MySQL/Resources/004_UserAccount.sql deleted file mode 100644 index 8abcd53..0000000 --- a/OpenSim/Data/MySQL/Resources/004_UserAccount.sql +++ /dev/null @@ -1,8 +0,0 @@ -BEGIN; - -ALTER TABLE UserAccounts ADD COLUMN UserLevel integer NOT NULL DEFAULT 0; -ALTER TABLE UserAccounts ADD COLUMN UserFlags integer NOT NULL DEFAULT 0; -ALTER TABLE UserAccounts ADD COLUMN UserTitle varchar(64) NOT NULL DEFAULT ''; - -COMMIT; - diff --git a/OpenSim/Data/MySQL/Resources/004_UserStore.sql b/OpenSim/Data/MySQL/Resources/004_UserStore.sql deleted file mode 100644 index 03142af..0000000 --- a/OpenSim/Data/MySQL/Resources/004_UserStore.sql +++ /dev/null @@ -1,6 +0,0 @@ -BEGIN; - -ALTER TABLE users add customType varchar(32) not null default ''; -ALTER TABLE users add partner char(36) not null default '00000000-0000-0000-0000-000000000000'; - -COMMIT; diff --git a/OpenSim/Data/MySQL/Resources/005_AssetStore.sql b/OpenSim/Data/MySQL/Resources/005_AssetStore.sql deleted file mode 100644 index bfeb652..0000000 --- a/OpenSim/Data/MySQL/Resources/005_AssetStore.sql +++ /dev/null @@ -1,6 +0,0 @@ -BEGIN; - -ALTER TABLE assets add create_time integer default 0; -ALTER TABLE assets add access_time integer default 0; - -COMMIT; diff --git a/OpenSim/Data/MySQL/Resources/005_GridStore.sql b/OpenSim/Data/MySQL/Resources/005_GridStore.sql deleted file mode 100644 index 835ba89..0000000 --- a/OpenSim/Data/MySQL/Resources/005_GridStore.sql +++ /dev/null @@ -1,6 +0,0 @@ -BEGIN; - -ALTER TABLE `regions` ADD COLUMN `flags` integer NOT NULL DEFAULT 0; -CREATE INDEX flags ON regions(flags); - -COMMIT; diff --git a/OpenSim/Data/MySQL/Resources/005_RegionStore.sql b/OpenSim/Data/MySQL/Resources/005_RegionStore.sql deleted file mode 100644 index c4a9527..0000000 --- a/OpenSim/Data/MySQL/Resources/005_RegionStore.sql +++ /dev/null @@ -1,40 +0,0 @@ -BEGIN; - -create table regionsettings ( - regionUUID char(36) not null, - block_terraform integer not null, - block_fly integer not null, - allow_damage integer not null, - restrict_pushing integer not null, - allow_land_resell integer not null, - allow_land_join_divide integer not null, - block_show_in_search integer not null, - agent_limit integer not null, - object_bonus float not null, - maturity integer not null, - disable_scripts integer not null, - disable_collisions integer not null, - disable_physics integer not null, - terrain_texture_1 char(36) not null, - terrain_texture_2 char(36) not null, - terrain_texture_3 char(36) not null, - terrain_texture_4 char(36) not null, - elevation_1_nw float not null, - elevation_2_nw float not null, - elevation_1_ne float not null, - elevation_2_ne float not null, - elevation_1_se float not null, - elevation_2_se float not null, - elevation_1_sw float not null, - elevation_2_sw float not null, - water_height float not null, - terrain_raise_limit float not null, - terrain_lower_limit float not null, - use_estate_sun integer not null, - fixed_sun integer not null, - sun_position float not null, - covenant char(36), - primary key(regionUUID) -); - -COMMIT; diff --git a/OpenSim/Data/MySQL/Resources/005_UserStore.sql b/OpenSim/Data/MySQL/Resources/005_UserStore.sql deleted file mode 100644 index 55896bc..0000000 --- a/OpenSim/Data/MySQL/Resources/005_UserStore.sql +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN; - -CREATE TABLE `avatarattachments` (`UUID` char(36) NOT NULL, `attachpoint` int(11) NOT NULL, `item` char(36) NOT NULL, `asset` char(36) NOT NULL) ENGINE=InnoDB; - -COMMIT; diff --git a/OpenSim/Data/MySQL/Resources/006_AssetStore.sql b/OpenSim/Data/MySQL/Resources/006_AssetStore.sql deleted file mode 100644 index 3104353..0000000 --- a/OpenSim/Data/MySQL/Resources/006_AssetStore.sql +++ /dev/null @@ -1 +0,0 @@ -DELETE FROM assets WHERE id = 'dc4b9f0b-d008-45c6-96a4-01dd947ac621' diff --git a/OpenSim/Data/MySQL/Resources/006_GridStore.sql b/OpenSim/Data/MySQL/Resources/006_GridStore.sql deleted file mode 100644 index 91322d6..0000000 --- a/OpenSim/Data/MySQL/Resources/006_GridStore.sql +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN; - -ALTER TABLE `regions` ADD COLUMN `last_seen` integer NOT NULL DEFAULT 0; - -COMMIT; diff --git a/OpenSim/Data/MySQL/Resources/006_RegionStore.sql b/OpenSim/Data/MySQL/Resources/006_RegionStore.sql deleted file mode 100644 index c1ba5b8..0000000 --- a/OpenSim/Data/MySQL/Resources/006_RegionStore.sql +++ /dev/null @@ -1,12 +0,0 @@ -BEGIN; - -alter table landaccesslist ENGINE = InnoDB; -alter table migrations ENGINE = InnoDB; -alter table primitems ENGINE = InnoDB; -alter table prims ENGINE = InnoDB; -alter table primshapes ENGINE = InnoDB; -alter table regionsettings ENGINE = InnoDB; -alter table terrain ENGINE = InnoDB; - -COMMIT; - diff --git a/OpenSim/Data/MySQL/Resources/006_UserStore.sql b/OpenSim/Data/MySQL/Resources/006_UserStore.sql deleted file mode 100644 index 10b321e..0000000 --- a/OpenSim/Data/MySQL/Resources/006_UserStore.sql +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN; - -ALTER TABLE agents add currentLookAt varchar(36) not null default ''; - -COMMIT; diff --git a/OpenSim/Data/MySQL/Resources/007_GridStore.sql b/OpenSim/Data/MySQL/Resources/007_GridStore.sql deleted file mode 100644 index dbec584..0000000 --- a/OpenSim/Data/MySQL/Resources/007_GridStore.sql +++ /dev/null @@ -1,7 +0,0 @@ -BEGIN; - -ALTER TABLE `regions` ADD COLUMN `PrincipalID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000'; -ALTER TABLE `regions` ADD COLUMN `Token` varchar(255) NOT NULL; - -COMMIT; - diff --git a/OpenSim/Data/MySQL/Resources/007_RegionStore.sql b/OpenSim/Data/MySQL/Resources/007_RegionStore.sql deleted file mode 100644 index 404d248..0000000 --- a/OpenSim/Data/MySQL/Resources/007_RegionStore.sql +++ /dev/null @@ -1,25 +0,0 @@ -BEGIN; - -ALTER TABLE prims change UUID UUIDold varchar(255); -ALTER TABLE prims change RegionUUID RegionUUIDold varchar(255); -ALTER TABLE prims change CreatorID CreatorIDold varchar(255); -ALTER TABLE prims change OwnerID OwnerIDold varchar(255); -ALTER TABLE prims change GroupID GroupIDold varchar(255); -ALTER TABLE prims change LastOwnerID LastOwnerIDold varchar(255); -ALTER TABLE prims add UUID char(36); -ALTER TABLE prims add RegionUUID char(36); -ALTER TABLE prims add CreatorID char(36); -ALTER TABLE prims add OwnerID char(36); -ALTER TABLE prims add GroupID char(36); -ALTER TABLE prims add LastOwnerID char(36); -UPDATE prims set UUID = UUIDold, RegionUUID = RegionUUIDold, CreatorID = CreatorIDold, OwnerID = OwnerIDold, GroupID = GroupIDold, LastOwnerID = LastOwnerIDold; -ALTER TABLE prims drop UUIDold; -ALTER TABLE prims drop RegionUUIDold; -ALTER TABLE prims drop CreatorIDold; -ALTER TABLE prims drop OwnerIDold; -ALTER TABLE prims drop GroupIDold; -ALTER TABLE prims drop LastOwnerIDold; -ALTER TABLE prims add constraint primary key(UUID); -ALTER TABLE prims add index prims_regionuuid(RegionUUID); - -COMMIT; \ No newline at end of file diff --git a/OpenSim/Data/MySQL/Resources/007_UserStore.sql b/OpenSim/Data/MySQL/Resources/007_UserStore.sql deleted file mode 100644 index 3ab5261..0000000 --- a/OpenSim/Data/MySQL/Resources/007_UserStore.sql +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN; - -ALTER TABLE users add email varchar(250); - -COMMIT; diff --git a/OpenSim/Data/MySQL/Resources/008_RegionStore.sql b/OpenSim/Data/MySQL/Resources/008_RegionStore.sql deleted file mode 100644 index 7bc61c0..0000000 --- a/OpenSim/Data/MySQL/Resources/008_RegionStore.sql +++ /dev/null @@ -1,9 +0,0 @@ -BEGIN; - -ALTER TABLE primshapes change UUID UUIDold varchar(255); -ALTER TABLE primshapes add UUID char(36); -UPDATE primshapes set UUID = UUIDold; -ALTER TABLE primshapes drop UUIDold; -ALTER TABLE primshapes add constraint primary key(UUID); - -COMMIT; \ No newline at end of file diff --git a/OpenSim/Data/MySQL/Resources/008_UserStore.sql b/OpenSim/Data/MySQL/Resources/008_UserStore.sql deleted file mode 100644 index 4500bd5..0000000 --- a/OpenSim/Data/MySQL/Resources/008_UserStore.sql +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN; - -ALTER TABLE users add scopeID char(36) not null default '00000000-0000-0000-0000-000000000000'; - -COMMIT; diff --git a/OpenSim/Data/MySQL/Resources/009_RegionStore.sql b/OpenSim/Data/MySQL/Resources/009_RegionStore.sql deleted file mode 100644 index 284732a..0000000 --- a/OpenSim/Data/MySQL/Resources/009_RegionStore.sql +++ /dev/null @@ -1,31 +0,0 @@ -BEGIN; - -ALTER TABLE primitems change itemID itemIDold varchar(255); -ALTER TABLE primitems change primID primIDold varchar(255); -ALTER TABLE primitems change assetID assetIDold varchar(255); -ALTER TABLE primitems change parentFolderID parentFolderIDold varchar(255); -ALTER TABLE primitems change creatorID creatorIDold varchar(255); -ALTER TABLE primitems change ownerID ownerIDold varchar(255); -ALTER TABLE primitems change groupID groupIDold varchar(255); -ALTER TABLE primitems change lastOwnerID lastOwnerIDold varchar(255); -ALTER TABLE primitems add itemID char(36); -ALTER TABLE primitems add primID char(36); -ALTER TABLE primitems add assetID char(36); -ALTER TABLE primitems add parentFolderID char(36); -ALTER TABLE primitems add creatorID char(36); -ALTER TABLE primitems add ownerID char(36); -ALTER TABLE primitems add groupID char(36); -ALTER TABLE primitems add lastOwnerID char(36); -UPDATE primitems set itemID = itemIDold, primID = primIDold, assetID = assetIDold, parentFolderID = parentFolderIDold, creatorID = creatorIDold, ownerID = ownerIDold, groupID = groupIDold, lastOwnerID = lastOwnerIDold; -ALTER TABLE primitems drop itemIDold; -ALTER TABLE primitems drop primIDold; -ALTER TABLE primitems drop assetIDold; -ALTER TABLE primitems drop parentFolderIDold; -ALTER TABLE primitems drop creatorIDold; -ALTER TABLE primitems drop ownerIDold; -ALTER TABLE primitems drop groupIDold; -ALTER TABLE primitems drop lastOwnerIDold; -ALTER TABLE primitems add constraint primary key(itemID); -ALTER TABLE primitems add index primitems_primid(primID); - -COMMIT; \ No newline at end of file diff --git a/OpenSim/Data/MySQL/Resources/010_RegionStore.sql b/OpenSim/Data/MySQL/Resources/010_RegionStore.sql deleted file mode 100644 index 031a746..0000000 --- a/OpenSim/Data/MySQL/Resources/010_RegionStore.sql +++ /dev/null @@ -1,9 +0,0 @@ -# 1 "010_RegionStore.sql" -# 1 "" -# 1 "" -# 1 "010_RegionStore.sql" -BEGIN; - -DELETE FROM regionsettings; - -COMMIT; diff --git a/OpenSim/Data/MySQL/Resources/011_RegionStore.sql b/OpenSim/Data/MySQL/Resources/011_RegionStore.sql deleted file mode 100644 index ab01969..0000000 --- a/OpenSim/Data/MySQL/Resources/011_RegionStore.sql +++ /dev/null @@ -1,9 +0,0 @@ -BEGIN; - -ALTER TABLE prims change SceneGroupID SceneGroupIDold varchar(255); -ALTER TABLE prims add SceneGroupID char(36); -UPDATE prims set SceneGroupID = SceneGroupIDold; -ALTER TABLE prims drop SceneGroupIDold; -ALTER TABLE prims add index prims_scenegroupid(SceneGroupID); - -COMMIT; \ No newline at end of file diff --git a/OpenSim/Data/MySQL/Resources/012_RegionStore.sql b/OpenSim/Data/MySQL/Resources/012_RegionStore.sql deleted file mode 100644 index 95c2757..0000000 --- a/OpenSim/Data/MySQL/Resources/012_RegionStore.sql +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN; - -ALTER TABLE prims add index prims_parentid(ParentID); - -COMMIT; \ No newline at end of file diff --git a/OpenSim/Data/MySQL/Resources/013_RegionStore.sql b/OpenSim/Data/MySQL/Resources/013_RegionStore.sql deleted file mode 100644 index a6bd30d..0000000 --- a/OpenSim/Data/MySQL/Resources/013_RegionStore.sql +++ /dev/null @@ -1,103 +0,0 @@ -begin; - -drop table regionsettings; - -CREATE TABLE `regionsettings` ( - `regionUUID` char(36) NOT NULL, - `block_terraform` int(11) NOT NULL, - `block_fly` int(11) NOT NULL, - `allow_damage` int(11) NOT NULL, - `restrict_pushing` int(11) NOT NULL, - `allow_land_resell` int(11) NOT NULL, - `allow_land_join_divide` int(11) NOT NULL, - `block_show_in_search` int(11) NOT NULL, - `agent_limit` int(11) NOT NULL, - `object_bonus` float NOT NULL, - `maturity` int(11) NOT NULL, - `disable_scripts` int(11) NOT NULL, - `disable_collisions` int(11) NOT NULL, - `disable_physics` int(11) NOT NULL, - `terrain_texture_1` char(36) NOT NULL, - `terrain_texture_2` char(36) NOT NULL, - `terrain_texture_3` char(36) NOT NULL, - `terrain_texture_4` char(36) NOT NULL, - `elevation_1_nw` float NOT NULL, - `elevation_2_nw` float NOT NULL, - `elevation_1_ne` float NOT NULL, - `elevation_2_ne` float NOT NULL, - `elevation_1_se` float NOT NULL, - `elevation_2_se` float NOT NULL, - `elevation_1_sw` float NOT NULL, - `elevation_2_sw` float NOT NULL, - `water_height` float NOT NULL, - `terrain_raise_limit` float NOT NULL, - `terrain_lower_limit` float NOT NULL, - `use_estate_sun` int(11) NOT NULL, - `fixed_sun` int(11) NOT NULL, - `sun_position` float NOT NULL, - `covenant` char(36) default NULL, - `Sandbox` tinyint(4) NOT NULL, - PRIMARY KEY (`regionUUID`) -) ENGINE=InnoDB; - -CREATE TABLE `estate_managers` ( - `EstateID` int(10) unsigned NOT NULL, - `uuid` char(36) NOT NULL, - KEY `EstateID` (`EstateID`) -) ENGINE=InnoDB; - -CREATE TABLE `estate_groups` ( - `EstateID` int(10) unsigned NOT NULL, - `uuid` char(36) NOT NULL, - KEY `EstateID` (`EstateID`) -) ENGINE=InnoDB; - -CREATE TABLE `estate_users` ( - `EstateID` int(10) unsigned NOT NULL, - `uuid` char(36) NOT NULL, - KEY `EstateID` (`EstateID`) -) ENGINE=InnoDB; - -CREATE TABLE `estateban` ( - `EstateID` int(10) unsigned NOT NULL, - `bannedUUID` varchar(36) NOT NULL, - `bannedIp` varchar(16) NOT NULL, - `bannedIpHostMask` varchar(16) NOT NULL, - `bannedNameMask` varchar(64) default NULL, - KEY `estateban_EstateID` (`EstateID`) -) ENGINE=InnoDB; - -CREATE TABLE `estate_settings` ( - `EstateID` int(10) unsigned NOT NULL auto_increment, - `EstateName` varchar(64) default NULL, - `AbuseEmailToEstateOwner` tinyint(4) NOT NULL, - `DenyAnonymous` tinyint(4) NOT NULL, - `ResetHomeOnTeleport` tinyint(4) NOT NULL, - `FixedSun` tinyint(4) NOT NULL, - `DenyTransacted` tinyint(4) NOT NULL, - `BlockDwell` tinyint(4) NOT NULL, - `DenyIdentified` tinyint(4) NOT NULL, - `AllowVoice` tinyint(4) NOT NULL, - `UseGlobalTime` tinyint(4) NOT NULL, - `PricePerMeter` int(11) NOT NULL, - `TaxFree` tinyint(4) NOT NULL, - `AllowDirectTeleport` tinyint(4) NOT NULL, - `RedirectGridX` int(11) NOT NULL, - `RedirectGridY` int(11) NOT NULL, - `ParentEstateID` int(10) unsigned NOT NULL, - `SunPosition` double NOT NULL, - `EstateSkipScripts` tinyint(4) NOT NULL, - `BillableFactor` float NOT NULL, - `PublicAccess` tinyint(4) NOT NULL, - PRIMARY KEY (`EstateID`) -) ENGINE=InnoDB AUTO_INCREMENT=100; - -CREATE TABLE `estate_map` ( - `RegionID` char(36) NOT NULL default '00000000-0000-0000-0000-000000000000', - `EstateID` int(11) NOT NULL, - PRIMARY KEY (`RegionID`), - KEY `EstateID` (`EstateID`) -) ENGINE=InnoDB; - -commit; - diff --git a/OpenSim/Data/MySQL/Resources/014_RegionStore.sql b/OpenSim/Data/MySQL/Resources/014_RegionStore.sql deleted file mode 100644 index 788fd63..0000000 --- a/OpenSim/Data/MySQL/Resources/014_RegionStore.sql +++ /dev/null @@ -1,8 +0,0 @@ -begin; - -alter table estate_settings add column AbuseEmail varchar(255) not null; - -alter table estate_settings add column EstateOwner varchar(36) not null; - -commit; - diff --git a/OpenSim/Data/MySQL/Resources/015_RegionStore.sql b/OpenSim/Data/MySQL/Resources/015_RegionStore.sql deleted file mode 100644 index 6d4f9f3..0000000 --- a/OpenSim/Data/MySQL/Resources/015_RegionStore.sql +++ /dev/null @@ -1,6 +0,0 @@ -begin; - -alter table estate_settings add column DenyMinors tinyint not null; - -commit; - diff --git a/OpenSim/Data/MySQL/Resources/016_RegionStore.sql b/OpenSim/Data/MySQL/Resources/016_RegionStore.sql deleted file mode 100644 index 9bc265e..0000000 --- a/OpenSim/Data/MySQL/Resources/016_RegionStore.sql +++ /dev/null @@ -1,27 +0,0 @@ -BEGIN; - -ALTER TABLE prims ADD COLUMN PayPrice integer not null default 0; -ALTER TABLE prims ADD COLUMN PayButton1 integer not null default 0; -ALTER TABLE prims ADD COLUMN PayButton2 integer not null default 0; -ALTER TABLE prims ADD COLUMN PayButton3 integer not null default 0; -ALTER TABLE prims ADD COLUMN PayButton4 integer not null default 0; -ALTER TABLE prims ADD COLUMN LoopedSound char(36) not null default '00000000-0000-0000-0000-000000000000'; -ALTER TABLE prims ADD COLUMN LoopedSoundGain float not null default 0.0; -ALTER TABLE prims ADD COLUMN TextureAnimation blob; -ALTER TABLE prims ADD COLUMN OmegaX float not null default 0.0; -ALTER TABLE prims ADD COLUMN OmegaY float not null default 0.0; -ALTER TABLE prims ADD COLUMN OmegaZ float not null default 0.0; -ALTER TABLE prims ADD COLUMN CameraEyeOffsetX float not null default 0.0; -ALTER TABLE prims ADD COLUMN CameraEyeOffsetY float not null default 0.0; -ALTER TABLE prims ADD COLUMN CameraEyeOffsetZ float not null default 0.0; -ALTER TABLE prims ADD COLUMN CameraAtOffsetX float not null default 0.0; -ALTER TABLE prims ADD COLUMN CameraAtOffsetY float not null default 0.0; -ALTER TABLE prims ADD COLUMN CameraAtOffsetZ float not null default 0.0; -ALTER TABLE prims ADD COLUMN ForceMouselook tinyint not null default 0; -ALTER TABLE prims ADD COLUMN ScriptAccessPin integer not null default 0; -ALTER TABLE prims ADD COLUMN AllowedDrop tinyint not null default 0; -ALTER TABLE prims ADD COLUMN DieAtEdge tinyint not null default 0; -ALTER TABLE prims ADD COLUMN SalePrice integer not null default 10; -ALTER TABLE prims ADD COLUMN SaleType tinyint not null default 0; - -COMMIT; diff --git a/OpenSim/Data/MySQL/Resources/017_RegionStore.sql b/OpenSim/Data/MySQL/Resources/017_RegionStore.sql deleted file mode 100644 index 0304f30..0000000 --- a/OpenSim/Data/MySQL/Resources/017_RegionStore.sql +++ /dev/null @@ -1,9 +0,0 @@ -BEGIN; - -ALTER TABLE prims ADD COLUMN ColorR integer not null default 0; -ALTER TABLE prims ADD COLUMN ColorG integer not null default 0; -ALTER TABLE prims ADD COLUMN ColorB integer not null default 0; -ALTER TABLE prims ADD COLUMN ColorA integer not null default 0; -ALTER TABLE prims ADD COLUMN ParticleSystem blob; - -COMMIT; diff --git a/OpenSim/Data/MySQL/Resources/018_RegionStore.sql b/OpenSim/Data/MySQL/Resources/018_RegionStore.sql deleted file mode 100644 index 68c489c..0000000 --- a/OpenSim/Data/MySQL/Resources/018_RegionStore.sql +++ /dev/null @@ -1,6 +0,0 @@ -begin; - -ALTER TABLE prims ADD COLUMN ClickAction tinyint NOT NULL default 0; - -commit; - diff --git a/OpenSim/Data/MySQL/Resources/019_RegionStore.sql b/OpenSim/Data/MySQL/Resources/019_RegionStore.sql deleted file mode 100644 index 4c14f2a..0000000 --- a/OpenSim/Data/MySQL/Resources/019_RegionStore.sql +++ /dev/null @@ -1,6 +0,0 @@ -begin; - -ALTER TABLE prims ADD COLUMN Material tinyint NOT NULL default 3; - -commit; - diff --git a/OpenSim/Data/MySQL/Resources/020_RegionStore.sql b/OpenSim/Data/MySQL/Resources/020_RegionStore.sql deleted file mode 100644 index 814ef48..0000000 --- a/OpenSim/Data/MySQL/Resources/020_RegionStore.sql +++ /dev/null @@ -1,7 +0,0 @@ -begin; - -ALTER TABLE land ADD COLUMN OtherCleanTime integer NOT NULL default 0; -ALTER TABLE land ADD COLUMN Dwell integer NOT NULL default 0; - -commit; - diff --git a/OpenSim/Data/MySQL/Resources/021_RegionStore.sql b/OpenSim/Data/MySQL/Resources/021_RegionStore.sql deleted file mode 100644 index c59b27e..0000000 --- a/OpenSim/Data/MySQL/Resources/021_RegionStore.sql +++ /dev/null @@ -1,8 +0,0 @@ -begin; - -ALTER TABLE regionsettings ADD COLUMN sunvectorx double NOT NULL default 0; -ALTER TABLE regionsettings ADD COLUMN sunvectory double NOT NULL default 0; -ALTER TABLE regionsettings ADD COLUMN sunvectorz double NOT NULL default 0; - -commit; - diff --git a/OpenSim/Data/MySQL/Resources/022_RegionStore.sql b/OpenSim/Data/MySQL/Resources/022_RegionStore.sql deleted file mode 100644 index df0bb7d..0000000 --- a/OpenSim/Data/MySQL/Resources/022_RegionStore.sql +++ /dev/null @@ -1,6 +0,0 @@ -BEGIN; - -ALTER TABLE prims ADD COLUMN CollisionSound char(36) not null default '00000000-0000-0000-0000-000000000000'; -ALTER TABLE prims ADD COLUMN CollisionSoundVolume float not null default 0.0; - -COMMIT; diff --git a/OpenSim/Data/MySQL/Resources/023_RegionStore.sql b/OpenSim/Data/MySQL/Resources/023_RegionStore.sql deleted file mode 100644 index 559591f..0000000 --- a/OpenSim/Data/MySQL/Resources/023_RegionStore.sql +++ /dev/null @@ -1,6 +0,0 @@ -BEGIN; - -ALTER TABLE prims ADD COLUMN LinkNumber integer not null default 0; - -COMMIT; - diff --git a/OpenSim/Data/MySQL/Resources/024_RegionStore.sql b/OpenSim/Data/MySQL/Resources/024_RegionStore.sql deleted file mode 100644 index defbf5c..0000000 --- a/OpenSim/Data/MySQL/Resources/024_RegionStore.sql +++ /dev/null @@ -1,18 +0,0 @@ -BEGIN; - -alter table regionsettings change column `object_bonus` `object_bonus` double NOT NULL; -alter table regionsettings change column `elevation_1_nw` `elevation_1_nw` double NOT NULL; -alter table regionsettings change column `elevation_2_nw` `elevation_2_nw` double NOT NULL; -alter table regionsettings change column `elevation_1_ne` `elevation_1_ne` double NOT NULL; -alter table regionsettings change column `elevation_2_ne` `elevation_2_ne` double NOT NULL; -alter table regionsettings change column `elevation_1_se` `elevation_1_se` double NOT NULL; -alter table regionsettings change column `elevation_2_se` `elevation_2_se` double NOT NULL; -alter table regionsettings change column `elevation_1_sw` `elevation_1_sw` double NOT NULL; -alter table regionsettings change column `elevation_2_sw` `elevation_2_sw` double NOT NULL; -alter table regionsettings change column `water_height` `water_height` double NOT NULL; -alter table regionsettings change column `terrain_raise_limit` `terrain_raise_limit` double NOT NULL; -alter table regionsettings change column `terrain_lower_limit` `terrain_lower_limit` double NOT NULL; -alter table regionsettings change column `sun_position` `sun_position` double NOT NULL; - -COMMIT; - diff --git a/OpenSim/Data/MySQL/Resources/025_RegionStore.sql b/OpenSim/Data/MySQL/Resources/025_RegionStore.sql deleted file mode 100644 index e8f5d70..0000000 --- a/OpenSim/Data/MySQL/Resources/025_RegionStore.sql +++ /dev/null @@ -1,46 +0,0 @@ -BEGIN; - -alter table prims change column `PositionX` `PositionX` double default NULL; -alter table prims change column `PositionY` `PositionY` double default NULL; -alter table prims change column `PositionZ` `PositionZ` double default NULL; -alter table prims change column `GroupPositionX` `GroupPositionX` double default NULL; -alter table prims change column `GroupPositionY` `GroupPositionY` double default NULL; -alter table prims change column `GroupPositionZ` `GroupPositionZ` double default NULL; -alter table prims change column `VelocityX` `VelocityX` double default NULL; -alter table prims change column `VelocityY` `VelocityY` double default NULL; -alter table prims change column `VelocityZ` `VelocityZ` double default NULL; -alter table prims change column `AngularVelocityX` `AngularVelocityX` double default NULL; -alter table prims change column `AngularVelocityY` `AngularVelocityY` double default NULL; -alter table prims change column `AngularVelocityZ` `AngularVelocityZ` double default NULL; -alter table prims change column `AccelerationX` `AccelerationX` double default NULL; -alter table prims change column `AccelerationY` `AccelerationY` double default NULL; -alter table prims change column `AccelerationZ` `AccelerationZ` double default NULL; -alter table prims change column `RotationX` `RotationX` double default NULL; -alter table prims change column `RotationY` `RotationY` double default NULL; -alter table prims change column `RotationZ` `RotationZ` double default NULL; -alter table prims change column `RotationW` `RotationW` double default NULL; -alter table prims change column `SitTargetOffsetX` `SitTargetOffsetX` double default NULL; -alter table prims change column `SitTargetOffsetY` `SitTargetOffsetY` double default NULL; -alter table prims change column `SitTargetOffsetZ` `SitTargetOffsetZ` double default NULL; -alter table prims change column `SitTargetOrientW` `SitTargetOrientW` double default NULL; -alter table prims change column `SitTargetOrientX` `SitTargetOrientX` double default NULL; -alter table prims change column `SitTargetOrientY` `SitTargetOrientY` double default NULL; -alter table prims change column `SitTargetOrientZ` `SitTargetOrientZ` double default NULL; -alter table prims change column `LoopedSoundGain` `LoopedSoundGain` double NOT NULL default '0'; -alter table prims change column `OmegaX` `OmegaX` double NOT NULL default '0'; -alter table prims change column `OmegaY` `OmegaY` double NOT NULL default '0'; -alter table prims change column `OmegaZ` `OmegaZ` double NOT NULL default '0'; -alter table prims change column `CameraEyeOffsetX` `CameraEyeOffsetX` double NOT NULL default '0'; -alter table prims change column `CameraEyeOffsetY` `CameraEyeOffsetY` double NOT NULL default '0'; -alter table prims change column `CameraEyeOffsetZ` `CameraEyeOffsetZ` double NOT NULL default '0'; -alter table prims change column `CameraAtOffsetX` `CameraAtOffsetX` double NOT NULL default '0'; -alter table prims change column `CameraAtOffsetY` `CameraAtOffsetY` double NOT NULL default '0'; -alter table prims change column `CameraAtOffsetZ` `CameraAtOffsetZ` double NOT NULL default '0'; -alter table prims change column `CollisionSoundVolume` `CollisionSoundVolume` double NOT NULL default '0'; - -alter table primshapes change column `ScaleX` `ScaleX` double NOT NULL default '0'; -alter table primshapes change column `ScaleY` `ScaleY` double NOT NULL default '0'; -alter table primshapes change column `ScaleZ` `ScaleZ` double NOT NULL default '0'; - -COMMIT; - diff --git a/OpenSim/Data/MySQL/Resources/026_RegionStore.sql b/OpenSim/Data/MySQL/Resources/026_RegionStore.sql deleted file mode 100644 index 91af8a8..0000000 --- a/OpenSim/Data/MySQL/Resources/026_RegionStore.sql +++ /dev/null @@ -1,41 +0,0 @@ -begin; - -alter table prims change column `PositionX` `PositionX` double default NULL; -alter table prims change column `PositionY` `PositionY` double default NULL; -alter table prims change column `PositionZ` `PositionZ` double default NULL; -alter table prims change column `GroupPositionX` `GroupPositionX` double default NULL; -alter table prims change column `GroupPositionY` `GroupPositionY` double default NULL; -alter table prims change column `GroupPositionZ` `GroupPositionZ` double default NULL; -alter table prims change column `VelocityX` `VelocityX` double default NULL; -alter table prims change column `VelocityY` `VelocityY` double default NULL; -alter table prims change column `VelocityZ` `VelocityZ` double default NULL; -alter table prims change column `AngularVelocityX` `AngularVelocityX` double default NULL; -alter table prims change column `AngularVelocityY` `AngularVelocityY` double default NULL; -alter table prims change column `AngularVelocityZ` `AngularVelocityZ` double default NULL; -alter table prims change column `AccelerationX` `AccelerationX` double default NULL; -alter table prims change column `AccelerationY` `AccelerationY` double default NULL; -alter table prims change column `AccelerationZ` `AccelerationZ` double default NULL; -alter table prims change column `RotationX` `RotationX` double default NULL; -alter table prims change column `RotationY` `RotationY` double default NULL; -alter table prims change column `RotationZ` `RotationZ` double default NULL; -alter table prims change column `RotationW` `RotationW` double default NULL; -alter table prims change column `SitTargetOffsetX` `SitTargetOffsetX` double default NULL; -alter table prims change column `SitTargetOffsetY` `SitTargetOffsetY` double default NULL; -alter table prims change column `SitTargetOffsetZ` `SitTargetOffsetZ` double default NULL; -alter table prims change column `SitTargetOrientW` `SitTargetOrientW` double default NULL; -alter table prims change column `SitTargetOrientX` `SitTargetOrientX` double default NULL; -alter table prims change column `SitTargetOrientY` `SitTargetOrientY` double default NULL; -alter table prims change column `SitTargetOrientZ` `SitTargetOrientZ` double default NULL; -alter table prims change column `LoopedSoundGain` `LoopedSoundGain` double NOT NULL default '0'; -alter table prims change column `OmegaX` `OmegaX` double NOT NULL default '0'; -alter table prims change column `OmegaY` `OmegaY` double NOT NULL default '0'; -alter table prims change column `OmegaZ` `OmegaZ` double NOT NULL default '0'; -alter table prims change column `CameraEyeOffsetX` `CameraEyeOffsetX` double NOT NULL default '0'; -alter table prims change column `CameraEyeOffsetY` `CameraEyeOffsetY` double NOT NULL default '0'; -alter table prims change column `CameraEyeOffsetZ` `CameraEyeOffsetZ` double NOT NULL default '0'; -alter table prims change column `CameraAtOffsetX` `CameraAtOffsetX` double NOT NULL default '0'; -alter table prims change column `CameraAtOffsetY` `CameraAtOffsetY` double NOT NULL default '0'; -alter table prims change column `CameraAtOffsetZ` `CameraAtOffsetZ` double NOT NULL default '0'; -alter table prims change column `CollisionSoundVolume` `CollisionSoundVolume` double NOT NULL default '0'; - -commit; diff --git a/OpenSim/Data/MySQL/Resources/027_RegionStore.sql b/OpenSim/Data/MySQL/Resources/027_RegionStore.sql deleted file mode 100644 index e1efab3..0000000 --- a/OpenSim/Data/MySQL/Resources/027_RegionStore.sql +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN; - -ALTER TABLE prims DROP COLUMN ParentID; - -COMMIT; \ No newline at end of file diff --git a/OpenSim/Data/MySQL/Resources/028_RegionStore.sql b/OpenSim/Data/MySQL/Resources/028_RegionStore.sql deleted file mode 100644 index 078394f..0000000 --- a/OpenSim/Data/MySQL/Resources/028_RegionStore.sql +++ /dev/null @@ -1,79 +0,0 @@ -BEGIN; - -update terrain - set RegionUUID = concat(substr(RegionUUID, 1, 8), "-", substr(RegionUUID, 9, 4), "-", substr(RegionUUID, 13, 4), "-", substr(RegionUUID, 17, 4), "-", substr(RegionUUID, 21, 12)) - where RegionUUID not like '%-%'; - - -update landaccesslist - set LandUUID = concat(substr(LandUUID, 1, 8), "-", substr(LandUUID, 9, 4), "-", substr(LandUUID, 13, 4), "-", substr(LandUUID, 17, 4), "-", substr(LandUUID, 21, 12)) - where LandUUID not like '%-%'; - -update landaccesslist - set AccessUUID = concat(substr(AccessUUID, 1, 8), "-", substr(AccessUUID, 9, 4), "-", substr(AccessUUID, 13, 4), "-", substr(AccessUUID, 17, 4), "-", substr(AccessUUID, 21, 12)) - where AccessUUID not like '%-%'; - - -update prims - set UUID = concat(substr(UUID, 1, 8), "-", substr(UUID, 9, 4), "-", substr(UUID, 13, 4), "-", substr(UUID, 17, 4), "-", substr(UUID, 21, 12)) - where UUID not like '%-%'; - -update prims - set RegionUUID = concat(substr(RegionUUID, 1, 8), "-", substr(RegionUUID, 9, 4), "-", substr(RegionUUID, 13, 4), "-", substr(RegionUUID, 17, 4), "-", substr(RegionUUID, 21, 12)) - where RegionUUID not like '%-%'; - -update prims - set SceneGroupID = concat(substr(SceneGroupID, 1, 8), "-", substr(SceneGroupID, 9, 4), "-", substr(SceneGroupID, 13, 4), "-", substr(SceneGroupID, 17, 4), "-", substr(SceneGroupID, 21, 12)) - where SceneGroupID not like '%-%'; - -update prims - set CreatorID = concat(substr(CreatorID, 1, 8), "-", substr(CreatorID, 9, 4), "-", substr(CreatorID, 13, 4), "-", substr(CreatorID, 17, 4), "-", substr(CreatorID, 21, 12)) - where CreatorID not like '%-%'; - -update prims - set OwnerID = concat(substr(OwnerID, 1, 8), "-", substr(OwnerID, 9, 4), "-", substr(OwnerID, 13, 4), "-", substr(OwnerID, 17, 4), "-", substr(OwnerID, 21, 12)) - where OwnerID not like '%-%'; - -update prims - set GroupID = concat(substr(GroupID, 1, 8), "-", substr(GroupID, 9, 4), "-", substr(GroupID, 13, 4), "-", substr(GroupID, 17, 4), "-", substr(GroupID, 21, 12)) - where GroupID not like '%-%'; - -update prims - set LastOwnerID = concat(substr(LastOwnerID, 1, 8), "-", substr(LastOwnerID, 9, 4), "-", substr(LastOwnerID, 13, 4), "-", substr(LastOwnerID, 17, 4), "-", substr(LastOwnerID, 21, 12)) - where LastOwnerID not like '%-%'; - - -update primshapes - set UUID = concat(substr(UUID, 1, 8), "-", substr(UUID, 9, 4), "-", substr(UUID, 13, 4), "-", substr(UUID, 17, 4), "-", substr(UUID, 21, 12)) - where UUID not like '%-%'; - - -update land - set UUID = concat(substr(UUID, 1, 8), "-", substr(UUID, 9, 4), "-", substr(UUID, 13, 4), "-", substr(UUID, 17, 4), "-", substr(UUID, 21, 12)) - where UUID not like '%-%'; - -update land - set RegionUUID = concat(substr(RegionUUID, 1, 8), "-", substr(RegionUUID, 9, 4), "-", substr(RegionUUID, 13, 4), "-", substr(RegionUUID, 17, 4), "-", substr(RegionUUID, 21, 12)) - where RegionUUID not like '%-%'; - -update land - set OwnerUUID = concat(substr(OwnerUUID, 1, 8), "-", substr(OwnerUUID, 9, 4), "-", substr(OwnerUUID, 13, 4), "-", substr(OwnerUUID, 17, 4), "-", substr(OwnerUUID, 21, 12)) - where OwnerUUID not like '%-%'; - -update land - set GroupUUID = concat(substr(GroupUUID, 1, 8), "-", substr(GroupUUID, 9, 4), "-", substr(GroupUUID, 13, 4), "-", substr(GroupUUID, 17, 4), "-", substr(GroupUUID, 21, 12)) - where GroupUUID not like '%-%'; - -update land - set MediaTextureUUID = concat(substr(MediaTextureUUID, 1, 8), "-", substr(MediaTextureUUID, 9, 4), "-", substr(MediaTextureUUID, 13, 4), "-", substr(MediaTextureUUID, 17, 4), "-", substr(MediaTextureUUID, 21, 12)) - where MediaTextureUUID not like '%-%'; - -update land - set SnapshotUUID = concat(substr(SnapshotUUID, 1, 8), "-", substr(SnapshotUUID, 9, 4), "-", substr(SnapshotUUID, 13, 4), "-", substr(SnapshotUUID, 17, 4), "-", substr(SnapshotUUID, 21, 12)) - where SnapshotUUID not like '%-%'; - -update land - set AuthbuyerID = concat(substr(AuthbuyerID, 1, 8), "-", substr(AuthbuyerID, 9, 4), "-", substr(AuthbuyerID, 13, 4), "-", substr(AuthbuyerID, 17, 4), "-", substr(AuthbuyerID, 21, 12)) - where AuthbuyerID not like '%-%'; - -COMMIT; \ No newline at end of file diff --git a/OpenSim/Data/MySQL/Resources/029_RegionStore.sql b/OpenSim/Data/MySQL/Resources/029_RegionStore.sql deleted file mode 100644 index b5962a2..0000000 --- a/OpenSim/Data/MySQL/Resources/029_RegionStore.sql +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN; - -ALTER TABLE prims ADD COLUMN PassTouches tinyint not null default 0; - -COMMIT; diff --git a/OpenSim/Data/MySQL/Resources/030_RegionStore.sql b/OpenSim/Data/MySQL/Resources/030_RegionStore.sql deleted file mode 100644 index dfdcf6d..0000000 --- a/OpenSim/Data/MySQL/Resources/030_RegionStore.sql +++ /dev/null @@ -1,7 +0,0 @@ -BEGIN; - -ALTER TABLE regionsettings ADD COLUMN loaded_creation_date varchar(20) default NULL; -ALTER TABLE regionsettings ADD COLUMN loaded_creation_time varchar(20) default NULL; -ALTER TABLE regionsettings ADD COLUMN loaded_creation_id varchar(64) default NULL; - -COMMIT; diff --git a/OpenSim/Data/MySQL/Resources/031_RegionStore.sql b/OpenSim/Data/MySQL/Resources/031_RegionStore.sql deleted file mode 100644 index d069296..0000000 --- a/OpenSim/Data/MySQL/Resources/031_RegionStore.sql +++ /dev/null @@ -1,7 +0,0 @@ -BEGIN; - -ALTER TABLE regionsettings DROP COLUMN loaded_creation_date; -ALTER TABLE regionsettings DROP COLUMN loaded_creation_time; -ALTER TABLE regionsettings ADD COLUMN loaded_creation_datetime int unsigned NOT NULL default 0; - -COMMIT; diff --git a/OpenSim/Data/MySQL/Resources/032_RegionStore.sql b/OpenSim/Data/MySQL/Resources/032_RegionStore.sql deleted file mode 100644 index dca5de7..0000000 --- a/OpenSim/Data/MySQL/Resources/032_RegionStore.sql +++ /dev/null @@ -1,3 +0,0 @@ -BEGIN; -ALTER TABLE estate_settings AUTO_INCREMENT = 100; -COMMIT; diff --git a/OpenSim/Data/MySQL/Resources/AssetStore.migrations b/OpenSim/Data/MySQL/Resources/AssetStore.migrations new file mode 100644 index 0000000..b9595f0 --- /dev/null +++ b/OpenSim/Data/MySQL/Resources/AssetStore.migrations @@ -0,0 +1,69 @@ +# ----------------- +:VERSION 1 + +BEGIN; + +CREATE TABLE `assets` ( + `id` binary(16) NOT NULL, + `name` varchar(64) NOT NULL, + `description` varchar(64) NOT NULL, + `assetType` tinyint(4) NOT NULL, + `invType` tinyint(4) NOT NULL, + `local` tinyint(1) NOT NULL, + `temporary` tinyint(1) NOT NULL, + `data` longblob NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1'; + +COMMIT; + +# ----------------- +:VERSION 2 + +BEGIN; + +ALTER TABLE assets change id oldid binary(16); +ALTER TABLE assets add id varchar(36) not null default ''; +UPDATE assets set id = concat(substr(hex(oldid),1,8),"-",substr(hex(oldid),9,4),"-",substr(hex(oldid),13,4),"-",substr(hex(oldid),17,4),"-",substr(hex(oldid),21,12)); +ALTER TABLE assets drop oldid; +ALTER TABLE assets add constraint primary key(id); + +COMMIT; + +# ----------------- +:VERSION 3 + +BEGIN; + +ALTER TABLE assets change id oldid varchar(36); +ALTER TABLE assets add id char(36) not null default '00000000-0000-0000-0000-000000000000'; +UPDATE assets set id = oldid; +ALTER TABLE assets drop oldid; +ALTER TABLE assets add constraint primary key(id); + +COMMIT; + +# ----------------- +:VERSION 4 + +BEGIN; + +ALTER TABLE assets drop InvType; + +COMMIT; + +# ----------------- +:VERSION 5 + +BEGIN; + +ALTER TABLE assets add create_time integer default 0; +ALTER TABLE assets add access_time integer default 0; + +COMMIT; + +# ----------------- +:VERSION 6 + +DELETE FROM assets WHERE id = 'dc4b9f0b-d008-45c6-96a4-01dd947ac621' + diff --git a/OpenSim/Data/MySQL/Resources/AuthStore.migrations b/OpenSim/Data/MySQL/Resources/AuthStore.migrations new file mode 100644 index 0000000..023c786 --- /dev/null +++ b/OpenSim/Data/MySQL/Resources/AuthStore.migrations @@ -0,0 +1,39 @@ +:VERSION 1 # ------------------------------- + +begin; + +CREATE TABLE `auth` ( + `UUID` char(36) NOT NULL, + `passwordHash` char(32) NOT NULL default '', + `passwordSalt` char(32) NOT NULL default '', + `webLoginKey` varchar(255) NOT NULL default '', + PRIMARY KEY (`UUID`) +) ENGINE=InnoDB; + +CREATE TABLE `tokens` ( + `UUID` char(36) NOT NULL, + `token` varchar(255) NOT NULL, + `validity` datetime NOT NULL, + UNIQUE KEY `uuid_token` (`UUID`,`token`), + KEY `UUID` (`UUID`), + KEY `token` (`token`), + KEY `validity` (`validity`) +) ENGINE=InnoDB; + +commit; + +:VERSION 2 # ------------------------------- + +BEGIN; + +INSERT INTO auth (UUID, passwordHash, passwordSalt, webLoginKey) SELECT `UUID` AS UUID, `passwordHash` AS passwordHash, `passwordSalt` AS passwordSalt, `webLoginKey` AS webLoginKey FROM users; + +COMMIT; + +:VERSION 3 # ------------------------------- + +BEGIN; + +ALTER TABLE `auth` ADD COLUMN `accountType` VARCHAR(32) NOT NULL DEFAULT 'UserAccount'; + +COMMIT; diff --git a/OpenSim/Data/MySQL/Resources/Avatar.migrations b/OpenSim/Data/MySQL/Resources/Avatar.migrations new file mode 100644 index 0000000..8d0eee6 --- /dev/null +++ b/OpenSim/Data/MySQL/Resources/Avatar.migrations @@ -0,0 +1,12 @@ +:VERSION 1 + +BEGIN; + +CREATE TABLE Avatars ( + PrincipalID CHAR(36) NOT NULL, + Name VARCHAR(32) NOT NULL, + Value VARCHAR(255) NOT NULL DEFAULT '', + PRIMARY KEY(PrincipalID, Name), + KEY(PrincipalID)); + +COMMIT; diff --git a/OpenSim/Data/MySQL/Resources/FriendsStore.migrations b/OpenSim/Data/MySQL/Resources/FriendsStore.migrations new file mode 100644 index 0000000..ce713bd --- /dev/null +++ b/OpenSim/Data/MySQL/Resources/FriendsStore.migrations @@ -0,0 +1,25 @@ +:VERSION 1 # ------------------------- + +BEGIN; + +CREATE TABLE `Friends` ( + `PrincipalID` CHAR(36) NOT NULL, + `Friend` VARCHAR(255) NOT NULL, + `Flags` VARCHAR(16) NOT NULL DEFAULT 0, + `Offered` VARCHAR(32) NOT NULL DEFAULT 0, + PRIMARY KEY(`PrincipalID`, `Friend`), + KEY(`PrincipalID`) +); + +COMMIT; + +:VERSION 2 # ------------------------- + +BEGIN; + +INSERT INTO `Friends` SELECT `ownerID`, `friendID`, `friendPerms`, 0 FROM `userfriends`; + +COMMIT; + + + diff --git a/OpenSim/Data/MySQL/Resources/GridStore.migrations b/OpenSim/Data/MySQL/Resources/GridStore.migrations new file mode 100644 index 0000000..523a8ac --- /dev/null +++ b/OpenSim/Data/MySQL/Resources/GridStore.migrations @@ -0,0 +1,89 @@ +:VERSION 1 + +CREATE TABLE `regions` ( + `uuid` varchar(36) NOT NULL, + `regionHandle` bigint(20) unsigned NOT NULL, + `regionName` varchar(32) default NULL, + `regionRecvKey` varchar(128) default NULL, + `regionSendKey` varchar(128) default NULL, + `regionSecret` varchar(128) default NULL, + `regionDataURI` varchar(255) default NULL, + `serverIP` varchar(64) default NULL, + `serverPort` int(10) unsigned default NULL, + `serverURI` varchar(255) default NULL, + `locX` int(10) unsigned default NULL, + `locY` int(10) unsigned default NULL, + `locZ` int(10) unsigned default NULL, + `eastOverrideHandle` bigint(20) unsigned default NULL, + `westOverrideHandle` bigint(20) unsigned default NULL, + `southOverrideHandle` bigint(20) unsigned default NULL, + `northOverrideHandle` bigint(20) unsigned default NULL, + `regionAssetURI` varchar(255) default NULL, + `regionAssetRecvKey` varchar(128) default NULL, + `regionAssetSendKey` varchar(128) default NULL, + `regionUserURI` varchar(255) default NULL, + `regionUserRecvKey` varchar(128) default NULL, + `regionUserSendKey` varchar(128) default NULL, `regionMapTexture` varchar(36) default NULL, + `serverHttpPort` int(10) default NULL, `serverRemotingPort` int(10) default NULL, + `owner_uuid` varchar(36) default '00000000-0000-0000-0000-000000000000' not null, + `originUUID` varchar(36), + PRIMARY KEY (`uuid`), + KEY `regionName` (`regionName`), + KEY `regionHandle` (`regionHandle`), + KEY `overrideHandles` (`eastOverrideHandle`,`westOverrideHandle`,`southOverrideHandle`,`northOverrideHandle`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Rev. 3'; + +:VERSION 2 + +BEGIN; + +ALTER TABLE regions add column access integer unsigned default 1; + +COMMIT; + +:VERSION 3 + +BEGIN; + +ALTER TABLE regions add column ScopeID char(36) not null default '00000000-0000-0000-0000-000000000000'; + +create index ScopeID on regions(ScopeID); + +COMMIT; + +:VERSION 4 + +BEGIN; + +ALTER TABLE regions add column sizeX integer not null default 0; +ALTER TABLE regions add column sizeY integer not null default 0; + +COMMIT; + +:VERSION 5 + +BEGIN; + +ALTER TABLE `regions` ADD COLUMN `flags` integer NOT NULL DEFAULT 0; +CREATE INDEX flags ON regions(flags); + +COMMIT; + +:VERSION 6 + +BEGIN; + +ALTER TABLE `regions` ADD COLUMN `last_seen` integer NOT NULL DEFAULT 0; + +COMMIT; + +:VERSION 7 + +BEGIN; + +ALTER TABLE `regions` ADD COLUMN `PrincipalID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000'; +ALTER TABLE `regions` ADD COLUMN `Token` varchar(255) NOT NULL; + +COMMIT; + + diff --git a/OpenSim/Data/MySQL/Resources/InventoryStore.migrations b/OpenSim/Data/MySQL/Resources/InventoryStore.migrations new file mode 100644 index 0000000..8c5864e --- /dev/null +++ b/OpenSim/Data/MySQL/Resources/InventoryStore.migrations @@ -0,0 +1,93 @@ +:VERSION 1 # ------------ +BEGIN; + +CREATE TABLE `inventoryfolders` ( + `folderID` varchar(36) NOT NULL default '', + `agentID` varchar(36) default NULL, + `parentFolderID` varchar(36) default NULL, + `folderName` varchar(64) default NULL, + `type` smallint NOT NULL default 0, + `version` int NOT NULL default 0, + PRIMARY KEY (`folderID`), + KEY `owner` (`agentID`), + KEY `parent` (`parentFolderID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +CREATE TABLE `inventoryitems` ( + `inventoryID` varchar(36) NOT NULL default '', + `assetID` varchar(36) default NULL, + `assetType` int(11) default NULL, + `parentFolderID` varchar(36) default NULL, + `avatarID` varchar(36) default NULL, + `inventoryName` varchar(64) default NULL, + `inventoryDescription` varchar(128) default NULL, + `inventoryNextPermissions` int(10) unsigned default NULL, + `inventoryCurrentPermissions` int(10) unsigned default NULL, + `invType` int(11) default NULL, + `creatorID` varchar(36) default NULL, + `inventoryBasePermissions` int(10) unsigned NOT NULL default 0, + `inventoryEveryOnePermissions` int(10) unsigned NOT NULL default 0, + `salePrice` int(11) NOT NULL default 0, + `saleType` tinyint(4) NOT NULL default 0, + `creationDate` int(11) NOT NULL default 0, + `groupID` varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000', + `groupOwned` tinyint(4) NOT NULL default 0, + `flags` int(11) unsigned NOT NULL default 0, + PRIMARY KEY (`inventoryID`), + KEY `owner` (`avatarID`), + KEY `folder` (`parentFolderID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +COMMIT; + +:VERSION 2 # ------------ + +BEGIN; + +ALTER TABLE inventoryfolders change folderID folderIDold varchar(36); +ALTER TABLE inventoryfolders change agentID agentIDold varchar(36); +ALTER TABLE inventoryfolders change parentFolderID parentFolderIDold varchar(36); +ALTER TABLE inventoryfolders add folderID char(36) not null default '00000000-0000-0000-0000-000000000000'; +ALTER TABLE inventoryfolders add agentID char(36) default NULL; +ALTER TABLE inventoryfolders add parentFolderID char(36) default NULL; +UPDATE inventoryfolders set folderID = folderIDold, agentID = agentIDold, parentFolderID = parentFolderIDold; +ALTER TABLE inventoryfolders drop folderIDold; +ALTER TABLE inventoryfolders drop agentIDold; +ALTER TABLE inventoryfolders drop parentFolderIDold; +ALTER TABLE inventoryfolders add constraint primary key(folderID); +ALTER TABLE inventoryfolders add index inventoryfolders_agentid(agentID); +ALTER TABLE inventoryfolders add index inventoryfolders_parentFolderid(parentFolderID); + +ALTER TABLE inventoryitems change inventoryID inventoryIDold varchar(36); +ALTER TABLE inventoryitems change avatarID avatarIDold varchar(36); +ALTER TABLE inventoryitems change parentFolderID parentFolderIDold varchar(36); +ALTER TABLE inventoryitems add inventoryID char(36) not null default '00000000-0000-0000-0000-000000000000'; +ALTER TABLE inventoryitems add avatarID char(36) default NULL; +ALTER TABLE inventoryitems add parentFolderID char(36) default NULL; +UPDATE inventoryitems set inventoryID = inventoryIDold, avatarID = avatarIDold, parentFolderID = parentFolderIDold; +ALTER TABLE inventoryitems drop inventoryIDold; +ALTER TABLE inventoryitems drop avatarIDold; +ALTER TABLE inventoryitems drop parentFolderIDold; +ALTER TABLE inventoryitems add constraint primary key(inventoryID); +ALTER TABLE inventoryitems add index inventoryitems_avatarid(avatarID); +ALTER TABLE inventoryitems add index inventoryitems_parentFolderid(parentFolderID); + +COMMIT; + +:VERSION 3 # ------------ + +BEGIN; + +alter table inventoryitems add column inventoryGroupPermissions integer unsigned not null default 0; + +COMMIT; + +:VERSION 4 # ------------ + +BEGIN; + +update inventoryitems set creatorID = '00000000-0000-0000-0000-000000000000' where creatorID is NULL; +update inventoryitems set creatorID = '00000000-0000-0000-0000-000000000000' where creatorID = ''; +alter table inventoryitems modify column creatorID varchar(36) not NULL default '00000000-0000-0000-0000-000000000000'; + +COMMIT; diff --git a/OpenSim/Data/MySQL/Resources/LogStore.migrations b/OpenSim/Data/MySQL/Resources/LogStore.migrations new file mode 100644 index 0000000..9ac26ac --- /dev/null +++ b/OpenSim/Data/MySQL/Resources/LogStore.migrations @@ -0,0 +1,13 @@ + +:VERSION 1 + +CREATE TABLE `logs` ( + `logID` int(10) unsigned NOT NULL auto_increment, + `target` varchar(36) default NULL, + `server` varchar(64) default NULL, + `method` varchar(64) default NULL, + `arguments` varchar(255) default NULL, + `priority` int(11) default NULL, + `message` text, + PRIMARY KEY (`logID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/OpenSim/Data/MySQL/Resources/Presence.migrations b/OpenSim/Data/MySQL/Resources/Presence.migrations new file mode 100644 index 0000000..d513024 --- /dev/null +++ b/OpenSim/Data/MySQL/Resources/Presence.migrations @@ -0,0 +1,36 @@ +:VERSION 1 # -------------------------- + +BEGIN; + +CREATE TABLE `Presence` ( + `UserID` VARCHAR(255) NOT NULL, + `RegionID` CHAR(36) NOT NULL, + `SessionID` CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', + `SecureSessionID` CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', + `Online` CHAR(5) NOT NULL DEFAULT 'false', + `Login` CHAR(16) NOT NULL DEFAULT '0', + `Logout` CHAR(16) NOT NULL DEFAULT '0', + `Position` CHAR(64) NOT NULL DEFAULT '<0,0,0>', + `LookAt` CHAR(64) NOT NULL DEFAULT '<0,0,0>' +) ENGINE=InnoDB; + +COMMIT; + +:VERSION 2 # -------------------------- + +BEGIN; + +ALTER TABLE Presence ADD COLUMN `HomeRegionID` CHAR(36) NOT NULL; +ALTER TABLE Presence ADD COLUMN `HomePosition` CHAR(64) NOT NULL DEFAULT '<0,0,0>'; +ALTER TABLE Presence ADD COLUMN `HomeLookAt` CHAR(64) NOT NULL DEFAULT '<0,0,0>'; + +COMMIT; + +:VERSION 3 # -------------------------- + +BEGIN; + +CREATE UNIQUE INDEX SessionID ON Presence(SessionID); +CREATE INDEX UserID ON Presence(UserID); + +COMMIT; diff --git a/OpenSim/Data/MySQL/Resources/RegionStore.migrations b/OpenSim/Data/MySQL/Resources/RegionStore.migrations new file mode 100644 index 0000000..3dab67e --- /dev/null +++ b/OpenSim/Data/MySQL/Resources/RegionStore.migrations @@ -0,0 +1,806 @@ + +:VERSION 1 #--------------------- + +BEGIN; + +CREATE TABLE `prims` ( + `UUID` varchar(255) NOT NULL, + `RegionUUID` varchar(255) default NULL, + `ParentID` int(11) default NULL, + `CreationDate` int(11) default NULL, + `Name` varchar(255) default NULL, + `SceneGroupID` varchar(255) default NULL, + `Text` varchar(255) default NULL, + `Description` varchar(255) default NULL, + `SitName` varchar(255) default NULL, + `TouchName` varchar(255) default NULL, + `ObjectFlags` int(11) default NULL, + `CreatorID` varchar(255) default NULL, + `OwnerID` varchar(255) default NULL, + `GroupID` varchar(255) default NULL, + `LastOwnerID` varchar(255) default NULL, + `OwnerMask` int(11) default NULL, + `NextOwnerMask` int(11) default NULL, + `GroupMask` int(11) default NULL, + `EveryoneMask` int(11) default NULL, + `BaseMask` int(11) default NULL, + `PositionX` float default NULL, + `PositionY` float default NULL, + `PositionZ` float default NULL, + `GroupPositionX` float default NULL, + `GroupPositionY` float default NULL, + `GroupPositionZ` float default NULL, + `VelocityX` float default NULL, + `VelocityY` float default NULL, + `VelocityZ` float default NULL, + `AngularVelocityX` float default NULL, + `AngularVelocityY` float default NULL, + `AngularVelocityZ` float default NULL, + `AccelerationX` float default NULL, + `AccelerationY` float default NULL, + `AccelerationZ` float default NULL, + `RotationX` float default NULL, + `RotationY` float default NULL, + `RotationZ` float default NULL, + `RotationW` float default NULL, + `SitTargetOffsetX` float default NULL, + `SitTargetOffsetY` float default NULL, + `SitTargetOffsetZ` float default NULL, + `SitTargetOrientW` float default NULL, + `SitTargetOrientX` float default NULL, + `SitTargetOrientY` float default NULL, + `SitTargetOrientZ` float default NULL, + PRIMARY KEY (`UUID`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; + +CREATE TABLE `primshapes` ( + `UUID` varchar(255) NOT NULL, + `Shape` int(11) default NULL, + `ScaleX` float default NULL, + `ScaleY` float default NULL, + `ScaleZ` float default NULL, + `PCode` int(11) default NULL, + `PathBegin` int(11) default NULL, + `PathEnd` int(11) default NULL, + `PathScaleX` int(11) default NULL, + `PathScaleY` int(11) default NULL, + `PathShearX` int(11) default NULL, + `PathShearY` int(11) default NULL, + `PathSkew` int(11) default NULL, + `PathCurve` int(11) default NULL, + `PathRadiusOffset` int(11) default NULL, + `PathRevolutions` int(11) default NULL, + `PathTaperX` int(11) default NULL, + `PathTaperY` int(11) default NULL, + `PathTwist` int(11) default NULL, + `PathTwistBegin` int(11) default NULL, + `ProfileBegin` int(11) default NULL, + `ProfileEnd` int(11) default NULL, + `ProfileCurve` int(11) default NULL, + `ProfileHollow` int(11) default NULL, + `State` int(11) default NULL, + `Texture` longblob, + `ExtraParams` longblob, + PRIMARY KEY (`UUID`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; + +CREATE TABLE `primitems` ( + `itemID` varchar(255) NOT NULL, + `primID` varchar(255) default NULL, + `assetID` varchar(255) default NULL, + `parentFolderID` varchar(255) default NULL, + `invType` int(11) default NULL, + `assetType` int(11) default NULL, + `name` varchar(255) default NULL, + `description` varchar(255) default NULL, + `creationDate` bigint(20) default NULL, + `creatorID` varchar(255) default NULL, + `ownerID` varchar(255) default NULL, + `lastOwnerID` varchar(255) default NULL, + `groupID` varchar(255) default NULL, + `nextPermissions` int(11) default NULL, + `currentPermissions` int(11) default NULL, + `basePermissions` int(11) default NULL, + `everyonePermissions` int(11) default NULL, + `groupPermissions` int(11) default NULL, + PRIMARY KEY (`itemID`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; + +CREATE TABLE `terrain` ( + `RegionUUID` varchar(255) default NULL, + `Revision` int(11) default NULL, + `Heightfield` longblob +) ENGINE=MyISAM DEFAULT CHARSET=latin1; + +CREATE TABLE `land` ( + `UUID` varchar(255) NOT NULL, + `RegionUUID` varchar(255) default NULL, + `LocalLandID` int(11) default NULL, + `Bitmap` longblob, + `Name` varchar(255) default NULL, + `Description` varchar(255) default NULL, + `OwnerUUID` varchar(255) default NULL, + `IsGroupOwned` int(11) default NULL, + `Area` int(11) default NULL, + `AuctionID` int(11) default NULL, + `Category` int(11) default NULL, + `ClaimDate` int(11) default NULL, + `ClaimPrice` int(11) default NULL, + `GroupUUID` varchar(255) default NULL, + `SalePrice` int(11) default NULL, + `LandStatus` int(11) default NULL, + `LandFlags` int(11) default NULL, + `LandingType` int(11) default NULL, + `MediaAutoScale` int(11) default NULL, + `MediaTextureUUID` varchar(255) default NULL, + `MediaURL` varchar(255) default NULL, + `MusicURL` varchar(255) default NULL, + `PassHours` float default NULL, + `PassPrice` int(11) default NULL, + `SnapshotUUID` varchar(255) default NULL, + `UserLocationX` float default NULL, + `UserLocationY` float default NULL, + `UserLocationZ` float default NULL, + `UserLookAtX` float default NULL, + `UserLookAtY` float default NULL, + `UserLookAtZ` float default NULL, + `AuthbuyerID` varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000', + PRIMARY KEY (`UUID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +CREATE TABLE `landaccesslist` ( + `LandUUID` varchar(255) default NULL, + `AccessUUID` varchar(255) default NULL, + `Flags` int(11) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1; + +COMMIT; + +:VERSION 2 #--------------------- + +BEGIN; + +CREATE index prims_regionuuid on prims(RegionUUID); +CREATE index primitems_primid on primitems(primID); + +COMMIT; + +:VERSION 3 #--------------------- + +BEGIN; + CREATE TABLE regionban (regionUUID VARCHAR(36) NOT NULL, bannedUUID VARCHAR(36) NOT NULL, bannedIp VARCHAR(16) NOT NULL, bannedIpHostMask VARCHAR(16) NOT NULL) ENGINE=INNODB DEFAULT CHARSET=utf8 COMMENT='Rev. 1'; +COMMIT; + +:VERSION 4 #--------------------- + +BEGIN; + +ALTER TABLE primitems add flags integer not null default 0; + +COMMIT; + +:VERSION 5 #--------------------- +BEGIN; + +create table regionsettings ( + regionUUID char(36) not null, + block_terraform integer not null, + block_fly integer not null, + allow_damage integer not null, + restrict_pushing integer not null, + allow_land_resell integer not null, + allow_land_join_divide integer not null, + block_show_in_search integer not null, + agent_limit integer not null, + object_bonus float not null, + maturity integer not null, + disable_scripts integer not null, + disable_collisions integer not null, + disable_physics integer not null, + terrain_texture_1 char(36) not null, + terrain_texture_2 char(36) not null, + terrain_texture_3 char(36) not null, + terrain_texture_4 char(36) not null, + elevation_1_nw float not null, + elevation_2_nw float not null, + elevation_1_ne float not null, + elevation_2_ne float not null, + elevation_1_se float not null, + elevation_2_se float not null, + elevation_1_sw float not null, + elevation_2_sw float not null, + water_height float not null, + terrain_raise_limit float not null, + terrain_lower_limit float not null, + use_estate_sun integer not null, + fixed_sun integer not null, + sun_position float not null, + covenant char(36), + primary key(regionUUID) +); + +COMMIT; + + +:VERSION 6 #--------------------- + +BEGIN; + +alter table landaccesslist ENGINE = InnoDB; +alter table migrations ENGINE = InnoDB; +alter table primitems ENGINE = InnoDB; +alter table prims ENGINE = InnoDB; +alter table primshapes ENGINE = InnoDB; +alter table regionsettings ENGINE = InnoDB; +alter table terrain ENGINE = InnoDB; + +COMMIT; + +:VERSION 7 #--------------------- + +BEGIN; + +ALTER TABLE prims change UUID UUIDold varchar(255); +ALTER TABLE prims change RegionUUID RegionUUIDold varchar(255); +ALTER TABLE prims change CreatorID CreatorIDold varchar(255); +ALTER TABLE prims change OwnerID OwnerIDold varchar(255); +ALTER TABLE prims change GroupID GroupIDold varchar(255); +ALTER TABLE prims change LastOwnerID LastOwnerIDold varchar(255); +ALTER TABLE prims add UUID char(36); +ALTER TABLE prims add RegionUUID char(36); +ALTER TABLE prims add CreatorID char(36); +ALTER TABLE prims add OwnerID char(36); +ALTER TABLE prims add GroupID char(36); +ALTER TABLE prims add LastOwnerID char(36); +UPDATE prims set UUID = UUIDold, RegionUUID = RegionUUIDold, CreatorID = CreatorIDold, OwnerID = OwnerIDold, GroupID = GroupIDold, LastOwnerID = LastOwnerIDold; +ALTER TABLE prims drop UUIDold; +ALTER TABLE prims drop RegionUUIDold; +ALTER TABLE prims drop CreatorIDold; +ALTER TABLE prims drop OwnerIDold; +ALTER TABLE prims drop GroupIDold; +ALTER TABLE prims drop LastOwnerIDold; +ALTER TABLE prims add constraint primary key(UUID); +ALTER TABLE prims add index prims_regionuuid(RegionUUID); + +COMMIT; + +:VERSION 8 #--------------------- + +BEGIN; + +ALTER TABLE primshapes change UUID UUIDold varchar(255); +ALTER TABLE primshapes add UUID char(36); +UPDATE primshapes set UUID = UUIDold; +ALTER TABLE primshapes drop UUIDold; +ALTER TABLE primshapes add constraint primary key(UUID); + +COMMIT; + +:VERSION 9 #--------------------- + +BEGIN; + +ALTER TABLE primitems change itemID itemIDold varchar(255); +ALTER TABLE primitems change primID primIDold varchar(255); +ALTER TABLE primitems change assetID assetIDold varchar(255); +ALTER TABLE primitems change parentFolderID parentFolderIDold varchar(255); +ALTER TABLE primitems change creatorID creatorIDold varchar(255); +ALTER TABLE primitems change ownerID ownerIDold varchar(255); +ALTER TABLE primitems change groupID groupIDold varchar(255); +ALTER TABLE primitems change lastOwnerID lastOwnerIDold varchar(255); +ALTER TABLE primitems add itemID char(36); +ALTER TABLE primitems add primID char(36); +ALTER TABLE primitems add assetID char(36); +ALTER TABLE primitems add parentFolderID char(36); +ALTER TABLE primitems add creatorID char(36); +ALTER TABLE primitems add ownerID char(36); +ALTER TABLE primitems add groupID char(36); +ALTER TABLE primitems add lastOwnerID char(36); +UPDATE primitems set itemID = itemIDold, primID = primIDold, assetID = assetIDold, parentFolderID = parentFolderIDold, creatorID = creatorIDold, ownerID = ownerIDold, groupID = groupIDold, lastOwnerID = lastOwnerIDold; +ALTER TABLE primitems drop itemIDold; +ALTER TABLE primitems drop primIDold; +ALTER TABLE primitems drop assetIDold; +ALTER TABLE primitems drop parentFolderIDold; +ALTER TABLE primitems drop creatorIDold; +ALTER TABLE primitems drop ownerIDold; +ALTER TABLE primitems drop groupIDold; +ALTER TABLE primitems drop lastOwnerIDold; +ALTER TABLE primitems add constraint primary key(itemID); +ALTER TABLE primitems add index primitems_primid(primID); + +COMMIT; + +:VERSION 10 #--------------------- + +# 1 "010_RegionStore.sql" +# 1 "" +# 1 "" +# 1 "010_RegionStore.sql" +BEGIN; + +DELETE FROM regionsettings; + +COMMIT; + + +:VERSION 11 #--------------------- + +BEGIN; + +ALTER TABLE prims change SceneGroupID SceneGroupIDold varchar(255); +ALTER TABLE prims add SceneGroupID char(36); +UPDATE prims set SceneGroupID = SceneGroupIDold; +ALTER TABLE prims drop SceneGroupIDold; +ALTER TABLE prims add index prims_scenegroupid(SceneGroupID); + +COMMIT; + +:VERSION 12 #--------------------- + +BEGIN; + +ALTER TABLE prims add index prims_parentid(ParentID); + +COMMIT; + +:VERSION 13 #--------------------- +begin; + +drop table regionsettings; + +CREATE TABLE `regionsettings` ( + `regionUUID` char(36) NOT NULL, + `block_terraform` int(11) NOT NULL, + `block_fly` int(11) NOT NULL, + `allow_damage` int(11) NOT NULL, + `restrict_pushing` int(11) NOT NULL, + `allow_land_resell` int(11) NOT NULL, + `allow_land_join_divide` int(11) NOT NULL, + `block_show_in_search` int(11) NOT NULL, + `agent_limit` int(11) NOT NULL, + `object_bonus` float NOT NULL, + `maturity` int(11) NOT NULL, + `disable_scripts` int(11) NOT NULL, + `disable_collisions` int(11) NOT NULL, + `disable_physics` int(11) NOT NULL, + `terrain_texture_1` char(36) NOT NULL, + `terrain_texture_2` char(36) NOT NULL, + `terrain_texture_3` char(36) NOT NULL, + `terrain_texture_4` char(36) NOT NULL, + `elevation_1_nw` float NOT NULL, + `elevation_2_nw` float NOT NULL, + `elevation_1_ne` float NOT NULL, + `elevation_2_ne` float NOT NULL, + `elevation_1_se` float NOT NULL, + `elevation_2_se` float NOT NULL, + `elevation_1_sw` float NOT NULL, + `elevation_2_sw` float NOT NULL, + `water_height` float NOT NULL, + `terrain_raise_limit` float NOT NULL, + `terrain_lower_limit` float NOT NULL, + `use_estate_sun` int(11) NOT NULL, + `fixed_sun` int(11) NOT NULL, + `sun_position` float NOT NULL, + `covenant` char(36) default NULL, + `Sandbox` tinyint(4) NOT NULL, + PRIMARY KEY (`regionUUID`) +) ENGINE=InnoDB; + +CREATE TABLE `estate_managers` ( + `EstateID` int(10) unsigned NOT NULL, + `uuid` char(36) NOT NULL, + KEY `EstateID` (`EstateID`) +) ENGINE=InnoDB; + +CREATE TABLE `estate_groups` ( + `EstateID` int(10) unsigned NOT NULL, + `uuid` char(36) NOT NULL, + KEY `EstateID` (`EstateID`) +) ENGINE=InnoDB; + +CREATE TABLE `estate_users` ( + `EstateID` int(10) unsigned NOT NULL, + `uuid` char(36) NOT NULL, + KEY `EstateID` (`EstateID`) +) ENGINE=InnoDB; + +CREATE TABLE `estateban` ( + `EstateID` int(10) unsigned NOT NULL, + `bannedUUID` varchar(36) NOT NULL, + `bannedIp` varchar(16) NOT NULL, + `bannedIpHostMask` varchar(16) NOT NULL, + `bannedNameMask` varchar(64) default NULL, + KEY `estateban_EstateID` (`EstateID`) +) ENGINE=InnoDB; + +CREATE TABLE `estate_settings` ( + `EstateID` int(10) unsigned NOT NULL auto_increment, + `EstateName` varchar(64) default NULL, + `AbuseEmailToEstateOwner` tinyint(4) NOT NULL, + `DenyAnonymous` tinyint(4) NOT NULL, + `ResetHomeOnTeleport` tinyint(4) NOT NULL, + `FixedSun` tinyint(4) NOT NULL, + `DenyTransacted` tinyint(4) NOT NULL, + `BlockDwell` tinyint(4) NOT NULL, + `DenyIdentified` tinyint(4) NOT NULL, + `AllowVoice` tinyint(4) NOT NULL, + `UseGlobalTime` tinyint(4) NOT NULL, + `PricePerMeter` int(11) NOT NULL, + `TaxFree` tinyint(4) NOT NULL, + `AllowDirectTeleport` tinyint(4) NOT NULL, + `RedirectGridX` int(11) NOT NULL, + `RedirectGridY` int(11) NOT NULL, + `ParentEstateID` int(10) unsigned NOT NULL, + `SunPosition` double NOT NULL, + `EstateSkipScripts` tinyint(4) NOT NULL, + `BillableFactor` float NOT NULL, + `PublicAccess` tinyint(4) NOT NULL, + PRIMARY KEY (`EstateID`) +) ENGINE=InnoDB AUTO_INCREMENT=100; + +CREATE TABLE `estate_map` ( + `RegionID` char(36) NOT NULL default '00000000-0000-0000-0000-000000000000', + `EstateID` int(11) NOT NULL, + PRIMARY KEY (`RegionID`), + KEY `EstateID` (`EstateID`) +) ENGINE=InnoDB; + +commit; + +:VERSION 14 #--------------------- + +begin; + +alter table estate_settings add column AbuseEmail varchar(255) not null; + +alter table estate_settings add column EstateOwner varchar(36) not null; + +commit; + + +:VERSION 15 #--------------------- + +begin; + +alter table estate_settings add column DenyMinors tinyint not null; + +commit; + +:VERSION 16 #--------------------- + +BEGIN; + +ALTER TABLE prims ADD COLUMN PayPrice integer not null default 0; +ALTER TABLE prims ADD COLUMN PayButton1 integer not null default 0; +ALTER TABLE prims ADD COLUMN PayButton2 integer not null default 0; +ALTER TABLE prims ADD COLUMN PayButton3 integer not null default 0; +ALTER TABLE prims ADD COLUMN PayButton4 integer not null default 0; +ALTER TABLE prims ADD COLUMN LoopedSound char(36) not null default '00000000-0000-0000-0000-000000000000'; +ALTER TABLE prims ADD COLUMN LoopedSoundGain float not null default 0.0; +ALTER TABLE prims ADD COLUMN TextureAnimation blob; +ALTER TABLE prims ADD COLUMN OmegaX float not null default 0.0; +ALTER TABLE prims ADD COLUMN OmegaY float not null default 0.0; +ALTER TABLE prims ADD COLUMN OmegaZ float not null default 0.0; +ALTER TABLE prims ADD COLUMN CameraEyeOffsetX float not null default 0.0; +ALTER TABLE prims ADD COLUMN CameraEyeOffsetY float not null default 0.0; +ALTER TABLE prims ADD COLUMN CameraEyeOffsetZ float not null default 0.0; +ALTER TABLE prims ADD COLUMN CameraAtOffsetX float not null default 0.0; +ALTER TABLE prims ADD COLUMN CameraAtOffsetY float not null default 0.0; +ALTER TABLE prims ADD COLUMN CameraAtOffsetZ float not null default 0.0; +ALTER TABLE prims ADD COLUMN ForceMouselook tinyint not null default 0; +ALTER TABLE prims ADD COLUMN ScriptAccessPin integer not null default 0; +ALTER TABLE prims ADD COLUMN AllowedDrop tinyint not null default 0; +ALTER TABLE prims ADD COLUMN DieAtEdge tinyint not null default 0; +ALTER TABLE prims ADD COLUMN SalePrice integer not null default 10; +ALTER TABLE prims ADD COLUMN SaleType tinyint not null default 0; + +COMMIT; + + +:VERSION 17 #--------------------- + +BEGIN; + +ALTER TABLE prims ADD COLUMN ColorR integer not null default 0; +ALTER TABLE prims ADD COLUMN ColorG integer not null default 0; +ALTER TABLE prims ADD COLUMN ColorB integer not null default 0; +ALTER TABLE prims ADD COLUMN ColorA integer not null default 0; +ALTER TABLE prims ADD COLUMN ParticleSystem blob; + +COMMIT; + + +:VERSION 18 #--------------------- + +begin; + +ALTER TABLE prims ADD COLUMN ClickAction tinyint NOT NULL default 0; + +commit; + +:VERSION 19 #--------------------- + +begin; + +ALTER TABLE prims ADD COLUMN Material tinyint NOT NULL default 3; + +commit; + + +:VERSION 20 #--------------------- + +begin; + +ALTER TABLE land ADD COLUMN OtherCleanTime integer NOT NULL default 0; +ALTER TABLE land ADD COLUMN Dwell integer NOT NULL default 0; + +commit; + +:VERSION 21 #--------------------- + +begin; + +ALTER TABLE regionsettings ADD COLUMN sunvectorx double NOT NULL default 0; +ALTER TABLE regionsettings ADD COLUMN sunvectory double NOT NULL default 0; +ALTER TABLE regionsettings ADD COLUMN sunvectorz double NOT NULL default 0; + +commit; + + +:VERSION 22 #--------------------- + +BEGIN; + +ALTER TABLE prims ADD COLUMN CollisionSound char(36) not null default '00000000-0000-0000-0000-000000000000'; +ALTER TABLE prims ADD COLUMN CollisionSoundVolume float not null default 0.0; + +COMMIT; + +:VERSION 23 #--------------------- + +BEGIN; + +ALTER TABLE prims ADD COLUMN LinkNumber integer not null default 0; + +COMMIT; + +:VERSION 24 #--------------------- + +BEGIN; + +alter table regionsettings change column `object_bonus` `object_bonus` double NOT NULL; +alter table regionsettings change column `elevation_1_nw` `elevation_1_nw` double NOT NULL; +alter table regionsettings change column `elevation_2_nw` `elevation_2_nw` double NOT NULL; +alter table regionsettings change column `elevation_1_ne` `elevation_1_ne` double NOT NULL; +alter table regionsettings change column `elevation_2_ne` `elevation_2_ne` double NOT NULL; +alter table regionsettings change column `elevation_1_se` `elevation_1_se` double NOT NULL; +alter table regionsettings change column `elevation_2_se` `elevation_2_se` double NOT NULL; +alter table regionsettings change column `elevation_1_sw` `elevation_1_sw` double NOT NULL; +alter table regionsettings change column `elevation_2_sw` `elevation_2_sw` double NOT NULL; +alter table regionsettings change column `water_height` `water_height` double NOT NULL; +alter table regionsettings change column `terrain_raise_limit` `terrain_raise_limit` double NOT NULL; +alter table regionsettings change column `terrain_lower_limit` `terrain_lower_limit` double NOT NULL; +alter table regionsettings change column `sun_position` `sun_position` double NOT NULL; + +COMMIT; + + +:VERSION 25 #--------------------- + +BEGIN; + +alter table prims change column `PositionX` `PositionX` double default NULL; +alter table prims change column `PositionY` `PositionY` double default NULL; +alter table prims change column `PositionZ` `PositionZ` double default NULL; +alter table prims change column `GroupPositionX` `GroupPositionX` double default NULL; +alter table prims change column `GroupPositionY` `GroupPositionY` double default NULL; +alter table prims change column `GroupPositionZ` `GroupPositionZ` double default NULL; +alter table prims change column `VelocityX` `VelocityX` double default NULL; +alter table prims change column `VelocityY` `VelocityY` double default NULL; +alter table prims change column `VelocityZ` `VelocityZ` double default NULL; +alter table prims change column `AngularVelocityX` `AngularVelocityX` double default NULL; +alter table prims change column `AngularVelocityY` `AngularVelocityY` double default NULL; +alter table prims change column `AngularVelocityZ` `AngularVelocityZ` double default NULL; +alter table prims change column `AccelerationX` `AccelerationX` double default NULL; +alter table prims change column `AccelerationY` `AccelerationY` double default NULL; +alter table prims change column `AccelerationZ` `AccelerationZ` double default NULL; +alter table prims change column `RotationX` `RotationX` double default NULL; +alter table prims change column `RotationY` `RotationY` double default NULL; +alter table prims change column `RotationZ` `RotationZ` double default NULL; +alter table prims change column `RotationW` `RotationW` double default NULL; +alter table prims change column `SitTargetOffsetX` `SitTargetOffsetX` double default NULL; +alter table prims change column `SitTargetOffsetY` `SitTargetOffsetY` double default NULL; +alter table prims change column `SitTargetOffsetZ` `SitTargetOffsetZ` double default NULL; +alter table prims change column `SitTargetOrientW` `SitTargetOrientW` double default NULL; +alter table prims change column `SitTargetOrientX` `SitTargetOrientX` double default NULL; +alter table prims change column `SitTargetOrientY` `SitTargetOrientY` double default NULL; +alter table prims change column `SitTargetOrientZ` `SitTargetOrientZ` double default NULL; +alter table prims change column `LoopedSoundGain` `LoopedSoundGain` double NOT NULL default '0'; +alter table prims change column `OmegaX` `OmegaX` double NOT NULL default '0'; +alter table prims change column `OmegaY` `OmegaY` double NOT NULL default '0'; +alter table prims change column `OmegaZ` `OmegaZ` double NOT NULL default '0'; +alter table prims change column `CameraEyeOffsetX` `CameraEyeOffsetX` double NOT NULL default '0'; +alter table prims change column `CameraEyeOffsetY` `CameraEyeOffsetY` double NOT NULL default '0'; +alter table prims change column `CameraEyeOffsetZ` `CameraEyeOffsetZ` double NOT NULL default '0'; +alter table prims change column `CameraAtOffsetX` `CameraAtOffsetX` double NOT NULL default '0'; +alter table prims change column `CameraAtOffsetY` `CameraAtOffsetY` double NOT NULL default '0'; +alter table prims change column `CameraAtOffsetZ` `CameraAtOffsetZ` double NOT NULL default '0'; +alter table prims change column `CollisionSoundVolume` `CollisionSoundVolume` double NOT NULL default '0'; + +alter table primshapes change column `ScaleX` `ScaleX` double NOT NULL default '0'; +alter table primshapes change column `ScaleY` `ScaleY` double NOT NULL default '0'; +alter table primshapes change column `ScaleZ` `ScaleZ` double NOT NULL default '0'; + +COMMIT; + +:VERSION 26 #--------------------- + +begin; + +alter table prims change column `PositionX` `PositionX` double default NULL; +alter table prims change column `PositionY` `PositionY` double default NULL; +alter table prims change column `PositionZ` `PositionZ` double default NULL; +alter table prims change column `GroupPositionX` `GroupPositionX` double default NULL; +alter table prims change column `GroupPositionY` `GroupPositionY` double default NULL; +alter table prims change column `GroupPositionZ` `GroupPositionZ` double default NULL; +alter table prims change column `VelocityX` `VelocityX` double default NULL; +alter table prims change column `VelocityY` `VelocityY` double default NULL; +alter table prims change column `VelocityZ` `VelocityZ` double default NULL; +alter table prims change column `AngularVelocityX` `AngularVelocityX` double default NULL; +alter table prims change column `AngularVelocityY` `AngularVelocityY` double default NULL; +alter table prims change column `AngularVelocityZ` `AngularVelocityZ` double default NULL; +alter table prims change column `AccelerationX` `AccelerationX` double default NULL; +alter table prims change column `AccelerationY` `AccelerationY` double default NULL; +alter table prims change column `AccelerationZ` `AccelerationZ` double default NULL; +alter table prims change column `RotationX` `RotationX` double default NULL; +alter table prims change column `RotationY` `RotationY` double default NULL; +alter table prims change column `RotationZ` `RotationZ` double default NULL; +alter table prims change column `RotationW` `RotationW` double default NULL; +alter table prims change column `SitTargetOffsetX` `SitTargetOffsetX` double default NULL; +alter table prims change column `SitTargetOffsetY` `SitTargetOffsetY` double default NULL; +alter table prims change column `SitTargetOffsetZ` `SitTargetOffsetZ` double default NULL; +alter table prims change column `SitTargetOrientW` `SitTargetOrientW` double default NULL; +alter table prims change column `SitTargetOrientX` `SitTargetOrientX` double default NULL; +alter table prims change column `SitTargetOrientY` `SitTargetOrientY` double default NULL; +alter table prims change column `SitTargetOrientZ` `SitTargetOrientZ` double default NULL; +alter table prims change column `LoopedSoundGain` `LoopedSoundGain` double NOT NULL default '0'; +alter table prims change column `OmegaX` `OmegaX` double NOT NULL default '0'; +alter table prims change column `OmegaY` `OmegaY` double NOT NULL default '0'; +alter table prims change column `OmegaZ` `OmegaZ` double NOT NULL default '0'; +alter table prims change column `CameraEyeOffsetX` `CameraEyeOffsetX` double NOT NULL default '0'; +alter table prims change column `CameraEyeOffsetY` `CameraEyeOffsetY` double NOT NULL default '0'; +alter table prims change column `CameraEyeOffsetZ` `CameraEyeOffsetZ` double NOT NULL default '0'; +alter table prims change column `CameraAtOffsetX` `CameraAtOffsetX` double NOT NULL default '0'; +alter table prims change column `CameraAtOffsetY` `CameraAtOffsetY` double NOT NULL default '0'; +alter table prims change column `CameraAtOffsetZ` `CameraAtOffsetZ` double NOT NULL default '0'; +alter table prims change column `CollisionSoundVolume` `CollisionSoundVolume` double NOT NULL default '0'; + +commit; + +:VERSION 27 #--------------------- + +BEGIN; + +ALTER TABLE prims DROP COLUMN ParentID; + +COMMIT; + +:VERSION 28 #--------------------- + +BEGIN; + +update terrain + set RegionUUID = concat(substr(RegionUUID, 1, 8), "-", substr(RegionUUID, 9, 4), "-", substr(RegionUUID, 13, 4), "-", substr(RegionUUID, 17, 4), "-", substr(RegionUUID, 21, 12)) + where RegionUUID not like '%-%'; + + +update landaccesslist + set LandUUID = concat(substr(LandUUID, 1, 8), "-", substr(LandUUID, 9, 4), "-", substr(LandUUID, 13, 4), "-", substr(LandUUID, 17, 4), "-", substr(LandUUID, 21, 12)) + where LandUUID not like '%-%'; + +update landaccesslist + set AccessUUID = concat(substr(AccessUUID, 1, 8), "-", substr(AccessUUID, 9, 4), "-", substr(AccessUUID, 13, 4), "-", substr(AccessUUID, 17, 4), "-", substr(AccessUUID, 21, 12)) + where AccessUUID not like '%-%'; + + +update prims + set UUID = concat(substr(UUID, 1, 8), "-", substr(UUID, 9, 4), "-", substr(UUID, 13, 4), "-", substr(UUID, 17, 4), "-", substr(UUID, 21, 12)) + where UUID not like '%-%'; + +update prims + set RegionUUID = concat(substr(RegionUUID, 1, 8), "-", substr(RegionUUID, 9, 4), "-", substr(RegionUUID, 13, 4), "-", substr(RegionUUID, 17, 4), "-", substr(RegionUUID, 21, 12)) + where RegionUUID not like '%-%'; + +update prims + set SceneGroupID = concat(substr(SceneGroupID, 1, 8), "-", substr(SceneGroupID, 9, 4), "-", substr(SceneGroupID, 13, 4), "-", substr(SceneGroupID, 17, 4), "-", substr(SceneGroupID, 21, 12)) + where SceneGroupID not like '%-%'; + +update prims + set CreatorID = concat(substr(CreatorID, 1, 8), "-", substr(CreatorID, 9, 4), "-", substr(CreatorID, 13, 4), "-", substr(CreatorID, 17, 4), "-", substr(CreatorID, 21, 12)) + where CreatorID not like '%-%'; + +update prims + set OwnerID = concat(substr(OwnerID, 1, 8), "-", substr(OwnerID, 9, 4), "-", substr(OwnerID, 13, 4), "-", substr(OwnerID, 17, 4), "-", substr(OwnerID, 21, 12)) + where OwnerID not like '%-%'; + +update prims + set GroupID = concat(substr(GroupID, 1, 8), "-", substr(GroupID, 9, 4), "-", substr(GroupID, 13, 4), "-", substr(GroupID, 17, 4), "-", substr(GroupID, 21, 12)) + where GroupID not like '%-%'; + +update prims + set LastOwnerID = concat(substr(LastOwnerID, 1, 8), "-", substr(LastOwnerID, 9, 4), "-", substr(LastOwnerID, 13, 4), "-", substr(LastOwnerID, 17, 4), "-", substr(LastOwnerID, 21, 12)) + where LastOwnerID not like '%-%'; + + +update primshapes + set UUID = concat(substr(UUID, 1, 8), "-", substr(UUID, 9, 4), "-", substr(UUID, 13, 4), "-", substr(UUID, 17, 4), "-", substr(UUID, 21, 12)) + where UUID not like '%-%'; + + +update land + set UUID = concat(substr(UUID, 1, 8), "-", substr(UUID, 9, 4), "-", substr(UUID, 13, 4), "-", substr(UUID, 17, 4), "-", substr(UUID, 21, 12)) + where UUID not like '%-%'; + +update land + set RegionUUID = concat(substr(RegionUUID, 1, 8), "-", substr(RegionUUID, 9, 4), "-", substr(RegionUUID, 13, 4), "-", substr(RegionUUID, 17, 4), "-", substr(RegionUUID, 21, 12)) + where RegionUUID not like '%-%'; + +update land + set OwnerUUID = concat(substr(OwnerUUID, 1, 8), "-", substr(OwnerUUID, 9, 4), "-", substr(OwnerUUID, 13, 4), "-", substr(OwnerUUID, 17, 4), "-", substr(OwnerUUID, 21, 12)) + where OwnerUUID not like '%-%'; + +update land + set GroupUUID = concat(substr(GroupUUID, 1, 8), "-", substr(GroupUUID, 9, 4), "-", substr(GroupUUID, 13, 4), "-", substr(GroupUUID, 17, 4), "-", substr(GroupUUID, 21, 12)) + where GroupUUID not like '%-%'; + +update land + set MediaTextureUUID = concat(substr(MediaTextureUUID, 1, 8), "-", substr(MediaTextureUUID, 9, 4), "-", substr(MediaTextureUUID, 13, 4), "-", substr(MediaTextureUUID, 17, 4), "-", substr(MediaTextureUUID, 21, 12)) + where MediaTextureUUID not like '%-%'; + +update land + set SnapshotUUID = concat(substr(SnapshotUUID, 1, 8), "-", substr(SnapshotUUID, 9, 4), "-", substr(SnapshotUUID, 13, 4), "-", substr(SnapshotUUID, 17, 4), "-", substr(SnapshotUUID, 21, 12)) + where SnapshotUUID not like '%-%'; + +update land + set AuthbuyerID = concat(substr(AuthbuyerID, 1, 8), "-", substr(AuthbuyerID, 9, 4), "-", substr(AuthbuyerID, 13, 4), "-", substr(AuthbuyerID, 17, 4), "-", substr(AuthbuyerID, 21, 12)) + where AuthbuyerID not like '%-%'; + +COMMIT; + +:VERSION 29 #--------------------- + +BEGIN; + +ALTER TABLE prims ADD COLUMN PassTouches tinyint not null default 0; + +COMMIT; + +:VERSION 30 #--------------------- + +BEGIN; + +ALTER TABLE regionsettings ADD COLUMN loaded_creation_date varchar(20) default NULL; +ALTER TABLE regionsettings ADD COLUMN loaded_creation_time varchar(20) default NULL; +ALTER TABLE regionsettings ADD COLUMN loaded_creation_id varchar(64) default NULL; + +COMMIT; + +:VERSION 31 #--------------------- + +BEGIN; + +ALTER TABLE regionsettings DROP COLUMN loaded_creation_date; +ALTER TABLE regionsettings DROP COLUMN loaded_creation_time; +ALTER TABLE regionsettings ADD COLUMN loaded_creation_datetime int unsigned NOT NULL default 0; + +COMMIT; + +:VERSION 32 #--------------------- + +BEGIN; +ALTER TABLE estate_settings AUTO_INCREMENT = 100; +COMMIT; + + + + diff --git a/OpenSim/Data/MySQL/Resources/UserAccount.migrations b/OpenSim/Data/MySQL/Resources/UserAccount.migrations new file mode 100644 index 0000000..84011e6 --- /dev/null +++ b/OpenSim/Data/MySQL/Resources/UserAccount.migrations @@ -0,0 +1,47 @@ +:VERSION 1 # ------------------------- + +BEGIN; + +CREATE TABLE `UserAccounts` ( + `PrincipalID` CHAR(36) NOT NULL, + `ScopeID` CHAR(36) NOT NULL, + `FirstName` VARCHAR(64) NOT NULL, + `LastName` VARCHAR(64) NOT NULL, + `Email` VARCHAR(64), + `ServiceURLs` TEXT, + `Created` INT(11) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +COMMIT; + +:VERSION 2 # ------------------------- + +BEGIN; + +INSERT INTO UserAccounts (PrincipalID, ScopeID, FirstName, LastName, Email, ServiceURLs, Created) SELECT `UUID` AS PrincipalID, '00000000-0000-0000-0000-000000000000' AS ScopeID, username AS FirstName, lastname AS LastName, email as Email, CONCAT('AssetServerURI=', userAssetURI, ' InventoryServerURI=', userInventoryURI, ' GatewayURI= HomeURI=') AS ServiceURLs, created as Created FROM users; + +COMMIT; + +:VERSION 3 # ------------------------- + +BEGIN; + +CREATE UNIQUE INDEX PrincipalID ON UserAccounts(PrincipalID); +CREATE INDEX Email ON UserAccounts(Email); +CREATE INDEX FirstName ON UserAccounts(FirstName); +CREATE INDEX LastName ON UserAccounts(LastName); +CREATE INDEX Name ON UserAccounts(FirstName,LastName); + +COMMIT; + +:VERSION 4 # ------------------------- + +BEGIN; + +ALTER TABLE UserAccounts ADD COLUMN UserLevel integer NOT NULL DEFAULT 0; +ALTER TABLE UserAccounts ADD COLUMN UserFlags integer NOT NULL DEFAULT 0; +ALTER TABLE UserAccounts ADD COLUMN UserTitle varchar(64) NOT NULL DEFAULT ''; + +COMMIT; + + diff --git a/OpenSim/Data/MySQL/Resources/UserStore.migrations b/OpenSim/Data/MySQL/Resources/UserStore.migrations new file mode 100644 index 0000000..f054611 --- /dev/null +++ b/OpenSim/Data/MySQL/Resources/UserStore.migrations @@ -0,0 +1,168 @@ +:VERSION 1 # ----------------------------- + +BEGIN; + +SET FOREIGN_KEY_CHECKS=0; +-- ---------------------------- +-- Table structure for agents +-- ---------------------------- +CREATE TABLE `agents` ( + `UUID` varchar(36) NOT NULL, + `sessionID` varchar(36) NOT NULL, + `secureSessionID` varchar(36) NOT NULL, + `agentIP` varchar(16) NOT NULL, + `agentPort` int(11) NOT NULL, + `agentOnline` tinyint(4) NOT NULL, + `loginTime` int(11) NOT NULL, + `logoutTime` int(11) NOT NULL, + `currentRegion` varchar(36) NOT NULL, + `currentHandle` bigint(20) unsigned NOT NULL, + `currentPos` varchar(64) NOT NULL, + PRIMARY KEY (`UUID`), + UNIQUE KEY `session` (`sessionID`), + UNIQUE KEY `ssession` (`secureSessionID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- Create schema avatar_appearance +-- + +CREATE TABLE `avatarappearance` ( + Owner char(36) NOT NULL, + Serial int(10) unsigned NOT NULL, + Visual_Params blob NOT NULL, + Texture blob NOT NULL, + Avatar_Height float NOT NULL, + Body_Item char(36) NOT NULL, + Body_Asset char(36) NOT NULL, + Skin_Item char(36) NOT NULL, + Skin_Asset char(36) NOT NULL, + Hair_Item char(36) NOT NULL, + Hair_Asset char(36) NOT NULL, + Eyes_Item char(36) NOT NULL, + Eyes_Asset char(36) NOT NULL, + Shirt_Item char(36) NOT NULL, + Shirt_Asset char(36) NOT NULL, + Pants_Item char(36) NOT NULL, + Pants_Asset char(36) NOT NULL, + Shoes_Item char(36) NOT NULL, + Shoes_Asset char(36) NOT NULL, + Socks_Item char(36) NOT NULL, + Socks_Asset char(36) NOT NULL, + Jacket_Item char(36) NOT NULL, + Jacket_Asset char(36) NOT NULL, + Gloves_Item char(36) NOT NULL, + Gloves_Asset char(36) NOT NULL, + Undershirt_Item char(36) NOT NULL, + Undershirt_Asset char(36) NOT NULL, + Underpants_Item char(36) NOT NULL, + Underpants_Asset char(36) NOT NULL, + Skirt_Item char(36) NOT NULL, + Skirt_Asset char(36) NOT NULL, + PRIMARY KEY (`Owner`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +SET FOREIGN_KEY_CHECKS=0; +-- ---------------------------- +-- Table structure for users +-- ---------------------------- +CREATE TABLE `userfriends` ( + `ownerID` VARCHAR(37) NOT NULL, + `friendID` VARCHAR(37) NOT NULL, + `friendPerms` INT NOT NULL, + `datetimestamp` INT NOT NULL, + UNIQUE KEY (`ownerID`, `friendID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +-- ---------------------------- +-- Table structure for users +-- ---------------------------- +CREATE TABLE `users` ( + `UUID` varchar(36) NOT NULL default '', + `username` varchar(32) NOT NULL, + `lastname` varchar(32) NOT NULL, + `passwordHash` varchar(32) NOT NULL, + `passwordSalt` varchar(32) NOT NULL, + `homeRegion` bigint(20) unsigned default NULL, + `homeLocationX` float default NULL, + `homeLocationY` float default NULL, + `homeLocationZ` float default NULL, + `homeLookAtX` float default NULL, + `homeLookAtY` float default NULL, + `homeLookAtZ` float default NULL, + `created` int(11) NOT NULL, + `lastLogin` int(11) NOT NULL, + `userInventoryURI` varchar(255) default NULL, + `userAssetURI` varchar(255) default NULL, + `profileCanDoMask` int(10) unsigned default NULL, + `profileWantDoMask` int(10) unsigned default NULL, + `profileAboutText` text, + `profileFirstText` text, + `profileImage` varchar(36) default NULL, + `profileFirstImage` varchar(36) default NULL, + `webLoginKey` varchar(36) default NULL, + PRIMARY KEY (`UUID`), + UNIQUE KEY `usernames` (`username`,`lastname`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- ---------------------------- +-- Records +-- ---------------------------- +COMMIT; + +:VERSION 2 # ----------------------------- + +BEGIN; + +ALTER TABLE users add homeRegionID char(36) NOT NULL default '00000000-0000-0000-0000-000000000000'; + +COMMIT; + +:VERSION 3 # ----------------------------- + +BEGIN; + +ALTER TABLE users add userFlags integer NOT NULL default 0; +ALTER TABLE users add godLevel integer NOT NULL default 0; + +COMMIT; + +:VERSION 4 # ----------------------------- + +BEGIN; + +ALTER TABLE users add customType varchar(32) not null default ''; +ALTER TABLE users add partner char(36) not null default '00000000-0000-0000-0000-000000000000'; + +COMMIT; + +:VERSION 5 # ----------------------------- + +BEGIN; + +CREATE TABLE `avatarattachments` (`UUID` char(36) NOT NULL, `attachpoint` int(11) NOT NULL, `item` char(36) NOT NULL, `asset` char(36) NOT NULL) ENGINE=InnoDB; + +COMMIT; + +:VERSION 6 # ----------------------------- + +BEGIN; + +ALTER TABLE agents add currentLookAt varchar(36) not null default ''; + +COMMIT; + +:VERSION 7 # ----------------------------- + +BEGIN; + +ALTER TABLE users add email varchar(250); + +COMMIT; + +:VERSION 8 # ----------------------------- + +BEGIN; + +ALTER TABLE users add scopeID char(36) not null default '00000000-0000-0000-0000-000000000000'; + +COMMIT; + -- cgit v1.1 From 6e7b3950d70b0dbe3b765d596adc534a6ca3a2a9 Mon Sep 17 00:00:00 2001 From: AlexRa Date: Thu, 6 May 2010 22:44:57 +0300 Subject: Migrations for SQLite converted to new format --- OpenSim/Data/SQLite/Resources/001_AssetStore.sql | 12 - OpenSim/Data/SQLite/Resources/001_AuthStore.sql | 18 - OpenSim/Data/SQLite/Resources/001_Avatar.sql | 9 - OpenSim/Data/SQLite/Resources/001_FriendsStore.sql | 10 - .../Data/SQLite/Resources/001_InventoryStore.sql | 32 -- OpenSim/Data/SQLite/Resources/001_RegionStore.sql | 144 ------ OpenSim/Data/SQLite/Resources/001_UserAccount.sql | 17 - OpenSim/Data/SQLite/Resources/001_UserStore.sql | 39 -- OpenSim/Data/SQLite/Resources/002_AssetStore.sql | 10 - OpenSim/Data/SQLite/Resources/002_AuthStore.sql | 5 - OpenSim/Data/SQLite/Resources/002_FriendsStore.sql | 5 - .../Data/SQLite/Resources/002_InventoryStore.sql | 8 - OpenSim/Data/SQLite/Resources/002_RegionStore.sql | 10 - OpenSim/Data/SQLite/Resources/002_UserAccount.sql | 5 - OpenSim/Data/SQLite/Resources/002_UserStore.sql | 5 - OpenSim/Data/SQLite/Resources/003_AssetStore.sql | 1 - .../Data/SQLite/Resources/003_InventoryStore.sql | 5 - OpenSim/Data/SQLite/Resources/003_RegionStore.sql | 5 - OpenSim/Data/SQLite/Resources/003_UserStore.sql | 6 - OpenSim/Data/SQLite/Resources/004_AssetStore.sql | 7 - .../Data/SQLite/Resources/004_InventoryStore.sql | 36 -- OpenSim/Data/SQLite/Resources/004_RegionStore.sql | 38 -- OpenSim/Data/SQLite/Resources/004_UserStore.sql | 6 - OpenSim/Data/SQLite/Resources/005_RegionStore.sql | 5 - OpenSim/Data/SQLite/Resources/005_UserStore.sql | 5 - OpenSim/Data/SQLite/Resources/006_RegionStore.sql | 102 ---- OpenSim/Data/SQLite/Resources/006_UserStore.sql | 20 - OpenSim/Data/SQLite/Resources/007_RegionStore.sql | 8 - OpenSim/Data/SQLite/Resources/007_UserStore.sql | 7 - OpenSim/Data/SQLite/Resources/008_RegionStore.sql | 6 - OpenSim/Data/SQLite/Resources/008_UserStore.sql | 5 - OpenSim/Data/SQLite/Resources/009_RegionStore.sql | 8 - OpenSim/Data/SQLite/Resources/009_UserStore.sql | 11 - OpenSim/Data/SQLite/Resources/010_RegionStore.sql | 5 - OpenSim/Data/SQLite/Resources/010_UserStore.sql | 37 -- OpenSim/Data/SQLite/Resources/011_RegionStore.sql | 28 -- OpenSim/Data/SQLite/Resources/012_RegionStore.sql | 5 - OpenSim/Data/SQLite/Resources/013_RegionStore.sql | 6 - OpenSim/Data/SQLite/Resources/014_RegionStore.sql | 8 - OpenSim/Data/SQLite/Resources/015_RegionStore.sql | 6 - OpenSim/Data/SQLite/Resources/016_RegionStore.sql | 5 - OpenSim/Data/SQLite/Resources/017_RegionStore.sql | 8 - OpenSim/Data/SQLite/Resources/018_RegionStore.sql | 79 ---- .../Data/SQLite/Resources/AssetStore.migrations | 42 ++ OpenSim/Data/SQLite/Resources/AuthStore.migrations | 29 ++ OpenSim/Data/SQLite/Resources/Avatar.migrations | 11 + .../Data/SQLite/Resources/FriendsStore.migrations | 20 + .../SQLite/Resources/InventoryStore.migrations | 92 ++++ .../Data/SQLite/Resources/RegionStore.migrations | 526 +++++++++++++++++++++ .../Data/SQLite/Resources/UserAccount.migrations | 27 ++ OpenSim/Data/SQLite/Resources/UserStore.migrations | 169 +++++++ 51 files changed, 916 insertions(+), 797 deletions(-) delete mode 100644 OpenSim/Data/SQLite/Resources/001_AssetStore.sql delete mode 100644 OpenSim/Data/SQLite/Resources/001_AuthStore.sql delete mode 100644 OpenSim/Data/SQLite/Resources/001_Avatar.sql delete mode 100644 OpenSim/Data/SQLite/Resources/001_FriendsStore.sql delete mode 100644 OpenSim/Data/SQLite/Resources/001_InventoryStore.sql delete mode 100644 OpenSim/Data/SQLite/Resources/001_RegionStore.sql delete mode 100644 OpenSim/Data/SQLite/Resources/001_UserAccount.sql delete mode 100644 OpenSim/Data/SQLite/Resources/001_UserStore.sql delete mode 100644 OpenSim/Data/SQLite/Resources/002_AssetStore.sql delete mode 100644 OpenSim/Data/SQLite/Resources/002_AuthStore.sql delete mode 100644 OpenSim/Data/SQLite/Resources/002_FriendsStore.sql delete mode 100644 OpenSim/Data/SQLite/Resources/002_InventoryStore.sql delete mode 100644 OpenSim/Data/SQLite/Resources/002_RegionStore.sql delete mode 100644 OpenSim/Data/SQLite/Resources/002_UserAccount.sql delete mode 100644 OpenSim/Data/SQLite/Resources/002_UserStore.sql delete mode 100644 OpenSim/Data/SQLite/Resources/003_AssetStore.sql delete mode 100644 OpenSim/Data/SQLite/Resources/003_InventoryStore.sql delete mode 100644 OpenSim/Data/SQLite/Resources/003_RegionStore.sql delete mode 100644 OpenSim/Data/SQLite/Resources/003_UserStore.sql delete mode 100644 OpenSim/Data/SQLite/Resources/004_AssetStore.sql delete mode 100644 OpenSim/Data/SQLite/Resources/004_InventoryStore.sql delete mode 100644 OpenSim/Data/SQLite/Resources/004_RegionStore.sql delete mode 100644 OpenSim/Data/SQLite/Resources/004_UserStore.sql delete mode 100644 OpenSim/Data/SQLite/Resources/005_RegionStore.sql delete mode 100644 OpenSim/Data/SQLite/Resources/005_UserStore.sql delete mode 100644 OpenSim/Data/SQLite/Resources/006_RegionStore.sql delete mode 100644 OpenSim/Data/SQLite/Resources/006_UserStore.sql delete mode 100644 OpenSim/Data/SQLite/Resources/007_RegionStore.sql delete mode 100644 OpenSim/Data/SQLite/Resources/007_UserStore.sql delete mode 100644 OpenSim/Data/SQLite/Resources/008_RegionStore.sql delete mode 100644 OpenSim/Data/SQLite/Resources/008_UserStore.sql delete mode 100644 OpenSim/Data/SQLite/Resources/009_RegionStore.sql delete mode 100644 OpenSim/Data/SQLite/Resources/009_UserStore.sql delete mode 100644 OpenSim/Data/SQLite/Resources/010_RegionStore.sql delete mode 100644 OpenSim/Data/SQLite/Resources/010_UserStore.sql delete mode 100644 OpenSim/Data/SQLite/Resources/011_RegionStore.sql delete mode 100644 OpenSim/Data/SQLite/Resources/012_RegionStore.sql delete mode 100644 OpenSim/Data/SQLite/Resources/013_RegionStore.sql delete mode 100644 OpenSim/Data/SQLite/Resources/014_RegionStore.sql delete mode 100644 OpenSim/Data/SQLite/Resources/015_RegionStore.sql delete mode 100644 OpenSim/Data/SQLite/Resources/016_RegionStore.sql delete mode 100644 OpenSim/Data/SQLite/Resources/017_RegionStore.sql delete mode 100644 OpenSim/Data/SQLite/Resources/018_RegionStore.sql create mode 100644 OpenSim/Data/SQLite/Resources/AssetStore.migrations create mode 100644 OpenSim/Data/SQLite/Resources/AuthStore.migrations create mode 100644 OpenSim/Data/SQLite/Resources/Avatar.migrations create mode 100644 OpenSim/Data/SQLite/Resources/FriendsStore.migrations create mode 100644 OpenSim/Data/SQLite/Resources/InventoryStore.migrations create mode 100644 OpenSim/Data/SQLite/Resources/RegionStore.migrations create mode 100644 OpenSim/Data/SQLite/Resources/UserAccount.migrations create mode 100644 OpenSim/Data/SQLite/Resources/UserStore.migrations diff --git a/OpenSim/Data/SQLite/Resources/001_AssetStore.sql b/OpenSim/Data/SQLite/Resources/001_AssetStore.sql deleted file mode 100644 index 2e026ca..0000000 --- a/OpenSim/Data/SQLite/Resources/001_AssetStore.sql +++ /dev/null @@ -1,12 +0,0 @@ -BEGIN TRANSACTION; -CREATE TABLE assets( - UUID varchar(255) primary key, - Name varchar(255), - Description varchar(255), - Type integer, - InvType integer, - Local integer, - Temporary integer, - Data blob); - -COMMIT; diff --git a/OpenSim/Data/SQLite/Resources/001_AuthStore.sql b/OpenSim/Data/SQLite/Resources/001_AuthStore.sql deleted file mode 100644 index 468567d..0000000 --- a/OpenSim/Data/SQLite/Resources/001_AuthStore.sql +++ /dev/null @@ -1,18 +0,0 @@ -BEGIN TRANSACTION; - -CREATE TABLE auth ( - UUID char(36) NOT NULL, - passwordHash char(32) NOT NULL default '', - passwordSalt char(32) NOT NULL default '', - webLoginKey varchar(255) NOT NULL default '', - accountType VARCHAR(32) NOT NULL DEFAULT 'UserAccount', - PRIMARY KEY (`UUID`) -); - -CREATE TABLE tokens ( - UUID char(36) NOT NULL, - token varchar(255) NOT NULL, - validity datetime NOT NULL -); - -COMMIT; diff --git a/OpenSim/Data/SQLite/Resources/001_Avatar.sql b/OpenSim/Data/SQLite/Resources/001_Avatar.sql deleted file mode 100644 index 7ec906b..0000000 --- a/OpenSim/Data/SQLite/Resources/001_Avatar.sql +++ /dev/null @@ -1,9 +0,0 @@ -BEGIN TRANSACTION; - -CREATE TABLE Avatars ( - PrincipalID CHAR(36) NOT NULL, - Name VARCHAR(32) NOT NULL, - Value VARCHAR(255) NOT NULL DEFAULT '', - PRIMARY KEY(PrincipalID, Name)); - -COMMIT; diff --git a/OpenSim/Data/SQLite/Resources/001_FriendsStore.sql b/OpenSim/Data/SQLite/Resources/001_FriendsStore.sql deleted file mode 100644 index f1b9ab9..0000000 --- a/OpenSim/Data/SQLite/Resources/001_FriendsStore.sql +++ /dev/null @@ -1,10 +0,0 @@ -BEGIN TRANSACTION; - -CREATE TABLE `Friends` ( - `PrincipalID` CHAR(36) NOT NULL, - `Friend` VARCHAR(255) NOT NULL, - `Flags` VARCHAR(16) NOT NULL DEFAULT 0, - `Offered` VARCHAR(32) NOT NULL DEFAULT 0, - PRIMARY KEY(`PrincipalID`, `Friend`)); - -COMMIT; diff --git a/OpenSim/Data/SQLite/Resources/001_InventoryStore.sql b/OpenSim/Data/SQLite/Resources/001_InventoryStore.sql deleted file mode 100644 index 554d5c2..0000000 --- a/OpenSim/Data/SQLite/Resources/001_InventoryStore.sql +++ /dev/null @@ -1,32 +0,0 @@ -BEGIN TRANSACTION; - -CREATE TABLE inventoryfolders( - UUID varchar(255) primary key, - name varchar(255), - agentID varchar(255), - parentID varchar(255), - type integer, - version integer); - -CREATE TABLE inventoryitems( - UUID varchar(255) primary key, - assetID varchar(255), - assetType integer, - invType integer, - parentFolderID varchar(255), - avatarID varchar(255), - creatorsID varchar(255), - inventoryName varchar(255), - inventoryDescription varchar(255), - inventoryNextPermissions integer, - inventoryCurrentPermissions integer, - inventoryBasePermissions integer, - inventoryEveryOnePermissions integer, - salePrice integer default 99, - saleType integer default 0, - creationDate integer default 2000, - groupID varchar(255) default '00000000-0000-0000-0000-000000000000', - groupOwned integer default 0, - flags integer default 0); - -COMMIT; diff --git a/OpenSim/Data/SQLite/Resources/001_RegionStore.sql b/OpenSim/Data/SQLite/Resources/001_RegionStore.sql deleted file mode 100644 index 39e8180..0000000 --- a/OpenSim/Data/SQLite/Resources/001_RegionStore.sql +++ /dev/null @@ -1,144 +0,0 @@ -BEGIN TRANSACTION; - -CREATE TABLE prims( - UUID varchar(255) primary key, - RegionUUID varchar(255), - ParentID integer, - CreationDate integer, - Name varchar(255), - SceneGroupID varchar(255), - Text varchar(255), - Description varchar(255), - SitName varchar(255), - TouchName varchar(255), - CreatorID varchar(255), - OwnerID varchar(255), - GroupID varchar(255), - LastOwnerID varchar(255), - OwnerMask integer, - NextOwnerMask integer, - GroupMask integer, - EveryoneMask integer, - BaseMask integer, - PositionX float, - PositionY float, - PositionZ float, - GroupPositionX float, - GroupPositionY float, - GroupPositionZ float, - VelocityX float, - VelocityY float, - VelocityZ float, - AngularVelocityX float, - AngularVelocityY float, - AngularVelocityZ float, - AccelerationX float, - AccelerationY float, - AccelerationZ float, - RotationX float, - RotationY float, - RotationZ float, - RotationW float, - ObjectFlags integer, - SitTargetOffsetX float NOT NULL default 0, - SitTargetOffsetY float NOT NULL default 0, - SitTargetOffsetZ float NOT NULL default 0, - SitTargetOrientW float NOT NULL default 0, - SitTargetOrientX float NOT NULL default 0, - SitTargetOrientY float NOT NULL default 0, - SitTargetOrientZ float NOT NULL default 0); - -CREATE TABLE primshapes( - UUID varchar(255) primary key, - Shape integer, - ScaleX float, - ScaleY float, - ScaleZ float, - PCode integer, - PathBegin integer, - PathEnd integer, - PathScaleX integer, - PathScaleY integer, - PathShearX integer, - PathShearY integer, - PathSkew integer, - PathCurve integer, - PathRadiusOffset integer, - PathRevolutions integer, - PathTaperX integer, - PathTaperY integer, - PathTwist integer, - PathTwistBegin integer, - ProfileBegin integer, - ProfileEnd integer, - ProfileCurve integer, - ProfileHollow integer, - Texture blob, - ExtraParams blob, - State Integer NOT NULL default 0); - -CREATE TABLE primitems( - itemID varchar(255) primary key, - primID varchar(255), - assetID varchar(255), - parentFolderID varchar(255), - invType integer, - assetType integer, - name varchar(255), - description varchar(255), - creationDate integer, - creatorID varchar(255), - ownerID varchar(255), - lastOwnerID varchar(255), - groupID varchar(255), - nextPermissions string, - currentPermissions string, - basePermissions string, - everyonePermissions string, - groupPermissions string); - -CREATE TABLE terrain( - RegionUUID varchar(255), - Revision integer, - Heightfield blob); - -CREATE TABLE land( - UUID varchar(255) primary key, - RegionUUID varchar(255), - LocalLandID string, - Bitmap blob, - Name varchar(255), - Desc varchar(255), - OwnerUUID varchar(255), - IsGroupOwned string, - Area integer, - AuctionID integer, - Category integer, - ClaimDate integer, - ClaimPrice integer, - GroupUUID varchar(255), - SalePrice integer, - LandStatus integer, - LandFlags string, - LandingType string, - MediaAutoScale string, - MediaTextureUUID varchar(255), - MediaURL varchar(255), - MusicURL varchar(255), - PassHours float, - PassPrice string, - SnapshotUUID varchar(255), - UserLocationX float, - UserLocationY float, - UserLocationZ float, - UserLookAtX float, - UserLookAtY float, - UserLookAtZ float, - AuthbuyerID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000'); - -CREATE TABLE landaccesslist( - LandUUID varchar(255), - AccessUUID varchar(255), - Flags string); - -COMMIT; diff --git a/OpenSim/Data/SQLite/Resources/001_UserAccount.sql b/OpenSim/Data/SQLite/Resources/001_UserAccount.sql deleted file mode 100644 index c38d9a7..0000000 --- a/OpenSim/Data/SQLite/Resources/001_UserAccount.sql +++ /dev/null @@ -1,17 +0,0 @@ -BEGIN TRANSACTION; - --- useraccounts table -CREATE TABLE UserAccounts ( - PrincipalID CHAR(36) primary key, - ScopeID CHAR(36) NOT NULL, - FirstName VARCHAR(64) NOT NULL, - LastName VARCHAR(64) NOT NULL, - Email VARCHAR(64), - ServiceURLs TEXT, - Created INT(11), - UserLevel integer NOT NULL DEFAULT 0, - UserFlags integer NOT NULL DEFAULT 0, - UserTitle varchar(64) NOT NULL DEFAULT '' -); - -COMMIT; \ No newline at end of file diff --git a/OpenSim/Data/SQLite/Resources/001_UserStore.sql b/OpenSim/Data/SQLite/Resources/001_UserStore.sql deleted file mode 100644 index b584594..0000000 --- a/OpenSim/Data/SQLite/Resources/001_UserStore.sql +++ /dev/null @@ -1,39 +0,0 @@ -BEGIN TRANSACTION; - --- users table -CREATE TABLE users( - UUID varchar(255) primary key, - username varchar(255), - surname varchar(255), - passwordHash varchar(255), - passwordSalt varchar(255), - homeRegionX integer, - homeRegionY integer, - homeLocationX float, - homeLocationY float, - homeLocationZ float, - homeLookAtX float, - homeLookAtY float, - homeLookAtZ float, - created integer, - lastLogin integer, - rootInventoryFolderID varchar(255), - userInventoryURI varchar(255), - userAssetURI varchar(255), - profileCanDoMask integer, - profileWantDoMask integer, - profileAboutText varchar(255), - profileFirstText varchar(255), - profileImage varchar(255), - profileFirstImage varchar(255), - webLoginKey text default '00000000-0000-0000-0000-000000000000'); --- friends table -CREATE TABLE userfriends( - ownerID varchar(255), - friendID varchar(255), - friendPerms integer, - ownerPerms integer, - datetimestamp integer); - -COMMIT; - diff --git a/OpenSim/Data/SQLite/Resources/002_AssetStore.sql b/OpenSim/Data/SQLite/Resources/002_AssetStore.sql deleted file mode 100644 index 5339b84..0000000 --- a/OpenSim/Data/SQLite/Resources/002_AssetStore.sql +++ /dev/null @@ -1,10 +0,0 @@ -BEGIN TRANSACTION; - -CREATE TEMPORARY TABLE assets_backup(UUID,Name,Description,Type,Local,Temporary,Data); -INSERT INTO assets_backup SELECT UUID,Name,Description,Type,Local,Temporary,Data FROM assets; -DROP TABLE assets; -CREATE TABLE assets(UUID,Name,Description,Type,Local,Temporary,Data); -INSERT INTO assets SELECT UUID,Name,Description,Type,Local,Temporary,Data FROM assets_backup; -DROP TABLE assets_backup; - -COMMIT; diff --git a/OpenSim/Data/SQLite/Resources/002_AuthStore.sql b/OpenSim/Data/SQLite/Resources/002_AuthStore.sql deleted file mode 100644 index 3237b68..0000000 --- a/OpenSim/Data/SQLite/Resources/002_AuthStore.sql +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN TRANSACTION; - -INSERT INTO auth (UUID, passwordHash, passwordSalt, webLoginKey) SELECT `UUID` AS UUID, `passwordHash` AS passwordHash, `passwordSalt` AS passwordSalt, `webLoginKey` AS webLoginKey FROM users; - -COMMIT; diff --git a/OpenSim/Data/SQLite/Resources/002_FriendsStore.sql b/OpenSim/Data/SQLite/Resources/002_FriendsStore.sql deleted file mode 100644 index 6733502..0000000 --- a/OpenSim/Data/SQLite/Resources/002_FriendsStore.sql +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN TRANSACTION; - -INSERT INTO `Friends` SELECT `ownerID`, `friendID`, `friendPerms`, 0 FROM `userfriends`; - -COMMIT; diff --git a/OpenSim/Data/SQLite/Resources/002_InventoryStore.sql b/OpenSim/Data/SQLite/Resources/002_InventoryStore.sql deleted file mode 100644 index 01951d6..0000000 --- a/OpenSim/Data/SQLite/Resources/002_InventoryStore.sql +++ /dev/null @@ -1,8 +0,0 @@ -BEGIN TRANSACTION; - -create index inventoryfolders_agentid on inventoryfolders(agentid); -create index inventoryfolders_parentid on inventoryfolders(parentid); -create index inventoryitems_parentfolderid on inventoryitems(parentfolderid); -create index inventoryitems_avatarid on inventoryitems(avatarid); - -COMMIT; \ No newline at end of file diff --git a/OpenSim/Data/SQLite/Resources/002_RegionStore.sql b/OpenSim/Data/SQLite/Resources/002_RegionStore.sql deleted file mode 100644 index c5c7c99..0000000 --- a/OpenSim/Data/SQLite/Resources/002_RegionStore.sql +++ /dev/null @@ -1,10 +0,0 @@ -BEGIN TRANSACTION; - -CREATE TABLE regionban( - regionUUID varchar (255), - bannedUUID varchar (255), - bannedIp varchar (255), - bannedIpHostMask varchar (255) - ); - -COMMIT; \ No newline at end of file diff --git a/OpenSim/Data/SQLite/Resources/002_UserAccount.sql b/OpenSim/Data/SQLite/Resources/002_UserAccount.sql deleted file mode 100644 index c7a6293..0000000 --- a/OpenSim/Data/SQLite/Resources/002_UserAccount.sql +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN TRANSACTION; - -INSERT INTO UserAccounts (PrincipalID, ScopeID, FirstName, LastName, Email, ServiceURLs, Created) SELECT `UUID` AS PrincipalID, '00000000-0000-0000-0000-000000000000' AS ScopeID, username AS FirstName, surname AS LastName, '' as Email, '' AS ServiceURLs, created as Created FROM users; - -COMMIT; diff --git a/OpenSim/Data/SQLite/Resources/002_UserStore.sql b/OpenSim/Data/SQLite/Resources/002_UserStore.sql deleted file mode 100644 index 48fc680..0000000 --- a/OpenSim/Data/SQLite/Resources/002_UserStore.sql +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN; - -ALTER TABLE users add homeRegionID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000'; - -COMMIT; diff --git a/OpenSim/Data/SQLite/Resources/003_AssetStore.sql b/OpenSim/Data/SQLite/Resources/003_AssetStore.sql deleted file mode 100644 index f54f8d9..0000000 --- a/OpenSim/Data/SQLite/Resources/003_AssetStore.sql +++ /dev/null @@ -1 +0,0 @@ -DELETE FROM assets WHERE UUID = 'dc4b9f0bd00845c696a401dd947ac621' diff --git a/OpenSim/Data/SQLite/Resources/003_InventoryStore.sql b/OpenSim/Data/SQLite/Resources/003_InventoryStore.sql deleted file mode 100644 index 4c6da91..0000000 --- a/OpenSim/Data/SQLite/Resources/003_InventoryStore.sql +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN; - -alter table inventoryitems add column inventoryGroupPermissions integer unsigned not null default 0; - -COMMIT; diff --git a/OpenSim/Data/SQLite/Resources/003_RegionStore.sql b/OpenSim/Data/SQLite/Resources/003_RegionStore.sql deleted file mode 100644 index 4db2f75..0000000 --- a/OpenSim/Data/SQLite/Resources/003_RegionStore.sql +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN; - -ALTER TABLE primitems add flags integer not null default 0; - -COMMIT; \ No newline at end of file diff --git a/OpenSim/Data/SQLite/Resources/003_UserStore.sql b/OpenSim/Data/SQLite/Resources/003_UserStore.sql deleted file mode 100644 index 6f890ee..0000000 --- a/OpenSim/Data/SQLite/Resources/003_UserStore.sql +++ /dev/null @@ -1,6 +0,0 @@ -BEGIN; - -ALTER TABLE users add userFlags integer NOT NULL default 0; -ALTER TABLE users add godLevel integer NOT NULL default 0; - -COMMIT; diff --git a/OpenSim/Data/SQLite/Resources/004_AssetStore.sql b/OpenSim/Data/SQLite/Resources/004_AssetStore.sql deleted file mode 100644 index 39421c4..0000000 --- a/OpenSim/Data/SQLite/Resources/004_AssetStore.sql +++ /dev/null @@ -1,7 +0,0 @@ -BEGIN; - -update assets - set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12) - where UUID not like '%-%'; - -COMMIT; diff --git a/OpenSim/Data/SQLite/Resources/004_InventoryStore.sql b/OpenSim/Data/SQLite/Resources/004_InventoryStore.sql deleted file mode 100644 index e8f4d46..0000000 --- a/OpenSim/Data/SQLite/Resources/004_InventoryStore.sql +++ /dev/null @@ -1,36 +0,0 @@ -BEGIN; - -update inventoryitems - set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12) - where UUID not like '%-%'; - -update inventoryitems - set assetID = substr(assetID, 1, 8) || "-" || substr(assetID, 9, 4) || "-" || substr(assetID, 13, 4) || "-" || substr(assetID, 17, 4) || "-" || substr(assetID, 21, 12) - where assetID not like '%-%'; - -update inventoryitems - set parentFolderID = substr(parentFolderID, 1, 8) || "-" || substr(parentFolderID, 9, 4) || "-" || substr(parentFolderID, 13, 4) || "-" || substr(parentFolderID, 17, 4) || "-" || substr(parentFolderID, 21, 12) - where parentFolderID not like '%-%'; - -update inventoryitems - set avatarID = substr(avatarID, 1, 8) || "-" || substr(avatarID, 9, 4) || "-" || substr(avatarID, 13, 4) || "-" || substr(avatarID, 17, 4) || "-" || substr(avatarID, 21, 12) - where avatarID not like '%-%'; - -update inventoryitems - set creatorsID = substr(creatorsID, 1, 8) || "-" || substr(creatorsID, 9, 4) || "-" || substr(creatorsID, 13, 4) || "-" || substr(creatorsID, 17, 4) || "-" || substr(creatorsID, 21, 12) - where creatorsID not like '%-%'; - - -update inventoryfolders - set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12) - where UUID not like '%-%'; - -update inventoryfolders - set agentID = substr(agentID, 1, 8) || "-" || substr(agentID, 9, 4) || "-" || substr(agentID, 13, 4) || "-" || substr(agentID, 17, 4) || "-" || substr(agentID, 21, 12) - where agentID not like '%-%'; - -update inventoryfolders - set parentID = substr(parentID, 1, 8) || "-" || substr(parentID, 9, 4) || "-" || substr(parentID, 13, 4) || "-" || substr(parentID, 17, 4) || "-" || substr(parentID, 21, 12) - where parentID not like '%-%'; - -COMMIT; diff --git a/OpenSim/Data/SQLite/Resources/004_RegionStore.sql b/OpenSim/Data/SQLite/Resources/004_RegionStore.sql deleted file mode 100644 index de328cb..0000000 --- a/OpenSim/Data/SQLite/Resources/004_RegionStore.sql +++ /dev/null @@ -1,38 +0,0 @@ -BEGIN; - -create table regionsettings ( - regionUUID char(36) not null, - block_terraform integer not null, - block_fly integer not null, - allow_damage integer not null, - restrict_pushing integer not null, - allow_land_resell integer not null, - allow_land_join_divide integer not null, - block_show_in_search integer not null, - agent_limit integer not null, - object_bonus float not null, - maturity integer not null, - disable_scripts integer not null, - disable_collisions integer not null, - disable_physics integer not null, - terrain_texture_1 char(36) not null, - terrain_texture_2 char(36) not null, - terrain_texture_3 char(36) not null, - terrain_texture_4 char(36) not null, - elevation_1_nw float not null, - elevation_2_nw float not null, - elevation_1_ne float not null, - elevation_2_ne float not null, - elevation_1_se float not null, - elevation_2_se float not null, - elevation_1_sw float not null, - elevation_2_sw float not null, - water_height float not null, - terrain_raise_limit float not null, - terrain_lower_limit float not null, - use_estate_sun integer not null, - fixed_sun integer not null, - sun_position float not null, - covenant char(36)); - -COMMIT; diff --git a/OpenSim/Data/SQLite/Resources/004_UserStore.sql b/OpenSim/Data/SQLite/Resources/004_UserStore.sql deleted file mode 100644 index 03142af..0000000 --- a/OpenSim/Data/SQLite/Resources/004_UserStore.sql +++ /dev/null @@ -1,6 +0,0 @@ -BEGIN; - -ALTER TABLE users add customType varchar(32) not null default ''; -ALTER TABLE users add partner char(36) not null default '00000000-0000-0000-0000-000000000000'; - -COMMIT; diff --git a/OpenSim/Data/SQLite/Resources/005_RegionStore.sql b/OpenSim/Data/SQLite/Resources/005_RegionStore.sql deleted file mode 100644 index 1f6d1bd..0000000 --- a/OpenSim/Data/SQLite/Resources/005_RegionStore.sql +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN; - -delete from regionsettings; - -COMMIT; diff --git a/OpenSim/Data/SQLite/Resources/005_UserStore.sql b/OpenSim/Data/SQLite/Resources/005_UserStore.sql deleted file mode 100644 index e45c09a..0000000 --- a/OpenSim/Data/SQLite/Resources/005_UserStore.sql +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN; - -CREATE TABLE `avatarattachments` (`UUID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', `attachpoint` int(11) NOT NULL DEFAULT 0, `item` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', `asset` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000'); - -COMMIT; diff --git a/OpenSim/Data/SQLite/Resources/006_RegionStore.sql b/OpenSim/Data/SQLite/Resources/006_RegionStore.sql deleted file mode 100644 index 94ed818..0000000 --- a/OpenSim/Data/SQLite/Resources/006_RegionStore.sql +++ /dev/null @@ -1,102 +0,0 @@ -BEGIN TRANSACTION; - -CREATE TABLE estate_groups ( - EstateID int(10) NOT NULL, - uuid char(36) NOT NULL -); - -CREATE TABLE estate_managers ( - EstateID int(10) NOT NULL, - uuid char(36) NOT NULL -); - -CREATE TABLE estate_map ( - RegionID char(36) NOT NULL default '00000000-0000-0000-0000-000000000000', - EstateID int(11) NOT NULL -); - -CREATE TABLE estate_settings ( - EstateID INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - EstateName varchar(64) default NULL, - AbuseEmailToEstateOwner tinyint(4) NOT NULL, - DenyAnonymous tinyint(4) NOT NULL, - ResetHomeOnTeleport tinyint(4) NOT NULL, - FixedSun tinyint(4) NOT NULL, - DenyTransacted tinyint(4) NOT NULL, - BlockDwell tinyint(4) NOT NULL, - DenyIdentified tinyint(4) NOT NULL, - AllowVoice tinyint(4) NOT NULL, - UseGlobalTime tinyint(4) NOT NULL, - PricePerMeter int(11) NOT NULL, - TaxFree tinyint(4) NOT NULL, - AllowDirectTeleport tinyint(4) NOT NULL, - RedirectGridX int(11) NOT NULL, - RedirectGridY int(11) NOT NULL, - ParentEstateID int(10) NOT NULL, - SunPosition double NOT NULL, - EstateSkipScripts tinyint(4) NOT NULL, - BillableFactor float NOT NULL, - PublicAccess tinyint(4) NOT NULL -); -insert into estate_settings (EstateID,EstateName,AbuseEmailToEstateOwner,DenyAnonymous,ResetHomeOnTeleport,FixedSun,DenyTransacted,BlockDwell,DenyIdentified,AllowVoice,UseGlobalTime,PricePerMeter,TaxFree,AllowDirectTeleport,RedirectGridX,RedirectGridY,ParentEstateID,SunPosition,PublicAccess,EstateSkipScripts,BillableFactor) values ( 99, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''); -delete from estate_settings; -CREATE TABLE estate_users ( - EstateID int(10) NOT NULL, - uuid char(36) NOT NULL -); - -CREATE TABLE estateban ( - EstateID int(10) NOT NULL, - bannedUUID varchar(36) NOT NULL, - bannedIp varchar(16) NOT NULL, - bannedIpHostMask varchar(16) NOT NULL, - bannedNameMask varchar(64) default NULL -); - -drop table regionsettings; -CREATE TABLE regionsettings ( - regionUUID char(36) NOT NULL, - block_terraform int(11) NOT NULL, - block_fly int(11) NOT NULL, - allow_damage int(11) NOT NULL, - restrict_pushing int(11) NOT NULL, - allow_land_resell int(11) NOT NULL, - allow_land_join_divide int(11) NOT NULL, - block_show_in_search int(11) NOT NULL, - agent_limit int(11) NOT NULL, - object_bonus float NOT NULL, - maturity int(11) NOT NULL, - disable_scripts int(11) NOT NULL, - disable_collisions int(11) NOT NULL, - disable_physics int(11) NOT NULL, - terrain_texture_1 char(36) NOT NULL, - terrain_texture_2 char(36) NOT NULL, - terrain_texture_3 char(36) NOT NULL, - terrain_texture_4 char(36) NOT NULL, - elevation_1_nw float NOT NULL, - elevation_2_nw float NOT NULL, - elevation_1_ne float NOT NULL, - elevation_2_ne float NOT NULL, - elevation_1_se float NOT NULL, - elevation_2_se float NOT NULL, - elevation_1_sw float NOT NULL, - elevation_2_sw float NOT NULL, - water_height float NOT NULL, - terrain_raise_limit float NOT NULL, - terrain_lower_limit float NOT NULL, - use_estate_sun int(11) NOT NULL, - fixed_sun int(11) NOT NULL, - sun_position float NOT NULL, - covenant char(36) default NULL, - Sandbox tinyint(4) NOT NULL, - PRIMARY KEY (regionUUID) -); - -CREATE INDEX estate_ban_estate_id on estateban(EstateID); -CREATE INDEX estate_groups_estate_id on estate_groups(EstateID); -CREATE INDEX estate_managers_estate_id on estate_managers(EstateID); -CREATE INDEX estate_map_estate_id on estate_map(EstateID); -CREATE UNIQUE INDEX estate_map_region_id on estate_map(RegionID); -CREATE INDEX estate_users_estate_id on estate_users(EstateID); - -COMMIT; \ No newline at end of file diff --git a/OpenSim/Data/SQLite/Resources/006_UserStore.sql b/OpenSim/Data/SQLite/Resources/006_UserStore.sql deleted file mode 100644 index f9454c5..0000000 --- a/OpenSim/Data/SQLite/Resources/006_UserStore.sql +++ /dev/null @@ -1,20 +0,0 @@ -BEGIN TRANSACTION; - --- usersagents table -CREATE TABLE IF NOT EXISTS useragents( - UUID varchar(255) primary key, - agentIP varchar(255), - agentPort integer, - agentOnline boolean, - sessionID varchar(255), - secureSessionID varchar(255), - regionID varchar(255), - loginTime integer, - logoutTime integer, - currentRegion varchar(255), - currentHandle varchar(255), - currentPosX float, - currentPosY float, - currentPosZ float); - -COMMIT; diff --git a/OpenSim/Data/SQLite/Resources/007_RegionStore.sql b/OpenSim/Data/SQLite/Resources/007_RegionStore.sql deleted file mode 100644 index 1c813a0..0000000 --- a/OpenSim/Data/SQLite/Resources/007_RegionStore.sql +++ /dev/null @@ -1,8 +0,0 @@ -begin; - -alter table estate_settings add column AbuseEmail varchar(255) not null default ''; - -alter table estate_settings add column EstateOwner varchar(36) not null default ''; - -commit; - diff --git a/OpenSim/Data/SQLite/Resources/007_UserStore.sql b/OpenSim/Data/SQLite/Resources/007_UserStore.sql deleted file mode 100644 index 8b0cd28..0000000 --- a/OpenSim/Data/SQLite/Resources/007_UserStore.sql +++ /dev/null @@ -1,7 +0,0 @@ -BEGIN TRANSACTION; - -ALTER TABLE useragents add currentLookAtX float not null default 128; -ALTER TABLE useragents add currentLookAtY float not null default 128; -ALTER TABLE useragents add currentLookAtZ float not null default 70; - -COMMIT; diff --git a/OpenSim/Data/SQLite/Resources/008_RegionStore.sql b/OpenSim/Data/SQLite/Resources/008_RegionStore.sql deleted file mode 100644 index 28bfbf5..0000000 --- a/OpenSim/Data/SQLite/Resources/008_RegionStore.sql +++ /dev/null @@ -1,6 +0,0 @@ -begin; - -alter table estate_settings add column DenyMinors tinyint not null default 0; - -commit; - diff --git a/OpenSim/Data/SQLite/Resources/008_UserStore.sql b/OpenSim/Data/SQLite/Resources/008_UserStore.sql deleted file mode 100644 index 97da818..0000000 --- a/OpenSim/Data/SQLite/Resources/008_UserStore.sql +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN TRANSACTION; - -ALTER TABLE users add email varchar(250); - -COMMIT; diff --git a/OpenSim/Data/SQLite/Resources/009_RegionStore.sql b/OpenSim/Data/SQLite/Resources/009_RegionStore.sql deleted file mode 100644 index 1f40548..0000000 --- a/OpenSim/Data/SQLite/Resources/009_RegionStore.sql +++ /dev/null @@ -1,8 +0,0 @@ -BEGIN; - -ALTER TABLE prims ADD COLUMN ColorR integer not null default 0; -ALTER TABLE prims ADD COLUMN ColorG integer not null default 0; -ALTER TABLE prims ADD COLUMN ColorB integer not null default 0; -ALTER TABLE prims ADD COLUMN ColorA integer not null default 0; - -COMMIT; diff --git a/OpenSim/Data/SQLite/Resources/009_UserStore.sql b/OpenSim/Data/SQLite/Resources/009_UserStore.sql deleted file mode 100644 index 8ab03ef..0000000 --- a/OpenSim/Data/SQLite/Resources/009_UserStore.sql +++ /dev/null @@ -1,11 +0,0 @@ -BEGIN; - -update users - set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12) - where UUID not like '%-%'; - -update useragents - set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12) - where UUID not like '%-%'; - -COMMIT; diff --git a/OpenSim/Data/SQLite/Resources/010_RegionStore.sql b/OpenSim/Data/SQLite/Resources/010_RegionStore.sql deleted file mode 100644 index b91ccf0..0000000 --- a/OpenSim/Data/SQLite/Resources/010_RegionStore.sql +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN; - -ALTER TABLE prims ADD COLUMN ClickAction INTEGER NOT NULL default 0; - -COMMIT; diff --git a/OpenSim/Data/SQLite/Resources/010_UserStore.sql b/OpenSim/Data/SQLite/Resources/010_UserStore.sql deleted file mode 100644 index 5f956da..0000000 --- a/OpenSim/Data/SQLite/Resources/010_UserStore.sql +++ /dev/null @@ -1,37 +0,0 @@ -BEGIN TRANSACTION; - -CREATE TABLE IF NOT EXISTS avatarappearance( - Owner varchar(36) NOT NULL primary key, - BodyItem varchar(36) DEFAULT NULL, - BodyAsset varchar(36) DEFAULT NULL, - SkinItem varchar(36) DEFAULT NULL, - SkinAsset varchar(36) DEFAULT NULL, - HairItem varchar(36) DEFAULT NULL, - HairAsset varchar(36) DEFAULT NULL, - EyesItem varchar(36) DEFAULT NULL, - EyesAsset varchar(36) DEFAULT NULL, - ShirtItem varchar(36) DEFAULT NULL, - ShirtAsset varchar(36) DEFAULT NULL, - PantsItem varchar(36) DEFAULT NULL, - PantsAsset varchar(36) DEFAULT NULL, - ShoesItem varchar(36) DEFAULT NULL, - ShoesAsset varchar(36) DEFAULT NULL, - SocksItem varchar(36) DEFAULT NULL, - SocksAsset varchar(36) DEFAULT NULL, - JacketItem varchar(36) DEFAULT NULL, - JacketAsset varchar(36) DEFAULT NULL, - GlovesItem varchar(36) DEFAULT NULL, - GlovesAsset varchar(36) DEFAULT NULL, - UnderShirtItem varchar(36) DEFAULT NULL, - UnderShirtAsset varchar(36) DEFAULT NULL, - UnderPantsItem varchar(36) DEFAULT NULL, - UnderPantsAsset varchar(36) DEFAULT NULL, - SkirtItem varchar(36) DEFAULT NULL, - SkirtAsset varchar(36) DEFAULT NULL, - Texture blob, - VisualParams blob, - Serial int DEFAULT NULL, - AvatarHeight float DEFAULT NULL -); - -COMMIT; diff --git a/OpenSim/Data/SQLite/Resources/011_RegionStore.sql b/OpenSim/Data/SQLite/Resources/011_RegionStore.sql deleted file mode 100644 index 42bef89..0000000 --- a/OpenSim/Data/SQLite/Resources/011_RegionStore.sql +++ /dev/null @@ -1,28 +0,0 @@ -BEGIN; - -ALTER TABLE prims ADD COLUMN PayPrice INTEGER NOT NULL default 0; -ALTER TABLE prims ADD COLUMN PayButton1 INTEGER NOT NULL default 0; -ALTER TABLE prims ADD COLUMN PayButton2 INTEGER NOT NULL default 0; -ALTER TABLE prims ADD COLUMN PayButton3 INTEGER NOT NULL default 0; -ALTER TABLE prims ADD COLUMN PayButton4 INTEGER NOT NULL default 0; -ALTER TABLE prims ADD COLUMN LoopedSound varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000'; -ALTER TABLE prims ADD COLUMN LoopedSoundGain float NOT NULL default 0; -ALTER TABLE prims ADD COLUMN TextureAnimation string; -ALTER TABLE prims ADD COLUMN ParticleSystem string; -ALTER TABLE prims ADD COLUMN OmegaX float NOT NULL default 0; -ALTER TABLE prims ADD COLUMN OmegaY float NOT NULL default 0; -ALTER TABLE prims ADD COLUMN OmegaZ float NOT NULL default 0; -ALTER TABLE prims ADD COLUMN CameraEyeOffsetX float NOT NULL default 0; -ALTER TABLE prims ADD COLUMN CameraEyeOffsetY float NOT NULL default 0; -ALTER TABLE prims ADD COLUMN CameraEyeOffsetZ float NOT NULL default 0; -ALTER TABLE prims ADD COLUMN CameraAtOffsetX float NOT NULL default 0; -ALTER TABLE prims ADD COLUMN CameraAtOffsetY float NOT NULL default 0; -ALTER TABLE prims ADD COLUMN CameraAtOffsetZ float NOT NULL default 0; -ALTER TABLE prims ADD COLUMN ForceMouselook string NOT NULL default 0; -ALTER TABLE prims ADD COLUMN ScriptAccessPin INTEGER NOT NULL default 0; -ALTER TABLE prims ADD COLUMN AllowedDrop INTEGER NOT NULL default 0; -ALTER TABLE prims ADD COLUMN DieAtEdge string NOT NULL default 0; -ALTER TABLE prims ADD COLUMN SalePrice INTEGER NOT NULL default 0; -ALTER TABLE prims ADD COLUMN SaleType string NOT NULL default 0; - -COMMIT; \ No newline at end of file diff --git a/OpenSim/Data/SQLite/Resources/012_RegionStore.sql b/OpenSim/Data/SQLite/Resources/012_RegionStore.sql deleted file mode 100644 index d952b78..0000000 --- a/OpenSim/Data/SQLite/Resources/012_RegionStore.sql +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN; - -ALTER TABLE prims ADD COLUMN Material INTEGER NOT NULL default 3; - -COMMIT; diff --git a/OpenSim/Data/SQLite/Resources/013_RegionStore.sql b/OpenSim/Data/SQLite/Resources/013_RegionStore.sql deleted file mode 100644 index 11529cd..0000000 --- a/OpenSim/Data/SQLite/Resources/013_RegionStore.sql +++ /dev/null @@ -1,6 +0,0 @@ -BEGIN; - -ALTER TABLE land ADD COLUMN OtherCleanTime INTEGER NOT NULL default 0; -ALTER TABLE land ADD COLUMN Dwell INTEGER NOT NULL default 0; - -COMMIT; diff --git a/OpenSim/Data/SQLite/Resources/014_RegionStore.sql b/OpenSim/Data/SQLite/Resources/014_RegionStore.sql deleted file mode 100644 index c59b27e..0000000 --- a/OpenSim/Data/SQLite/Resources/014_RegionStore.sql +++ /dev/null @@ -1,8 +0,0 @@ -begin; - -ALTER TABLE regionsettings ADD COLUMN sunvectorx double NOT NULL default 0; -ALTER TABLE regionsettings ADD COLUMN sunvectory double NOT NULL default 0; -ALTER TABLE regionsettings ADD COLUMN sunvectorz double NOT NULL default 0; - -commit; - diff --git a/OpenSim/Data/SQLite/Resources/015_RegionStore.sql b/OpenSim/Data/SQLite/Resources/015_RegionStore.sql deleted file mode 100644 index c43f356..0000000 --- a/OpenSim/Data/SQLite/Resources/015_RegionStore.sql +++ /dev/null @@ -1,6 +0,0 @@ -BEGIN; - -ALTER TABLE prims ADD COLUMN CollisionSound varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000'; -ALTER TABLE prims ADD COLUMN CollisionSoundVolume float NOT NULL default 0; - -COMMIT; diff --git a/OpenSim/Data/SQLite/Resources/016_RegionStore.sql b/OpenSim/Data/SQLite/Resources/016_RegionStore.sql deleted file mode 100644 index 52f160c..0000000 --- a/OpenSim/Data/SQLite/Resources/016_RegionStore.sql +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN; - -ALTER TABLE prims ADD COLUMN VolumeDetect INTEGER NOT NULL DEFAULT 0; - -COMMIT; diff --git a/OpenSim/Data/SQLite/Resources/017_RegionStore.sql b/OpenSim/Data/SQLite/Resources/017_RegionStore.sql deleted file mode 100644 index 6c6b7b5..0000000 --- a/OpenSim/Data/SQLite/Resources/017_RegionStore.sql +++ /dev/null @@ -1,8 +0,0 @@ -BEGIN; -CREATE TEMPORARY TABLE prims_backup(UUID,RegionUUID,CreationDate,Name,SceneGroupID,Text,Description,SitName,TouchName,CreatorID,OwnerID,GroupID,LastOwnerID,OwnerMask,NextOwnerMask,GroupMask,EveryoneMask,BaseMask,PositionX,PositionY,PositionZ,GroupPositionX,GroupPositionY,GroupPositionZ,VelocityX,VelocityY,VelocityZ,AngularVelocityX,AngularVelocityY,AngularVelocityZ,AccelerationX,AccelerationY,AccelerationZ,RotationX,RotationY,RotationZ,RotationW,ObjectFlags,SitTargetOffsetX,SitTargetOffsetY,SitTargetOffsetZ,SitTargetOrientW,SitTargetOrientX,SitTargetOrientY,SitTargetOrientZ,ColorR,ColorG,ColorB,ColorA,ClickAction,PayPrice,PayButton1,PayButton2,PayButton3,PayButton4,LoopedSound,LoopedSoundGain,TextureAnimation,ParticleSystem,OmegaX,OmegaY,OmegaZ,CameraEyeOffsetX,CameraEyeOffsetY,CameraEyeOffsetZ,CameraAtOffsetX,CameraAtOffsetY,CameraAtOffsetZ,ForceMouselook,ScriptAccessPin,AllowedDrop,DieAtEdge,SalePrice,SaleType,Material,CollisionSound,CollisionSoundVolume,VolumeDetect); -INSERT INTO prims_backup SELECT UUID,RegionUUID,CreationDate,Name,SceneGroupID,Text,Description,SitName,TouchName,CreatorID,OwnerID,GroupID,LastOwnerID,OwnerMask,NextOwnerMask,GroupMask,EveryoneMask,BaseMask,PositionX,PositionY,PositionZ,GroupPositionX,GroupPositionY,GroupPositionZ,VelocityX,VelocityY,VelocityZ,AngularVelocityX,AngularVelocityY,AngularVelocityZ,AccelerationX,AccelerationY,AccelerationZ,RotationX,RotationY,RotationZ,RotationW,ObjectFlags,SitTargetOffsetX,SitTargetOffsetY,SitTargetOffsetZ,SitTargetOrientW,SitTargetOrientX,SitTargetOrientY,SitTargetOrientZ,ColorR,ColorG,ColorB,ColorA,ClickAction,PayPrice,PayButton1,PayButton2,PayButton3,PayButton4,LoopedSound,LoopedSoundGain,TextureAnimation,ParticleSystem,OmegaX,OmegaY,OmegaZ,CameraEyeOffsetX,CameraEyeOffsetY,CameraEyeOffsetZ,CameraAtOffsetX,CameraAtOffsetY,CameraAtOffsetZ,ForceMouselook,ScriptAccessPin,AllowedDrop,DieAtEdge,SalePrice,SaleType,Material,CollisionSound,CollisionSoundVolume,VolumeDetect FROM prims; -DROP TABLE prims; -CREATE TABLE prims(UUID,RegionUUID,CreationDate,Name,SceneGroupID,Text,Description,SitName,TouchName,CreatorID,OwnerID,GroupID,LastOwnerID,OwnerMask,NextOwnerMask,GroupMask,EveryoneMask,BaseMask,PositionX,PositionY,PositionZ,GroupPositionX,GroupPositionY,GroupPositionZ,VelocityX,VelocityY,VelocityZ,AngularVelocityX,AngularVelocityY,AngularVelocityZ,AccelerationX,AccelerationY,AccelerationZ,RotationX,RotationY,RotationZ,RotationW,ObjectFlags,SitTargetOffsetX,SitTargetOffsetY,SitTargetOffsetZ,SitTargetOrientW,SitTargetOrientX,SitTargetOrientY,SitTargetOrientZ,ColorR,ColorG,ColorB,ColorA,ClickAction,PayPrice,PayButton1,PayButton2,PayButton3,PayButton4,LoopedSound,LoopedSoundGain,TextureAnimation,ParticleSystem,OmegaX,OmegaY,OmegaZ,CameraEyeOffsetX,CameraEyeOffsetY,CameraEyeOffsetZ,CameraAtOffsetX,CameraAtOffsetY,CameraAtOffsetZ,ForceMouselook,ScriptAccessPin,AllowedDrop,DieAtEdge,SalePrice,SaleType,Material,CollisionSound,CollisionSoundVolume,VolumeDetect); -INSERT INTO prims SELECT UUID,RegionUUID,CreationDate,Name,SceneGroupID,Text,Description,SitName,TouchName,CreatorID,OwnerID,GroupID,LastOwnerID,OwnerMask,NextOwnerMask,GroupMask,EveryoneMask,BaseMask,PositionX,PositionY,PositionZ,GroupPositionX,GroupPositionY,GroupPositionZ,VelocityX,VelocityY,VelocityZ,AngularVelocityX,AngularVelocityY,AngularVelocityZ,AccelerationX,AccelerationY,AccelerationZ,RotationX,RotationY,RotationZ,RotationW,ObjectFlags,SitTargetOffsetX,SitTargetOffsetY,SitTargetOffsetZ,SitTargetOrientW,SitTargetOrientX,SitTargetOrientY,SitTargetOrientZ,ColorR,ColorG,ColorB,ColorA,ClickAction,PayPrice,PayButton1,PayButton2,PayButton3,PayButton4,LoopedSound,LoopedSoundGain,TextureAnimation,ParticleSystem,OmegaX,OmegaY,OmegaZ,CameraEyeOffsetX,CameraEyeOffsetY,CameraEyeOffsetZ,CameraAtOffsetX,CameraAtOffsetY,CameraAtOffsetZ,ForceMouselook,ScriptAccessPin,AllowedDrop,DieAtEdge,SalePrice,SaleType,Material,CollisionSound,CollisionSoundVolume,VolumeDetect FROM prims_backup; -DROP TABLE prims_backup; -COMMIT; \ No newline at end of file diff --git a/OpenSim/Data/SQLite/Resources/018_RegionStore.sql b/OpenSim/Data/SQLite/Resources/018_RegionStore.sql deleted file mode 100644 index 6a390c2..0000000 --- a/OpenSim/Data/SQLite/Resources/018_RegionStore.sql +++ /dev/null @@ -1,79 +0,0 @@ -BEGIN; - -update terrain - set RegionUUID = substr(RegionUUID, 1, 8) || "-" || substr(RegionUUID, 9, 4) || "-" || substr(RegionUUID, 13, 4) || "-" || substr(RegionUUID, 17, 4) || "-" || substr(RegionUUID, 21, 12) - where RegionUUID not like '%-%'; - - -update landaccesslist - set LandUUID = substr(LandUUID, 1, 8) || "-" || substr(LandUUID, 9, 4) || "-" || substr(LandUUID, 13, 4) || "-" || substr(LandUUID, 17, 4) || "-" || substr(LandUUID, 21, 12) - where LandUUID not like '%-%'; - -update landaccesslist - set AccessUUID = substr(AccessUUID, 1, 8) || "-" || substr(AccessUUID, 9, 4) || "-" || substr(AccessUUID, 13, 4) || "-" || substr(AccessUUID, 17, 4) || "-" || substr(AccessUUID, 21, 12) - where AccessUUID not like '%-%'; - - -update prims - set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12) - where UUID not like '%-%'; - -update prims - set RegionUUID = substr(RegionUUID, 1, 8) || "-" || substr(RegionUUID, 9, 4) || "-" || substr(RegionUUID, 13, 4) || "-" || substr(RegionUUID, 17, 4) || "-" || substr(RegionUUID, 21, 12) - where RegionUUID not like '%-%'; - -update prims - set SceneGroupID = substr(SceneGroupID, 1, 8) || "-" || substr(SceneGroupID, 9, 4) || "-" || substr(SceneGroupID, 13, 4) || "-" || substr(SceneGroupID, 17, 4) || "-" || substr(SceneGroupID, 21, 12) - where SceneGroupID not like '%-%'; - -update prims - set CreatorID = substr(CreatorID, 1, 8) || "-" || substr(CreatorID, 9, 4) || "-" || substr(CreatorID, 13, 4) || "-" || substr(CreatorID, 17, 4) || "-" || substr(CreatorID, 21, 12) - where CreatorID not like '%-%'; - -update prims - set OwnerID = substr(OwnerID, 1, 8) || "-" || substr(OwnerID, 9, 4) || "-" || substr(OwnerID, 13, 4) || "-" || substr(OwnerID, 17, 4) || "-" || substr(OwnerID, 21, 12) - where OwnerID not like '%-%'; - -update prims - set GroupID = substr(GroupID, 1, 8) || "-" || substr(GroupID, 9, 4) || "-" || substr(GroupID, 13, 4) || "-" || substr(GroupID, 17, 4) || "-" || substr(GroupID, 21, 12) - where GroupID not like '%-%'; - -update prims - set LastOwnerID = substr(LastOwnerID, 1, 8) || "-" || substr(LastOwnerID, 9, 4) || "-" || substr(LastOwnerID, 13, 4) || "-" || substr(LastOwnerID, 17, 4) || "-" || substr(LastOwnerID, 21, 12) - where LastOwnerID not like '%-%'; - - -update primshapes - set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12) - where UUID not like '%-%'; - - -update land - set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12) - where UUID not like '%-%'; - -update land - set RegionUUID = substr(RegionUUID, 1, 8) || "-" || substr(RegionUUID, 9, 4) || "-" || substr(RegionUUID, 13, 4) || "-" || substr(RegionUUID, 17, 4) || "-" || substr(RegionUUID, 21, 12) - where RegionUUID not like '%-%'; - -update land - set OwnerUUID = substr(OwnerUUID, 1, 8) || "-" || substr(OwnerUUID, 9, 4) || "-" || substr(OwnerUUID, 13, 4) || "-" || substr(OwnerUUID, 17, 4) || "-" || substr(OwnerUUID, 21, 12) - where OwnerUUID not like '%-%'; - -update land - set GroupUUID = substr(GroupUUID, 1, 8) || "-" || substr(GroupUUID, 9, 4) || "-" || substr(GroupUUID, 13, 4) || "-" || substr(GroupUUID, 17, 4) || "-" || substr(GroupUUID, 21, 12) - where GroupUUID not like '%-%'; - -update land - set MediaTextureUUID = substr(MediaTextureUUID, 1, 8) || "-" || substr(MediaTextureUUID, 9, 4) || "-" || substr(MediaTextureUUID, 13, 4) || "-" || substr(MediaTextureUUID, 17, 4) || "-" || substr(MediaTextureUUID, 21, 12) - where MediaTextureUUID not like '%-%'; - -update land - set SnapshotUUID = substr(SnapshotUUID, 1, 8) || "-" || substr(SnapshotUUID, 9, 4) || "-" || substr(SnapshotUUID, 13, 4) || "-" || substr(SnapshotUUID, 17, 4) || "-" || substr(SnapshotUUID, 21, 12) - where SnapshotUUID not like '%-%'; - -update land - set AuthbuyerID = substr(AuthbuyerID, 1, 8) || "-" || substr(AuthbuyerID, 9, 4) || "-" || substr(AuthbuyerID, 13, 4) || "-" || substr(AuthbuyerID, 17, 4) || "-" || substr(AuthbuyerID, 21, 12) - where AuthbuyerID not like '%-%'; - -COMMIT; \ No newline at end of file diff --git a/OpenSim/Data/SQLite/Resources/AssetStore.migrations b/OpenSim/Data/SQLite/Resources/AssetStore.migrations new file mode 100644 index 0000000..fb72b91 --- /dev/null +++ b/OpenSim/Data/SQLite/Resources/AssetStore.migrations @@ -0,0 +1,42 @@ +:VERSION 1 + +BEGIN TRANSACTION; +CREATE TABLE assets( + UUID varchar(255) primary key, + Name varchar(255), + Description varchar(255), + Type integer, + InvType integer, + Local integer, + Temporary integer, + Data blob); + +COMMIT; + +:VERSION 2 + +BEGIN TRANSACTION; + +CREATE TEMPORARY TABLE assets_backup(UUID,Name,Description,Type,Local,Temporary,Data); +INSERT INTO assets_backup SELECT UUID,Name,Description,Type,Local,Temporary,Data FROM assets; +DROP TABLE assets; +CREATE TABLE assets(UUID,Name,Description,Type,Local,Temporary,Data); +INSERT INTO assets SELECT UUID,Name,Description,Type,Local,Temporary,Data FROM assets_backup; +DROP TABLE assets_backup; + +COMMIT; + +:VERSION 3 + +DELETE FROM assets WHERE UUID = 'dc4b9f0bd00845c696a401dd947ac621' + +:VERSION 4 + +BEGIN; + +update assets + set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12) + where UUID not like '%-%'; + +COMMIT; + diff --git a/OpenSim/Data/SQLite/Resources/AuthStore.migrations b/OpenSim/Data/SQLite/Resources/AuthStore.migrations new file mode 100644 index 0000000..ca6bdf5 --- /dev/null +++ b/OpenSim/Data/SQLite/Resources/AuthStore.migrations @@ -0,0 +1,29 @@ +:VERSION 1 + +BEGIN TRANSACTION; + +CREATE TABLE auth ( + UUID char(36) NOT NULL, + passwordHash char(32) NOT NULL default '', + passwordSalt char(32) NOT NULL default '', + webLoginKey varchar(255) NOT NULL default '', + accountType VARCHAR(32) NOT NULL DEFAULT 'UserAccount', + PRIMARY KEY (`UUID`) +); + +CREATE TABLE tokens ( + UUID char(36) NOT NULL, + token varchar(255) NOT NULL, + validity datetime NOT NULL +); + +COMMIT; + +:VERSION 2 + +BEGIN TRANSACTION; + +INSERT INTO auth (UUID, passwordHash, passwordSalt, webLoginKey) SELECT `UUID` AS UUID, `passwordHash` AS passwordHash, `passwordSalt` AS passwordSalt, `webLoginKey` AS webLoginKey FROM users; + +COMMIT; + diff --git a/OpenSim/Data/SQLite/Resources/Avatar.migrations b/OpenSim/Data/SQLite/Resources/Avatar.migrations new file mode 100644 index 0000000..13b4196 --- /dev/null +++ b/OpenSim/Data/SQLite/Resources/Avatar.migrations @@ -0,0 +1,11 @@ +:VERSION 1 + +BEGIN TRANSACTION; + +CREATE TABLE Avatars ( + PrincipalID CHAR(36) NOT NULL, + Name VARCHAR(32) NOT NULL, + Value VARCHAR(255) NOT NULL DEFAULT '', + PRIMARY KEY(PrincipalID, Name)); + +COMMIT; diff --git a/OpenSim/Data/SQLite/Resources/FriendsStore.migrations b/OpenSim/Data/SQLite/Resources/FriendsStore.migrations new file mode 100644 index 0000000..3eb4352 --- /dev/null +++ b/OpenSim/Data/SQLite/Resources/FriendsStore.migrations @@ -0,0 +1,20 @@ +:VERSION 1 + +BEGIN TRANSACTION; + +CREATE TABLE `Friends` ( + `PrincipalID` CHAR(36) NOT NULL, + `Friend` VARCHAR(255) NOT NULL, + `Flags` VARCHAR(16) NOT NULL DEFAULT 0, + `Offered` VARCHAR(32) NOT NULL DEFAULT 0, + PRIMARY KEY(`PrincipalID`, `Friend`)); + +COMMIT; + +:VERSION 2 + +BEGIN TRANSACTION; + +INSERT INTO `Friends` SELECT `ownerID`, `friendID`, `friendPerms`, 0 FROM `userfriends`; + +COMMIT; diff --git a/OpenSim/Data/SQLite/Resources/InventoryStore.migrations b/OpenSim/Data/SQLite/Resources/InventoryStore.migrations new file mode 100644 index 0000000..585ac49 --- /dev/null +++ b/OpenSim/Data/SQLite/Resources/InventoryStore.migrations @@ -0,0 +1,92 @@ +:VERSION 1 + +BEGIN TRANSACTION; + +CREATE TABLE inventoryfolders( + UUID varchar(255) primary key, + name varchar(255), + agentID varchar(255), + parentID varchar(255), + type integer, + version integer); + +CREATE TABLE inventoryitems( + UUID varchar(255) primary key, + assetID varchar(255), + assetType integer, + invType integer, + parentFolderID varchar(255), + avatarID varchar(255), + creatorsID varchar(255), + inventoryName varchar(255), + inventoryDescription varchar(255), + inventoryNextPermissions integer, + inventoryCurrentPermissions integer, + inventoryBasePermissions integer, + inventoryEveryOnePermissions integer, + salePrice integer default 99, + saleType integer default 0, + creationDate integer default 2000, + groupID varchar(255) default '00000000-0000-0000-0000-000000000000', + groupOwned integer default 0, + flags integer default 0); + +COMMIT; + +:VERSION 2 + +BEGIN TRANSACTION; + +create index inventoryfolders_agentid on inventoryfolders(agentid); +create index inventoryfolders_parentid on inventoryfolders(parentid); +create index inventoryitems_parentfolderid on inventoryitems(parentfolderid); +create index inventoryitems_avatarid on inventoryitems(avatarid); + +COMMIT; + +:VERSION 3 + +BEGIN; + +alter table inventoryitems add column inventoryGroupPermissions integer unsigned not null default 0; + +COMMIT; + +:VERSION 4 + +BEGIN; + +update inventoryitems + set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12) + where UUID not like '%-%'; + +update inventoryitems + set assetID = substr(assetID, 1, 8) || "-" || substr(assetID, 9, 4) || "-" || substr(assetID, 13, 4) || "-" || substr(assetID, 17, 4) || "-" || substr(assetID, 21, 12) + where assetID not like '%-%'; + +update inventoryitems + set parentFolderID = substr(parentFolderID, 1, 8) || "-" || substr(parentFolderID, 9, 4) || "-" || substr(parentFolderID, 13, 4) || "-" || substr(parentFolderID, 17, 4) || "-" || substr(parentFolderID, 21, 12) + where parentFolderID not like '%-%'; + +update inventoryitems + set avatarID = substr(avatarID, 1, 8) || "-" || substr(avatarID, 9, 4) || "-" || substr(avatarID, 13, 4) || "-" || substr(avatarID, 17, 4) || "-" || substr(avatarID, 21, 12) + where avatarID not like '%-%'; + +update inventoryitems + set creatorsID = substr(creatorsID, 1, 8) || "-" || substr(creatorsID, 9, 4) || "-" || substr(creatorsID, 13, 4) || "-" || substr(creatorsID, 17, 4) || "-" || substr(creatorsID, 21, 12) + where creatorsID not like '%-%'; + + +update inventoryfolders + set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12) + where UUID not like '%-%'; + +update inventoryfolders + set agentID = substr(agentID, 1, 8) || "-" || substr(agentID, 9, 4) || "-" || substr(agentID, 13, 4) || "-" || substr(agentID, 17, 4) || "-" || substr(agentID, 21, 12) + where agentID not like '%-%'; + +update inventoryfolders + set parentID = substr(parentID, 1, 8) || "-" || substr(parentID, 9, 4) || "-" || substr(parentID, 13, 4) || "-" || substr(parentID, 17, 4) || "-" || substr(parentID, 21, 12) + where parentID not like '%-%'; + +COMMIT; diff --git a/OpenSim/Data/SQLite/Resources/RegionStore.migrations b/OpenSim/Data/SQLite/Resources/RegionStore.migrations new file mode 100644 index 0000000..7b27378 --- /dev/null +++ b/OpenSim/Data/SQLite/Resources/RegionStore.migrations @@ -0,0 +1,526 @@ +:VERSION 1 + +BEGIN TRANSACTION; + +CREATE TABLE prims( + UUID varchar(255) primary key, + RegionUUID varchar(255), + ParentID integer, + CreationDate integer, + Name varchar(255), + SceneGroupID varchar(255), + Text varchar(255), + Description varchar(255), + SitName varchar(255), + TouchName varchar(255), + CreatorID varchar(255), + OwnerID varchar(255), + GroupID varchar(255), + LastOwnerID varchar(255), + OwnerMask integer, + NextOwnerMask integer, + GroupMask integer, + EveryoneMask integer, + BaseMask integer, + PositionX float, + PositionY float, + PositionZ float, + GroupPositionX float, + GroupPositionY float, + GroupPositionZ float, + VelocityX float, + VelocityY float, + VelocityZ float, + AngularVelocityX float, + AngularVelocityY float, + AngularVelocityZ float, + AccelerationX float, + AccelerationY float, + AccelerationZ float, + RotationX float, + RotationY float, + RotationZ float, + RotationW float, + ObjectFlags integer, + SitTargetOffsetX float NOT NULL default 0, + SitTargetOffsetY float NOT NULL default 0, + SitTargetOffsetZ float NOT NULL default 0, + SitTargetOrientW float NOT NULL default 0, + SitTargetOrientX float NOT NULL default 0, + SitTargetOrientY float NOT NULL default 0, + SitTargetOrientZ float NOT NULL default 0); + +CREATE TABLE primshapes( + UUID varchar(255) primary key, + Shape integer, + ScaleX float, + ScaleY float, + ScaleZ float, + PCode integer, + PathBegin integer, + PathEnd integer, + PathScaleX integer, + PathScaleY integer, + PathShearX integer, + PathShearY integer, + PathSkew integer, + PathCurve integer, + PathRadiusOffset integer, + PathRevolutions integer, + PathTaperX integer, + PathTaperY integer, + PathTwist integer, + PathTwistBegin integer, + ProfileBegin integer, + ProfileEnd integer, + ProfileCurve integer, + ProfileHollow integer, + Texture blob, + ExtraParams blob, + State Integer NOT NULL default 0); + +CREATE TABLE primitems( + itemID varchar(255) primary key, + primID varchar(255), + assetID varchar(255), + parentFolderID varchar(255), + invType integer, + assetType integer, + name varchar(255), + description varchar(255), + creationDate integer, + creatorID varchar(255), + ownerID varchar(255), + lastOwnerID varchar(255), + groupID varchar(255), + nextPermissions string, + currentPermissions string, + basePermissions string, + everyonePermissions string, + groupPermissions string); + +CREATE TABLE terrain( + RegionUUID varchar(255), + Revision integer, + Heightfield blob); + +CREATE TABLE land( + UUID varchar(255) primary key, + RegionUUID varchar(255), + LocalLandID string, + Bitmap blob, + Name varchar(255), + Desc varchar(255), + OwnerUUID varchar(255), + IsGroupOwned string, + Area integer, + AuctionID integer, + Category integer, + ClaimDate integer, + ClaimPrice integer, + GroupUUID varchar(255), + SalePrice integer, + LandStatus integer, + LandFlags string, + LandingType string, + MediaAutoScale string, + MediaTextureUUID varchar(255), + MediaURL varchar(255), + MusicURL varchar(255), + PassHours float, + PassPrice string, + SnapshotUUID varchar(255), + UserLocationX float, + UserLocationY float, + UserLocationZ float, + UserLookAtX float, + UserLookAtY float, + UserLookAtZ float, + AuthbuyerID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000'); + +CREATE TABLE landaccesslist( + LandUUID varchar(255), + AccessUUID varchar(255), + Flags string); + +COMMIT; + +:VERSION 2 + +BEGIN TRANSACTION; + +CREATE TABLE regionban( + regionUUID varchar (255), + bannedUUID varchar (255), + bannedIp varchar (255), + bannedIpHostMask varchar (255) + ); + +COMMIT; + +:VERSION 3 + +BEGIN; + +ALTER TABLE primitems add flags integer not null default 0; + +COMMIT; + +:VERSION 4 + +BEGIN; + +create table regionsettings ( + regionUUID char(36) not null, + block_terraform integer not null, + block_fly integer not null, + allow_damage integer not null, + restrict_pushing integer not null, + allow_land_resell integer not null, + allow_land_join_divide integer not null, + block_show_in_search integer not null, + agent_limit integer not null, + object_bonus float not null, + maturity integer not null, + disable_scripts integer not null, + disable_collisions integer not null, + disable_physics integer not null, + terrain_texture_1 char(36) not null, + terrain_texture_2 char(36) not null, + terrain_texture_3 char(36) not null, + terrain_texture_4 char(36) not null, + elevation_1_nw float not null, + elevation_2_nw float not null, + elevation_1_ne float not null, + elevation_2_ne float not null, + elevation_1_se float not null, + elevation_2_se float not null, + elevation_1_sw float not null, + elevation_2_sw float not null, + water_height float not null, + terrain_raise_limit float not null, + terrain_lower_limit float not null, + use_estate_sun integer not null, + fixed_sun integer not null, + sun_position float not null, + covenant char(36)); + +COMMIT; + +:VERSION 5 + +BEGIN; + +delete from regionsettings; + +COMMIT; + +:VERSION 6 + +BEGIN TRANSACTION; + +CREATE TABLE estate_groups ( + EstateID int(10) NOT NULL, + uuid char(36) NOT NULL +); + +CREATE TABLE estate_managers ( + EstateID int(10) NOT NULL, + uuid char(36) NOT NULL +); + +CREATE TABLE estate_map ( + RegionID char(36) NOT NULL default '00000000-0000-0000-0000-000000000000', + EstateID int(11) NOT NULL +); + +CREATE TABLE estate_settings ( + EstateID INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, + EstateName varchar(64) default NULL, + AbuseEmailToEstateOwner tinyint(4) NOT NULL, + DenyAnonymous tinyint(4) NOT NULL, + ResetHomeOnTeleport tinyint(4) NOT NULL, + FixedSun tinyint(4) NOT NULL, + DenyTransacted tinyint(4) NOT NULL, + BlockDwell tinyint(4) NOT NULL, + DenyIdentified tinyint(4) NOT NULL, + AllowVoice tinyint(4) NOT NULL, + UseGlobalTime tinyint(4) NOT NULL, + PricePerMeter int(11) NOT NULL, + TaxFree tinyint(4) NOT NULL, + AllowDirectTeleport tinyint(4) NOT NULL, + RedirectGridX int(11) NOT NULL, + RedirectGridY int(11) NOT NULL, + ParentEstateID int(10) NOT NULL, + SunPosition double NOT NULL, + EstateSkipScripts tinyint(4) NOT NULL, + BillableFactor float NOT NULL, + PublicAccess tinyint(4) NOT NULL +); +insert into estate_settings (EstateID,EstateName,AbuseEmailToEstateOwner,DenyAnonymous,ResetHomeOnTeleport,FixedSun,DenyTransacted,BlockDwell,DenyIdentified,AllowVoice,UseGlobalTime,PricePerMeter,TaxFree,AllowDirectTeleport,RedirectGridX,RedirectGridY,ParentEstateID,SunPosition,PublicAccess,EstateSkipScripts,BillableFactor) values ( 99, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''); +delete from estate_settings; +CREATE TABLE estate_users ( + EstateID int(10) NOT NULL, + uuid char(36) NOT NULL +); + +CREATE TABLE estateban ( + EstateID int(10) NOT NULL, + bannedUUID varchar(36) NOT NULL, + bannedIp varchar(16) NOT NULL, + bannedIpHostMask varchar(16) NOT NULL, + bannedNameMask varchar(64) default NULL +); + +drop table regionsettings; +CREATE TABLE regionsettings ( + regionUUID char(36) NOT NULL, + block_terraform int(11) NOT NULL, + block_fly int(11) NOT NULL, + allow_damage int(11) NOT NULL, + restrict_pushing int(11) NOT NULL, + allow_land_resell int(11) NOT NULL, + allow_land_join_divide int(11) NOT NULL, + block_show_in_search int(11) NOT NULL, + agent_limit int(11) NOT NULL, + object_bonus float NOT NULL, + maturity int(11) NOT NULL, + disable_scripts int(11) NOT NULL, + disable_collisions int(11) NOT NULL, + disable_physics int(11) NOT NULL, + terrain_texture_1 char(36) NOT NULL, + terrain_texture_2 char(36) NOT NULL, + terrain_texture_3 char(36) NOT NULL, + terrain_texture_4 char(36) NOT NULL, + elevation_1_nw float NOT NULL, + elevation_2_nw float NOT NULL, + elevation_1_ne float NOT NULL, + elevation_2_ne float NOT NULL, + elevation_1_se float NOT NULL, + elevation_2_se float NOT NULL, + elevation_1_sw float NOT NULL, + elevation_2_sw float NOT NULL, + water_height float NOT NULL, + terrain_raise_limit float NOT NULL, + terrain_lower_limit float NOT NULL, + use_estate_sun int(11) NOT NULL, + fixed_sun int(11) NOT NULL, + sun_position float NOT NULL, + covenant char(36) default NULL, + Sandbox tinyint(4) NOT NULL, + PRIMARY KEY (regionUUID) +); + +CREATE INDEX estate_ban_estate_id on estateban(EstateID); +CREATE INDEX estate_groups_estate_id on estate_groups(EstateID); +CREATE INDEX estate_managers_estate_id on estate_managers(EstateID); +CREATE INDEX estate_map_estate_id on estate_map(EstateID); +CREATE UNIQUE INDEX estate_map_region_id on estate_map(RegionID); +CREATE INDEX estate_users_estate_id on estate_users(EstateID); + +COMMIT; + +:VERSION 7 + +begin; + +alter table estate_settings add column AbuseEmail varchar(255) not null default ''; + +alter table estate_settings add column EstateOwner varchar(36) not null default ''; + +commit; + +:VERSION 8 + +begin; + +alter table estate_settings add column DenyMinors tinyint not null default 0; + +commit; + +:VERSION 9 + +BEGIN; + +ALTER TABLE prims ADD COLUMN ColorR integer not null default 0; +ALTER TABLE prims ADD COLUMN ColorG integer not null default 0; +ALTER TABLE prims ADD COLUMN ColorB integer not null default 0; +ALTER TABLE prims ADD COLUMN ColorA integer not null default 0; + +COMMIT; + +:VERSION 10 + +BEGIN; + +ALTER TABLE prims ADD COLUMN ClickAction INTEGER NOT NULL default 0; + +COMMIT; + +:VERSION 11 + +BEGIN; + +ALTER TABLE prims ADD COLUMN PayPrice INTEGER NOT NULL default 0; +ALTER TABLE prims ADD COLUMN PayButton1 INTEGER NOT NULL default 0; +ALTER TABLE prims ADD COLUMN PayButton2 INTEGER NOT NULL default 0; +ALTER TABLE prims ADD COLUMN PayButton3 INTEGER NOT NULL default 0; +ALTER TABLE prims ADD COLUMN PayButton4 INTEGER NOT NULL default 0; +ALTER TABLE prims ADD COLUMN LoopedSound varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000'; +ALTER TABLE prims ADD COLUMN LoopedSoundGain float NOT NULL default 0; +ALTER TABLE prims ADD COLUMN TextureAnimation string; +ALTER TABLE prims ADD COLUMN ParticleSystem string; +ALTER TABLE prims ADD COLUMN OmegaX float NOT NULL default 0; +ALTER TABLE prims ADD COLUMN OmegaY float NOT NULL default 0; +ALTER TABLE prims ADD COLUMN OmegaZ float NOT NULL default 0; +ALTER TABLE prims ADD COLUMN CameraEyeOffsetX float NOT NULL default 0; +ALTER TABLE prims ADD COLUMN CameraEyeOffsetY float NOT NULL default 0; +ALTER TABLE prims ADD COLUMN CameraEyeOffsetZ float NOT NULL default 0; +ALTER TABLE prims ADD COLUMN CameraAtOffsetX float NOT NULL default 0; +ALTER TABLE prims ADD COLUMN CameraAtOffsetY float NOT NULL default 0; +ALTER TABLE prims ADD COLUMN CameraAtOffsetZ float NOT NULL default 0; +ALTER TABLE prims ADD COLUMN ForceMouselook string NOT NULL default 0; +ALTER TABLE prims ADD COLUMN ScriptAccessPin INTEGER NOT NULL default 0; +ALTER TABLE prims ADD COLUMN AllowedDrop INTEGER NOT NULL default 0; +ALTER TABLE prims ADD COLUMN DieAtEdge string NOT NULL default 0; +ALTER TABLE prims ADD COLUMN SalePrice INTEGER NOT NULL default 0; +ALTER TABLE prims ADD COLUMN SaleType string NOT NULL default 0; + +COMMIT; + +:VERSION 12 + +BEGIN; + +ALTER TABLE prims ADD COLUMN Material INTEGER NOT NULL default 3; + +COMMIT; + +:VERSION 13 + +BEGIN; + +ALTER TABLE land ADD COLUMN OtherCleanTime INTEGER NOT NULL default 0; +ALTER TABLE land ADD COLUMN Dwell INTEGER NOT NULL default 0; + +COMMIT; + +:VERSION 14 + +begin; + +ALTER TABLE regionsettings ADD COLUMN sunvectorx double NOT NULL default 0; +ALTER TABLE regionsettings ADD COLUMN sunvectory double NOT NULL default 0; +ALTER TABLE regionsettings ADD COLUMN sunvectorz double NOT NULL default 0; + +commit; + +:VERSION 15 + +BEGIN; + +ALTER TABLE prims ADD COLUMN CollisionSound varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000'; +ALTER TABLE prims ADD COLUMN CollisionSoundVolume float NOT NULL default 0; + +COMMIT; + +:VERSION 16 + +BEGIN; + +ALTER TABLE prims ADD COLUMN VolumeDetect INTEGER NOT NULL DEFAULT 0; + +COMMIT; + +:VERSION 17 + +BEGIN; +CREATE TEMPORARY TABLE prims_backup(UUID,RegionUUID,CreationDate,Name,SceneGroupID,Text,Description,SitName,TouchName,CreatorID,OwnerID,GroupID,LastOwnerID,OwnerMask,NextOwnerMask,GroupMask,EveryoneMask,BaseMask,PositionX,PositionY,PositionZ,GroupPositionX,GroupPositionY,GroupPositionZ,VelocityX,VelocityY,VelocityZ,AngularVelocityX,AngularVelocityY,AngularVelocityZ,AccelerationX,AccelerationY,AccelerationZ,RotationX,RotationY,RotationZ,RotationW,ObjectFlags,SitTargetOffsetX,SitTargetOffsetY,SitTargetOffsetZ,SitTargetOrientW,SitTargetOrientX,SitTargetOrientY,SitTargetOrientZ,ColorR,ColorG,ColorB,ColorA,ClickAction,PayPrice,PayButton1,PayButton2,PayButton3,PayButton4,LoopedSound,LoopedSoundGain,TextureAnimation,ParticleSystem,OmegaX,OmegaY,OmegaZ,CameraEyeOffsetX,CameraEyeOffsetY,CameraEyeOffsetZ,CameraAtOffsetX,CameraAtOffsetY,CameraAtOffsetZ,ForceMouselook,ScriptAccessPin,AllowedDrop,DieAtEdge,SalePrice,SaleType,Material,CollisionSound,CollisionSoundVolume,VolumeDetect); +INSERT INTO prims_backup SELECT UUID,RegionUUID,CreationDate,Name,SceneGroupID,Text,Description,SitName,TouchName,CreatorID,OwnerID,GroupID,LastOwnerID,OwnerMask,NextOwnerMask,GroupMask,EveryoneMask,BaseMask,PositionX,PositionY,PositionZ,GroupPositionX,GroupPositionY,GroupPositionZ,VelocityX,VelocityY,VelocityZ,AngularVelocityX,AngularVelocityY,AngularVelocityZ,AccelerationX,AccelerationY,AccelerationZ,RotationX,RotationY,RotationZ,RotationW,ObjectFlags,SitTargetOffsetX,SitTargetOffsetY,SitTargetOffsetZ,SitTargetOrientW,SitTargetOrientX,SitTargetOrientY,SitTargetOrientZ,ColorR,ColorG,ColorB,ColorA,ClickAction,PayPrice,PayButton1,PayButton2,PayButton3,PayButton4,LoopedSound,LoopedSoundGain,TextureAnimation,ParticleSystem,OmegaX,OmegaY,OmegaZ,CameraEyeOffsetX,CameraEyeOffsetY,CameraEyeOffsetZ,CameraAtOffsetX,CameraAtOffsetY,CameraAtOffsetZ,ForceMouselook,ScriptAccessPin,AllowedDrop,DieAtEdge,SalePrice,SaleType,Material,CollisionSound,CollisionSoundVolume,VolumeDetect FROM prims; +DROP TABLE prims; +CREATE TABLE prims(UUID,RegionUUID,CreationDate,Name,SceneGroupID,Text,Description,SitName,TouchName,CreatorID,OwnerID,GroupID,LastOwnerID,OwnerMask,NextOwnerMask,GroupMask,EveryoneMask,BaseMask,PositionX,PositionY,PositionZ,GroupPositionX,GroupPositionY,GroupPositionZ,VelocityX,VelocityY,VelocityZ,AngularVelocityX,AngularVelocityY,AngularVelocityZ,AccelerationX,AccelerationY,AccelerationZ,RotationX,RotationY,RotationZ,RotationW,ObjectFlags,SitTargetOffsetX,SitTargetOffsetY,SitTargetOffsetZ,SitTargetOrientW,SitTargetOrientX,SitTargetOrientY,SitTargetOrientZ,ColorR,ColorG,ColorB,ColorA,ClickAction,PayPrice,PayButton1,PayButton2,PayButton3,PayButton4,LoopedSound,LoopedSoundGain,TextureAnimation,ParticleSystem,OmegaX,OmegaY,OmegaZ,CameraEyeOffsetX,CameraEyeOffsetY,CameraEyeOffsetZ,CameraAtOffsetX,CameraAtOffsetY,CameraAtOffsetZ,ForceMouselook,ScriptAccessPin,AllowedDrop,DieAtEdge,SalePrice,SaleType,Material,CollisionSound,CollisionSoundVolume,VolumeDetect); +INSERT INTO prims SELECT UUID,RegionUUID,CreationDate,Name,SceneGroupID,Text,Description,SitName,TouchName,CreatorID,OwnerID,GroupID,LastOwnerID,OwnerMask,NextOwnerMask,GroupMask,EveryoneMask,BaseMask,PositionX,PositionY,PositionZ,GroupPositionX,GroupPositionY,GroupPositionZ,VelocityX,VelocityY,VelocityZ,AngularVelocityX,AngularVelocityY,AngularVelocityZ,AccelerationX,AccelerationY,AccelerationZ,RotationX,RotationY,RotationZ,RotationW,ObjectFlags,SitTargetOffsetX,SitTargetOffsetY,SitTargetOffsetZ,SitTargetOrientW,SitTargetOrientX,SitTargetOrientY,SitTargetOrientZ,ColorR,ColorG,ColorB,ColorA,ClickAction,PayPrice,PayButton1,PayButton2,PayButton3,PayButton4,LoopedSound,LoopedSoundGain,TextureAnimation,ParticleSystem,OmegaX,OmegaY,OmegaZ,CameraEyeOffsetX,CameraEyeOffsetY,CameraEyeOffsetZ,CameraAtOffsetX,CameraAtOffsetY,CameraAtOffsetZ,ForceMouselook,ScriptAccessPin,AllowedDrop,DieAtEdge,SalePrice,SaleType,Material,CollisionSound,CollisionSoundVolume,VolumeDetect FROM prims_backup; +DROP TABLE prims_backup; +COMMIT; + +:VERSION 18 + +BEGIN; + +update terrain + set RegionUUID = substr(RegionUUID, 1, 8) || "-" || substr(RegionUUID, 9, 4) || "-" || substr(RegionUUID, 13, 4) || "-" || substr(RegionUUID, 17, 4) || "-" || substr(RegionUUID, 21, 12) + where RegionUUID not like '%-%'; + + +update landaccesslist + set LandUUID = substr(LandUUID, 1, 8) || "-" || substr(LandUUID, 9, 4) || "-" || substr(LandUUID, 13, 4) || "-" || substr(LandUUID, 17, 4) || "-" || substr(LandUUID, 21, 12) + where LandUUID not like '%-%'; + +update landaccesslist + set AccessUUID = substr(AccessUUID, 1, 8) || "-" || substr(AccessUUID, 9, 4) || "-" || substr(AccessUUID, 13, 4) || "-" || substr(AccessUUID, 17, 4) || "-" || substr(AccessUUID, 21, 12) + where AccessUUID not like '%-%'; + + +update prims + set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12) + where UUID not like '%-%'; + +update prims + set RegionUUID = substr(RegionUUID, 1, 8) || "-" || substr(RegionUUID, 9, 4) || "-" || substr(RegionUUID, 13, 4) || "-" || substr(RegionUUID, 17, 4) || "-" || substr(RegionUUID, 21, 12) + where RegionUUID not like '%-%'; + +update prims + set SceneGroupID = substr(SceneGroupID, 1, 8) || "-" || substr(SceneGroupID, 9, 4) || "-" || substr(SceneGroupID, 13, 4) || "-" || substr(SceneGroupID, 17, 4) || "-" || substr(SceneGroupID, 21, 12) + where SceneGroupID not like '%-%'; + +update prims + set CreatorID = substr(CreatorID, 1, 8) || "-" || substr(CreatorID, 9, 4) || "-" || substr(CreatorID, 13, 4) || "-" || substr(CreatorID, 17, 4) || "-" || substr(CreatorID, 21, 12) + where CreatorID not like '%-%'; + +update prims + set OwnerID = substr(OwnerID, 1, 8) || "-" || substr(OwnerID, 9, 4) || "-" || substr(OwnerID, 13, 4) || "-" || substr(OwnerID, 17, 4) || "-" || substr(OwnerID, 21, 12) + where OwnerID not like '%-%'; + +update prims + set GroupID = substr(GroupID, 1, 8) || "-" || substr(GroupID, 9, 4) || "-" || substr(GroupID, 13, 4) || "-" || substr(GroupID, 17, 4) || "-" || substr(GroupID, 21, 12) + where GroupID not like '%-%'; + +update prims + set LastOwnerID = substr(LastOwnerID, 1, 8) || "-" || substr(LastOwnerID, 9, 4) || "-" || substr(LastOwnerID, 13, 4) || "-" || substr(LastOwnerID, 17, 4) || "-" || substr(LastOwnerID, 21, 12) + where LastOwnerID not like '%-%'; + + +update primshapes + set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12) + where UUID not like '%-%'; + + +update land + set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12) + where UUID not like '%-%'; + +update land + set RegionUUID = substr(RegionUUID, 1, 8) || "-" || substr(RegionUUID, 9, 4) || "-" || substr(RegionUUID, 13, 4) || "-" || substr(RegionUUID, 17, 4) || "-" || substr(RegionUUID, 21, 12) + where RegionUUID not like '%-%'; + +update land + set OwnerUUID = substr(OwnerUUID, 1, 8) || "-" || substr(OwnerUUID, 9, 4) || "-" || substr(OwnerUUID, 13, 4) || "-" || substr(OwnerUUID, 17, 4) || "-" || substr(OwnerUUID, 21, 12) + where OwnerUUID not like '%-%'; + +update land + set GroupUUID = substr(GroupUUID, 1, 8) || "-" || substr(GroupUUID, 9, 4) || "-" || substr(GroupUUID, 13, 4) || "-" || substr(GroupUUID, 17, 4) || "-" || substr(GroupUUID, 21, 12) + where GroupUUID not like '%-%'; + +update land + set MediaTextureUUID = substr(MediaTextureUUID, 1, 8) || "-" || substr(MediaTextureUUID, 9, 4) || "-" || substr(MediaTextureUUID, 13, 4) || "-" || substr(MediaTextureUUID, 17, 4) || "-" || substr(MediaTextureUUID, 21, 12) + where MediaTextureUUID not like '%-%'; + +update land + set SnapshotUUID = substr(SnapshotUUID, 1, 8) || "-" || substr(SnapshotUUID, 9, 4) || "-" || substr(SnapshotUUID, 13, 4) || "-" || substr(SnapshotUUID, 17, 4) || "-" || substr(SnapshotUUID, 21, 12) + where SnapshotUUID not like '%-%'; + +update land + set AuthbuyerID = substr(AuthbuyerID, 1, 8) || "-" || substr(AuthbuyerID, 9, 4) || "-" || substr(AuthbuyerID, 13, 4) || "-" || substr(AuthbuyerID, 17, 4) || "-" || substr(AuthbuyerID, 21, 12) + where AuthbuyerID not like '%-%'; + +COMMIT; diff --git a/OpenSim/Data/SQLite/Resources/UserAccount.migrations b/OpenSim/Data/SQLite/Resources/UserAccount.migrations new file mode 100644 index 0000000..854fe69 --- /dev/null +++ b/OpenSim/Data/SQLite/Resources/UserAccount.migrations @@ -0,0 +1,27 @@ +:VERSION 1 + +BEGIN TRANSACTION; + +-- useraccounts table +CREATE TABLE UserAccounts ( + PrincipalID CHAR(36) primary key, + ScopeID CHAR(36) NOT NULL, + FirstName VARCHAR(64) NOT NULL, + LastName VARCHAR(64) NOT NULL, + Email VARCHAR(64), + ServiceURLs TEXT, + Created INT(11), + UserLevel integer NOT NULL DEFAULT 0, + UserFlags integer NOT NULL DEFAULT 0, + UserTitle varchar(64) NOT NULL DEFAULT '' +); + +COMMIT; + +:VERSION 2 + +BEGIN TRANSACTION; + +INSERT INTO UserAccounts (PrincipalID, ScopeID, FirstName, LastName, Email, ServiceURLs, Created) SELECT `UUID` AS PrincipalID, '00000000-0000-0000-0000-000000000000' AS ScopeID, username AS FirstName, surname AS LastName, '' as Email, '' AS ServiceURLs, created as Created FROM users; + +COMMIT; diff --git a/OpenSim/Data/SQLite/Resources/UserStore.migrations b/OpenSim/Data/SQLite/Resources/UserStore.migrations new file mode 100644 index 0000000..73d35e8 --- /dev/null +++ b/OpenSim/Data/SQLite/Resources/UserStore.migrations @@ -0,0 +1,169 @@ +:VERSION 1 + +BEGIN TRANSACTION; + +-- users table +CREATE TABLE users( + UUID varchar(255) primary key, + username varchar(255), + surname varchar(255), + passwordHash varchar(255), + passwordSalt varchar(255), + homeRegionX integer, + homeRegionY integer, + homeLocationX float, + homeLocationY float, + homeLocationZ float, + homeLookAtX float, + homeLookAtY float, + homeLookAtZ float, + created integer, + lastLogin integer, + rootInventoryFolderID varchar(255), + userInventoryURI varchar(255), + userAssetURI varchar(255), + profileCanDoMask integer, + profileWantDoMask integer, + profileAboutText varchar(255), + profileFirstText varchar(255), + profileImage varchar(255), + profileFirstImage varchar(255), + webLoginKey text default '00000000-0000-0000-0000-000000000000'); +-- friends table +CREATE TABLE userfriends( + ownerID varchar(255), + friendID varchar(255), + friendPerms integer, + ownerPerms integer, + datetimestamp integer); + +COMMIT; + +:VERSION 2 + +BEGIN; + +ALTER TABLE users add homeRegionID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000'; + +COMMIT; + +:VERSION 3 + +BEGIN; + +ALTER TABLE users add userFlags integer NOT NULL default 0; +ALTER TABLE users add godLevel integer NOT NULL default 0; + +COMMIT; + +:VERSION 4 + +BEGIN; + +ALTER TABLE users add customType varchar(32) not null default ''; +ALTER TABLE users add partner char(36) not null default '00000000-0000-0000-0000-000000000000'; + +COMMIT; + +:VERSION 5 + +BEGIN; + +CREATE TABLE `avatarattachments` (`UUID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', `attachpoint` int(11) NOT NULL DEFAULT 0, `item` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', `asset` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000'); + +COMMIT; + +:VERSION 6 + +BEGIN TRANSACTION; + +-- usersagents table +CREATE TABLE IF NOT EXISTS useragents( + UUID varchar(255) primary key, + agentIP varchar(255), + agentPort integer, + agentOnline boolean, + sessionID varchar(255), + secureSessionID varchar(255), + regionID varchar(255), + loginTime integer, + logoutTime integer, + currentRegion varchar(255), + currentHandle varchar(255), + currentPosX float, + currentPosY float, + currentPosZ float); + +COMMIT; + +:VERSION 7 + +BEGIN TRANSACTION; + +ALTER TABLE useragents add currentLookAtX float not null default 128; +ALTER TABLE useragents add currentLookAtY float not null default 128; +ALTER TABLE useragents add currentLookAtZ float not null default 70; + +COMMIT; + +:VERSION 8 + +BEGIN TRANSACTION; + +ALTER TABLE users add email varchar(250); + +COMMIT; + +:VERSION 9 + +BEGIN; + +update users + set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12) + where UUID not like '%-%'; + +update useragents + set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12) + where UUID not like '%-%'; + +COMMIT; + +:VERSION 10 + +BEGIN TRANSACTION; + +CREATE TABLE IF NOT EXISTS avatarappearance( + Owner varchar(36) NOT NULL primary key, + BodyItem varchar(36) DEFAULT NULL, + BodyAsset varchar(36) DEFAULT NULL, + SkinItem varchar(36) DEFAULT NULL, + SkinAsset varchar(36) DEFAULT NULL, + HairItem varchar(36) DEFAULT NULL, + HairAsset varchar(36) DEFAULT NULL, + EyesItem varchar(36) DEFAULT NULL, + EyesAsset varchar(36) DEFAULT NULL, + ShirtItem varchar(36) DEFAULT NULL, + ShirtAsset varchar(36) DEFAULT NULL, + PantsItem varchar(36) DEFAULT NULL, + PantsAsset varchar(36) DEFAULT NULL, + ShoesItem varchar(36) DEFAULT NULL, + ShoesAsset varchar(36) DEFAULT NULL, + SocksItem varchar(36) DEFAULT NULL, + SocksAsset varchar(36) DEFAULT NULL, + JacketItem varchar(36) DEFAULT NULL, + JacketAsset varchar(36) DEFAULT NULL, + GlovesItem varchar(36) DEFAULT NULL, + GlovesAsset varchar(36) DEFAULT NULL, + UnderShirtItem varchar(36) DEFAULT NULL, + UnderShirtAsset varchar(36) DEFAULT NULL, + UnderPantsItem varchar(36) DEFAULT NULL, + UnderPantsAsset varchar(36) DEFAULT NULL, + SkirtItem varchar(36) DEFAULT NULL, + SkirtAsset varchar(36) DEFAULT NULL, + Texture blob, + VisualParams blob, + Serial int DEFAULT NULL, + AvatarHeight float DEFAULT NULL +); + +COMMIT; -- cgit v1.1 From 020f38774fbe8e0f53b0cb28ab49b378b9dcd325 Mon Sep 17 00:00:00 2001 From: AlexRa Date: Thu, 6 May 2010 23:16:36 +0300 Subject: MS SQL migrations converted to the new format --- OpenSim/Data/MSSQL/Resources/001_AssetStore.sql | 13 - OpenSim/Data/MSSQL/Resources/001_AuthStore.sql | 17 - OpenSim/Data/MSSQL/Resources/001_Avatar.sql | 15 - OpenSim/Data/MSSQL/Resources/001_EstateStore.sql | 85 -- OpenSim/Data/MSSQL/Resources/001_FriendsStore.sql | 11 - OpenSim/Data/MSSQL/Resources/001_GridStore.sql | 37 - .../Data/MSSQL/Resources/001_InventoryStore.sql | 64 -- OpenSim/Data/MSSQL/Resources/001_LogStore.sql | 17 - OpenSim/Data/MSSQL/Resources/001_Presence.sql | 19 - OpenSim/Data/MSSQL/Resources/001_RegionStore.sql | 161 ---- OpenSim/Data/MSSQL/Resources/001_UserAccount.sql | 14 - OpenSim/Data/MSSQL/Resources/001_UserStore.sql | 112 --- OpenSim/Data/MSSQL/Resources/002_AssetStore.sql | 29 - OpenSim/Data/MSSQL/Resources/002_AuthStore.sql | 6 - OpenSim/Data/MSSQL/Resources/002_EstateStore.sql | 25 - OpenSim/Data/MSSQL/Resources/002_FriendsStore.sql | 6 - OpenSim/Data/MSSQL/Resources/002_GridStore.sql | 49 -- .../Data/MSSQL/Resources/002_InventoryStore.sql | 5 - OpenSim/Data/MSSQL/Resources/002_RegionStore.sql | 50 -- OpenSim/Data/MSSQL/Resources/002_UserAccount.sql | 12 - OpenSim/Data/MSSQL/Resources/002_UserStore.sql | 9 - OpenSim/Data/MSSQL/Resources/003_AssetStore.sql | 6 - OpenSim/Data/MSSQL/Resources/003_EstateStore.sql | 25 - OpenSim/Data/MSSQL/Resources/003_GridStore.sql | 22 - .../Data/MSSQL/Resources/003_InventoryStore.sql | 38 - OpenSim/Data/MSSQL/Resources/003_RegionStore.sql | 67 -- OpenSim/Data/MSSQL/Resources/003_UserAccount.sql | 9 - OpenSim/Data/MSSQL/Resources/003_UserStore.sql | 15 - OpenSim/Data/MSSQL/Resources/004_AssetStore.sql | 31 - OpenSim/Data/MSSQL/Resources/004_EstateStore.sql | 22 - OpenSim/Data/MSSQL/Resources/004_GridStore.sql | 68 -- .../Data/MSSQL/Resources/004_InventoryStore.sql | 52 -- OpenSim/Data/MSSQL/Resources/004_RegionStore.sql | 40 - OpenSim/Data/MSSQL/Resources/004_UserAccount.sql | 7 - OpenSim/Data/MSSQL/Resources/004_UserStore.sql | 29 - OpenSim/Data/MSSQL/Resources/005_AssetStore.sql | 1 - OpenSim/Data/MSSQL/Resources/005_EstateStore.sql | 22 - OpenSim/Data/MSSQL/Resources/005_GridStore.sql | 5 - OpenSim/Data/MSSQL/Resources/005_RegionStore.sql | 49 -- OpenSim/Data/MSSQL/Resources/005_UserStore.sql | 5 - OpenSim/Data/MSSQL/Resources/006_EstateStore.sql | 22 - OpenSim/Data/MSSQL/Resources/006_GridStore.sql | 8 - OpenSim/Data/MSSQL/Resources/006_RegionStore.sql | 36 - OpenSim/Data/MSSQL/Resources/006_UserStore.sql | 57 -- OpenSim/Data/MSSQL/Resources/007_EstateStore.sql | 25 - OpenSim/Data/MSSQL/Resources/007_GridStore.sql | 9 - OpenSim/Data/MSSQL/Resources/007_RegionStore.sql | 10 - OpenSim/Data/MSSQL/Resources/007_UserStore.sql | 42 - OpenSim/Data/MSSQL/Resources/008_EstateStore.sql | 49 -- OpenSim/Data/MSSQL/Resources/008_RegionStore.sql | 7 - OpenSim/Data/MSSQL/Resources/008_UserStore.sql | 29 - OpenSim/Data/MSSQL/Resources/009_EstateStore.sql | 24 - OpenSim/Data/MSSQL/Resources/009_RegionStore.sql | 5 - OpenSim/Data/MSSQL/Resources/009_UserStore.sql | 53 -- OpenSim/Data/MSSQL/Resources/010_RegionStore.sql | 7 - OpenSim/Data/MSSQL/Resources/010_UserStore.sql | 24 - OpenSim/Data/MSSQL/Resources/011_RegionStore.sql | 6 - OpenSim/Data/MSSQL/Resources/011_UserStore.sql | 5 - OpenSim/Data/MSSQL/Resources/012_RegionStore.sql | 5 - OpenSim/Data/MSSQL/Resources/013_RegionStore.sql | 112 --- OpenSim/Data/MSSQL/Resources/014_RegionStore.sql | 49 -- OpenSim/Data/MSSQL/Resources/015_RegionStore.sql | 45 - OpenSim/Data/MSSQL/Resources/016_RegionStore.sql | 19 - OpenSim/Data/MSSQL/Resources/017_RegionStore.sql | 56 -- OpenSim/Data/MSSQL/Resources/018_RegionStore.sql | 18 - OpenSim/Data/MSSQL/Resources/019_RegionStore.sql | 19 - OpenSim/Data/MSSQL/Resources/020_RegionStore.sql | 58 -- OpenSim/Data/MSSQL/Resources/021_RegionStore.sql | 5 - OpenSim/Data/MSSQL/Resources/022_RegionStore.sql | 7 - OpenSim/Data/MSSQL/Resources/023_RegionStore.sql | 7 - OpenSim/Data/MSSQL/Resources/AssetStore.migrations | 100 +++ OpenSim/Data/MSSQL/Resources/AuthStore.migrations | 28 + OpenSim/Data/MSSQL/Resources/Avatar.migrations | 17 + .../Data/MSSQL/Resources/EstateStore.migrations | 334 ++++++++ .../Data/MSSQL/Resources/FriendsStore.migrations | 20 + OpenSim/Data/MSSQL/Resources/GridStore.migrations | 225 +++++ .../Data/MSSQL/Resources/InventoryStore.migrations | 174 ++++ OpenSim/Data/MSSQL/Resources/LogStore.migrations | 19 + OpenSim/Data/MSSQL/Resources/Presence.migrations | 30 + .../Data/MSSQL/Resources/RegionStore.migrations | 929 +++++++++++++++++++++ .../Data/MSSQL/Resources/UserAccount.migrations | 55 ++ OpenSim/Data/MSSQL/Resources/UserStore.migrations | 421 ++++++++++ 82 files changed, 2352 insertions(+), 2087 deletions(-) delete mode 100644 OpenSim/Data/MSSQL/Resources/001_AssetStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/001_AuthStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/001_Avatar.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/001_EstateStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/001_FriendsStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/001_GridStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/001_InventoryStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/001_LogStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/001_Presence.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/001_RegionStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/001_UserAccount.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/001_UserStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/002_AssetStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/002_AuthStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/002_EstateStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/002_FriendsStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/002_GridStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/002_InventoryStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/002_RegionStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/002_UserAccount.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/002_UserStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/003_AssetStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/003_EstateStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/003_GridStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/003_InventoryStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/003_RegionStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/003_UserAccount.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/003_UserStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/004_AssetStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/004_EstateStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/004_GridStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/004_InventoryStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/004_RegionStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/004_UserAccount.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/004_UserStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/005_AssetStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/005_EstateStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/005_GridStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/005_RegionStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/005_UserStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/006_EstateStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/006_GridStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/006_RegionStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/006_UserStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/007_EstateStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/007_GridStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/007_RegionStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/007_UserStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/008_EstateStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/008_RegionStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/008_UserStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/009_EstateStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/009_RegionStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/009_UserStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/010_RegionStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/010_UserStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/011_RegionStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/011_UserStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/012_RegionStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/013_RegionStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/014_RegionStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/015_RegionStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/016_RegionStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/017_RegionStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/018_RegionStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/019_RegionStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/020_RegionStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/021_RegionStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/022_RegionStore.sql delete mode 100644 OpenSim/Data/MSSQL/Resources/023_RegionStore.sql create mode 100644 OpenSim/Data/MSSQL/Resources/AssetStore.migrations create mode 100644 OpenSim/Data/MSSQL/Resources/AuthStore.migrations create mode 100644 OpenSim/Data/MSSQL/Resources/Avatar.migrations create mode 100644 OpenSim/Data/MSSQL/Resources/EstateStore.migrations create mode 100644 OpenSim/Data/MSSQL/Resources/FriendsStore.migrations create mode 100644 OpenSim/Data/MSSQL/Resources/GridStore.migrations create mode 100644 OpenSim/Data/MSSQL/Resources/InventoryStore.migrations create mode 100644 OpenSim/Data/MSSQL/Resources/LogStore.migrations create mode 100644 OpenSim/Data/MSSQL/Resources/Presence.migrations create mode 100644 OpenSim/Data/MSSQL/Resources/RegionStore.migrations create mode 100644 OpenSim/Data/MSSQL/Resources/UserAccount.migrations create mode 100644 OpenSim/Data/MSSQL/Resources/UserStore.migrations diff --git a/OpenSim/Data/MSSQL/Resources/001_AssetStore.sql b/OpenSim/Data/MSSQL/Resources/001_AssetStore.sql deleted file mode 100644 index 2b293c7..0000000 --- a/OpenSim/Data/MSSQL/Resources/001_AssetStore.sql +++ /dev/null @@ -1,13 +0,0 @@ -CREATE TABLE [assets] ( - [id] [varchar](36) NOT NULL, - [name] [varchar](64) NOT NULL, - [description] [varchar](64) NOT NULL, - [assetType] [tinyint] NOT NULL, - [local] [tinyint] NOT NULL, - [temporary] [tinyint] NOT NULL, - [data] [image] NOT NULL, -PRIMARY KEY CLUSTERED -( - [id] ASC -)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] -) ON [PRIMARY] diff --git a/OpenSim/Data/MSSQL/Resources/001_AuthStore.sql b/OpenSim/Data/MSSQL/Resources/001_AuthStore.sql deleted file mode 100644 index c70a193..0000000 --- a/OpenSim/Data/MSSQL/Resources/001_AuthStore.sql +++ /dev/null @@ -1,17 +0,0 @@ -BEGIN TRANSACTION - -CREATE TABLE [auth] ( - [uuid] [uniqueidentifier] NOT NULL default '00000000-0000-0000-0000-000000000000', - [passwordHash] [varchar](32) NOT NULL, - [passwordSalt] [varchar](32) NOT NULL, - [webLoginKey] [varchar](255) NOT NULL, - [accountType] VARCHAR(32) NOT NULL DEFAULT 'UserAccount', -) ON [PRIMARY] - -CREATE TABLE [tokens] ( - [uuid] [uniqueidentifier] NOT NULL default '00000000-0000-0000-0000-000000000000', - [token] [varchar](255) NOT NULL, - [validity] [datetime] NOT NULL ) - ON [PRIMARY] - -COMMIT \ No newline at end of file diff --git a/OpenSim/Data/MSSQL/Resources/001_Avatar.sql b/OpenSim/Data/MSSQL/Resources/001_Avatar.sql deleted file mode 100644 index 48f4c00..0000000 --- a/OpenSim/Data/MSSQL/Resources/001_Avatar.sql +++ /dev/null @@ -1,15 +0,0 @@ -BEGIN TRANSACTION - -CREATE TABLE [Avatars] ( -[PrincipalID] uniqueidentifier NOT NULL, -[Name] varchar(32) NOT NULL, -[Value] varchar(255) NOT NULL DEFAULT '', -PRIMARY KEY CLUSTERED -( - [PrincipalID] ASC, [Name] ASC -)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] -) ON [PRIMARY] - - - -COMMIT \ No newline at end of file diff --git a/OpenSim/Data/MSSQL/Resources/001_EstateStore.sql b/OpenSim/Data/MSSQL/Resources/001_EstateStore.sql deleted file mode 100644 index 9bb2f75..0000000 --- a/OpenSim/Data/MSSQL/Resources/001_EstateStore.sql +++ /dev/null @@ -1,85 +0,0 @@ -BEGIN TRANSACTION - -CREATE TABLE [dbo].[estate_managers]( - [EstateID] [int] NOT NULL, - [uuid] [varchar](36) NOT NULL, - CONSTRAINT [PK_estate_managers] PRIMARY KEY CLUSTERED -( - [EstateID] ASC -)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] -) ON [PRIMARY]; - -CREATE TABLE [dbo].[estate_groups]( - [EstateID] [int] NOT NULL, - [uuid] [varchar](36) NOT NULL, - CONSTRAINT [PK_estate_groups] PRIMARY KEY CLUSTERED -( - [EstateID] ASC -)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] -) ON [PRIMARY]; - - -CREATE TABLE [dbo].[estate_users]( - [EstateID] [int] NOT NULL, - [uuid] [varchar](36) NOT NULL, - CONSTRAINT [PK_estate_users] PRIMARY KEY CLUSTERED -( - [EstateID] ASC -)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] -) ON [PRIMARY]; - - -CREATE TABLE [dbo].[estateban]( - [EstateID] [int] NOT NULL, - [bannedUUID] [varchar](36) NOT NULL, - [bannedIp] [varchar](16) NOT NULL, - [bannedIpHostMask] [varchar](16) NOT NULL, - [bannedNameMask] [varchar](64) NULL DEFAULT (NULL), - CONSTRAINT [PK_estateban] PRIMARY KEY CLUSTERED -( - [EstateID] ASC -)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] -) ON [PRIMARY]; - -CREATE TABLE [dbo].[estate_settings]( - [EstateID] [int] IDENTITY(1,100) NOT NULL, - [EstateName] [varchar](64) NULL DEFAULT (NULL), - [AbuseEmailToEstateOwner] [bit] NOT NULL, - [DenyAnonymous] [bit] NOT NULL, - [ResetHomeOnTeleport] [bit] NOT NULL, - [FixedSun] [bit] NOT NULL, - [DenyTransacted] [bit] NOT NULL, - [BlockDwell] [bit] NOT NULL, - [DenyIdentified] [bit] NOT NULL, - [AllowVoice] [bit] NOT NULL, - [UseGlobalTime] [bit] NOT NULL, - [PricePerMeter] [int] NOT NULL, - [TaxFree] [bit] NOT NULL, - [AllowDirectTeleport] [bit] NOT NULL, - [RedirectGridX] [int] NOT NULL, - [RedirectGridY] [int] NOT NULL, - [ParentEstateID] [int] NOT NULL, - [SunPosition] [float] NOT NULL, - [EstateSkipScripts] [bit] NOT NULL, - [BillableFactor] [float] NOT NULL, - [PublicAccess] [bit] NOT NULL, - [AbuseEmail] [varchar](255) NOT NULL, - [EstateOwner] [varchar](36) NOT NULL, - [DenyMinors] [bit] NOT NULL, - CONSTRAINT [PK_estate_settings] PRIMARY KEY CLUSTERED -( - [EstateID] ASC -)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] -) ON [PRIMARY]; - - -CREATE TABLE [dbo].[estate_map]( - [RegionID] [varchar](36) NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'), - [EstateID] [int] NOT NULL, - CONSTRAINT [PK_estate_map] PRIMARY KEY CLUSTERED -( - [RegionID] ASC -)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] -) ON [PRIMARY]; - -COMMIT \ No newline at end of file diff --git a/OpenSim/Data/MSSQL/Resources/001_FriendsStore.sql b/OpenSim/Data/MSSQL/Resources/001_FriendsStore.sql deleted file mode 100644 index 94d240b..0000000 --- a/OpenSim/Data/MSSQL/Resources/001_FriendsStore.sql +++ /dev/null @@ -1,11 +0,0 @@ -BEGIN TRANSACTION - -CREATE TABLE [Friends] ( -[PrincipalID] uniqueidentifier NOT NULL, -[Friend] varchar(255) NOT NULL, -[Flags] char(16) NOT NULL DEFAULT '0', -[Offered] varchar(32) NOT NULL DEFAULT 0) - ON [PRIMARY] - - -COMMIT \ No newline at end of file diff --git a/OpenSim/Data/MSSQL/Resources/001_GridStore.sql b/OpenSim/Data/MSSQL/Resources/001_GridStore.sql deleted file mode 100644 index ff15f54..0000000 --- a/OpenSim/Data/MSSQL/Resources/001_GridStore.sql +++ /dev/null @@ -1,37 +0,0 @@ -BEGIN TRANSACTION - -CREATE TABLE [dbo].[regions]( - [regionHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL, - [regionName] [varchar](255) COLLATE Latin1_General_CI_AS NULL, - [uuid] [varchar](255) COLLATE Latin1_General_CI_AS NOT NULL, - [regionRecvKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL, - [regionSecret] [varchar](255) COLLATE Latin1_General_CI_AS NULL, - [regionSendKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL, - [regionDataURI] [varchar](255) COLLATE Latin1_General_CI_AS NULL, - [serverIP] [varchar](255) COLLATE Latin1_General_CI_AS NULL, - [serverPort] [varchar](255) COLLATE Latin1_General_CI_AS NULL, - [serverURI] [varchar](255) COLLATE Latin1_General_CI_AS NULL, - [locX] [varchar](255) COLLATE Latin1_General_CI_AS NULL, - [locY] [varchar](255) COLLATE Latin1_General_CI_AS NULL, - [locZ] [varchar](255) COLLATE Latin1_General_CI_AS NULL, - [eastOverrideHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL, - [westOverrideHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL, - [southOverrideHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL, - [northOverrideHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL, - [regionAssetURI] [varchar](255) COLLATE Latin1_General_CI_AS NULL, - [regionAssetRecvKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL, - [regionAssetSendKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL, - [regionUserURI] [varchar](255) COLLATE Latin1_General_CI_AS NULL, - [regionUserRecvKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL, - [regionUserSendKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL, - [regionMapTexture] [varchar](255) COLLATE Latin1_General_CI_AS NULL, - [serverHttpPort] [varchar](255) COLLATE Latin1_General_CI_AS NULL, - [serverRemotingPort] [varchar](255) COLLATE Latin1_General_CI_AS NULL, - [owner_uuid] [varchar](36) COLLATE Latin1_General_CI_AS NULL, -PRIMARY KEY CLUSTERED -( - [uuid] ASC -)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] -) ON [PRIMARY] - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/001_InventoryStore.sql b/OpenSim/Data/MSSQL/Resources/001_InventoryStore.sql deleted file mode 100644 index 836d2d1..0000000 --- a/OpenSim/Data/MSSQL/Resources/001_InventoryStore.sql +++ /dev/null @@ -1,64 +0,0 @@ -BEGIN TRANSACTION - -CREATE TABLE [inventoryfolders] ( - [folderID] [varchar](36) NOT NULL default '', - [agentID] [varchar](36) default NULL, - [parentFolderID] [varchar](36) default NULL, - [folderName] [varchar](64) default NULL, - [type] [smallint] NOT NULL default 0, - [version] [int] NOT NULL default 0, - PRIMARY KEY CLUSTERED -( - [folderID] ASC -)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] -) ON [PRIMARY] - -CREATE NONCLUSTERED INDEX [owner] ON [inventoryfolders] -( - [agentID] ASC -)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -CREATE NONCLUSTERED INDEX [parent] ON [inventoryfolders] -( - [parentFolderID] ASC -)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - - -CREATE TABLE [inventoryitems] ( - [inventoryID] [varchar](36) NOT NULL default '', - [assetID] [varchar](36) default NULL, - [assetType] [int] default NULL, - [parentFolderID] [varchar](36) default NULL, - [avatarID] [varchar](36) default NULL, - [inventoryName] [varchar](64) default NULL, - [inventoryDescription] [varchar](128) default NULL, - [inventoryNextPermissions] [int] default NULL, - [inventoryCurrentPermissions] [int] default NULL, - [invType] [int] default NULL, - [creatorID] [varchar](36) default NULL, - [inventoryBasePermissions] [int] NOT NULL default 0, - [inventoryEveryOnePermissions] [int] NOT NULL default 0, - [salePrice] [int] default NULL, - [saleType] [tinyint] default NULL, - [creationDate] [int] default NULL, - [groupID] [varchar](36) default NULL, - [groupOwned] [bit] default NULL, - [flags] [int] default NULL, - PRIMARY KEY CLUSTERED -( - [inventoryID] ASC -)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] -) ON [PRIMARY] - - -CREATE NONCLUSTERED INDEX [owner] ON [inventoryitems] -( - [avatarID] ASC -)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -CREATE NONCLUSTERED INDEX [folder] ON [inventoryitems] -( - [parentFolderID] ASC -)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/001_LogStore.sql b/OpenSim/Data/MSSQL/Resources/001_LogStore.sql deleted file mode 100644 index 9ece627..0000000 --- a/OpenSim/Data/MSSQL/Resources/001_LogStore.sql +++ /dev/null @@ -1,17 +0,0 @@ -BEGIN TRANSACTION - -CREATE TABLE [logs] ( - [logID] [int] NOT NULL, - [target] [varchar](36) default NULL, - [server] [varchar](64) default NULL, - [method] [varchar](64) default NULL, - [arguments] [varchar](255) default NULL, - [priority] [int] default NULL, - [message] [ntext], - PRIMARY KEY CLUSTERED -( - [logID] ASC -)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] -) ON [PRIMARY] - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/001_Presence.sql b/OpenSim/Data/MSSQL/Resources/001_Presence.sql deleted file mode 100644 index 877881c..0000000 --- a/OpenSim/Data/MSSQL/Resources/001_Presence.sql +++ /dev/null @@ -1,19 +0,0 @@ -BEGIN TRANSACTION - -CREATE TABLE [Presence] ( -[UserID] varchar(255) NOT NULL, -[RegionID] uniqueidentifier NOT NULL, -[SessionID] uniqueidentifier NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', -[SecureSessionID] uniqueidentifier NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', -[Online] char(5) NOT NULL DEFAULT 'false', -[Login] char(16) NOT NULL DEFAULT '0', -[Logout] char(16) NOT NULL DEFAULT '0', -[Position] char(64) NOT NULL DEFAULT '<0,0,0>', -[LookAt] char(64) NOT NULL DEFAULT '<0,0,0>', -[HomeRegionID] uniqueidentifier NOT NULL, -[HomePosition] CHAR(64) NOT NULL DEFAULT '<0,0,0>', -[HomeLookAt] CHAR(64) NOT NULL DEFAULT '<0,0,0>', -) - ON [PRIMARY] - -COMMIT \ No newline at end of file diff --git a/OpenSim/Data/MSSQL/Resources/001_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/001_RegionStore.sql deleted file mode 100644 index fe7c58f..0000000 --- a/OpenSim/Data/MSSQL/Resources/001_RegionStore.sql +++ /dev/null @@ -1,161 +0,0 @@ -CREATE TABLE [dbo].[prims]( - [UUID] [varchar](255) NOT NULL, - [RegionUUID] [varchar](255) NULL, - [ParentID] [int] NULL, - [CreationDate] [int] NULL, - [Name] [varchar](255) NULL, - [SceneGroupID] [varchar](255) NULL, - [Text] [varchar](255) NULL, - [Description] [varchar](255) NULL, - [SitName] [varchar](255) NULL, - [TouchName] [varchar](255) NULL, - [ObjectFlags] [int] NULL, - [CreatorID] [varchar](255) NULL, - [OwnerID] [varchar](255) NULL, - [GroupID] [varchar](255) NULL, - [LastOwnerID] [varchar](255) NULL, - [OwnerMask] [int] NULL, - [NextOwnerMask] [int] NULL, - [GroupMask] [int] NULL, - [EveryoneMask] [int] NULL, - [BaseMask] [int] NULL, - [PositionX] [float] NULL, - [PositionY] [float] NULL, - [PositionZ] [float] NULL, - [GroupPositionX] [float] NULL, - [GroupPositionY] [float] NULL, - [GroupPositionZ] [float] NULL, - [VelocityX] [float] NULL, - [VelocityY] [float] NULL, - [VelocityZ] [float] NULL, - [AngularVelocityX] [float] NULL, - [AngularVelocityY] [float] NULL, - [AngularVelocityZ] [float] NULL, - [AccelerationX] [float] NULL, - [AccelerationY] [float] NULL, - [AccelerationZ] [float] NULL, - [RotationX] [float] NULL, - [RotationY] [float] NULL, - [RotationZ] [float] NULL, - [RotationW] [float] NULL, - [SitTargetOffsetX] [float] NULL, - [SitTargetOffsetY] [float] NULL, - [SitTargetOffsetZ] [float] NULL, - [SitTargetOrientW] [float] NULL, - [SitTargetOrientX] [float] NULL, - [SitTargetOrientY] [float] NULL, - [SitTargetOrientZ] [float] NULL, -PRIMARY KEY CLUSTERED -( - [UUID] ASC -)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] -) ON [PRIMARY] - -CREATE TABLE [dbo].[primshapes]( - [UUID] [varchar](255) NOT NULL, - [Shape] [int] NULL, - [ScaleX] [float] NULL, - [ScaleY] [float] NULL, - [ScaleZ] [float] NULL, - [PCode] [int] NULL, - [PathBegin] [int] NULL, - [PathEnd] [int] NULL, - [PathScaleX] [int] NULL, - [PathScaleY] [int] NULL, - [PathShearX] [int] NULL, - [PathShearY] [int] NULL, - [PathSkew] [int] NULL, - [PathCurve] [int] NULL, - [PathRadiusOffset] [int] NULL, - [PathRevolutions] [int] NULL, - [PathTaperX] [int] NULL, - [PathTaperY] [int] NULL, - [PathTwist] [int] NULL, - [PathTwistBegin] [int] NULL, - [ProfileBegin] [int] NULL, - [ProfileEnd] [int] NULL, - [ProfileCurve] [int] NULL, - [ProfileHollow] [int] NULL, - [State] [int] NULL, - [Texture] [image] NULL, - [ExtraParams] [image] NULL, -PRIMARY KEY CLUSTERED -( - [UUID] ASC -)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] -) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] - -CREATE TABLE [dbo].[primitems]( - [itemID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [primID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [assetID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [parentFolderID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [invType] [int] NULL, - [assetType] [int] NULL, - [name] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [description] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [creationDate] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [creatorID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [ownerID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [lastOwnerID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [groupID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [nextPermissions] [int] NULL, - [currentPermissions] [int] NULL, - [basePermissions] [int] NULL, - [everyonePermissions] [int] NULL, - [groupPermissions] [int] NULL, -PRIMARY KEY CLUSTERED -( - [itemID] ASC -)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] -) ON [PRIMARY] - -CREATE TABLE [dbo].[terrain]( - [RegionUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [Revision] [int] NULL, - [Heightfield] [image] NULL -) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] - -CREATE TABLE [dbo].[land]( - [UUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [RegionUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [LocalLandID] [int] NULL, - [Bitmap] [image] NULL, - [Name] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [Description] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [OwnerUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [IsGroupOwned] [int] NULL, - [Area] [int] NULL, - [AuctionID] [int] NULL, - [Category] [int] NULL, - [ClaimDate] [int] NULL, - [ClaimPrice] [int] NULL, - [GroupUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [SalePrice] [int] NULL, - [LandStatus] [int] NULL, - [LandFlags] [int] NULL, - [LandingType] [int] NULL, - [MediaAutoScale] [int] NULL, - [MediaTextureUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [MediaURL] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [MusicURL] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [PassHours] [float] NULL, - [PassPrice] [int] NULL, - [SnapshotUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [UserLocationX] [float] NULL, - [UserLocationY] [float] NULL, - [UserLocationZ] [float] NULL, - [UserLookAtX] [float] NULL, - [UserLookAtY] [float] NULL, - [UserLookAtZ] [float] NULL, -PRIMARY KEY CLUSTERED -( - [UUID] ASC -)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] -) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] - -CREATE TABLE [dbo].[landaccesslist]( - [LandUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [AccessUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - [Flags] [int] NULL -) ON [PRIMARY] \ No newline at end of file diff --git a/OpenSim/Data/MSSQL/Resources/001_UserAccount.sql b/OpenSim/Data/MSSQL/Resources/001_UserAccount.sql deleted file mode 100644 index 3dbf8a4..0000000 --- a/OpenSim/Data/MSSQL/Resources/001_UserAccount.sql +++ /dev/null @@ -1,14 +0,0 @@ -CREATE TABLE [UserAccounts] ( - [PrincipalID] uniqueidentifier NOT NULL, - [ScopeID] uniqueidentifier NOT NULL, - [FirstName] [varchar](64) NOT NULL, - [LastName] [varchar](64) NOT NULL, - [Email] [varchar](64) NULL, - [ServiceURLs] [text] NULL, - [Created] [int] default NULL, - - PRIMARY KEY CLUSTERED -( - [PrincipalID] ASC -)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] -) ON [PRIMARY] diff --git a/OpenSim/Data/MSSQL/Resources/001_UserStore.sql b/OpenSim/Data/MSSQL/Resources/001_UserStore.sql deleted file mode 100644 index 160c457..0000000 --- a/OpenSim/Data/MSSQL/Resources/001_UserStore.sql +++ /dev/null @@ -1,112 +0,0 @@ -CREATE TABLE [users] ( - [UUID] [varchar](36) NOT NULL default '', - [username] [varchar](32) NOT NULL, - [lastname] [varchar](32) NOT NULL, - [passwordHash] [varchar](32) NOT NULL, - [passwordSalt] [varchar](32) NOT NULL, - [homeRegion] [bigint] default NULL, - [homeLocationX] [float] default NULL, - [homeLocationY] [float] default NULL, - [homeLocationZ] [float] default NULL, - [homeLookAtX] [float] default NULL, - [homeLookAtY] [float] default NULL, - [homeLookAtZ] [float] default NULL, - [created] [int] NOT NULL, - [lastLogin] [int] NOT NULL, - [userInventoryURI] [varchar](255) default NULL, - [userAssetURI] [varchar](255) default NULL, - [profileCanDoMask] [int] default NULL, - [profileWantDoMask] [int] default NULL, - [profileAboutText] [ntext], - [profileFirstText] [ntext], - [profileImage] [varchar](36) default NULL, - [profileFirstImage] [varchar](36) default NULL, - [webLoginKey] [varchar](36) default NULL, - PRIMARY KEY CLUSTERED -( - [UUID] ASC -)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] -) ON [PRIMARY] - - -CREATE NONCLUSTERED INDEX [usernames] ON [users] -( - [username] ASC, - [lastname] ASC -)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - - -CREATE TABLE [agents] ( - [UUID] [varchar](36) NOT NULL, - [sessionID] [varchar](36) NOT NULL, - [secureSessionID] [varchar](36) NOT NULL, - [agentIP] [varchar](16) NOT NULL, - [agentPort] [int] NOT NULL, - [agentOnline] [tinyint] NOT NULL, - [loginTime] [int] NOT NULL, - [logoutTime] [int] NOT NULL, - [currentRegion] [varchar](36) NOT NULL, - [currentHandle] [bigint] NOT NULL, - [currentPos] [varchar](64) NOT NULL, - PRIMARY KEY CLUSTERED -( - [UUID] ASC -)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] -) ON [PRIMARY] - - -CREATE NONCLUSTERED INDEX [session] ON [agents] -( - [sessionID] ASC -)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -CREATE NONCLUSTERED INDEX [ssession] ON [agents] -( - [secureSessionID] ASC -)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - - -CREATE TABLE [dbo].[userfriends]( - [ownerID] [varchar](50) COLLATE Latin1_General_CI_AS NOT NULL, - [friendID] [varchar](50) COLLATE Latin1_General_CI_AS NOT NULL, - [friendPerms] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [datetimestamp] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL -) ON [PRIMARY] - -CREATE TABLE [avatarappearance] ( - [Owner] [varchar](36) NOT NULL, - [Serial] int NOT NULL, - [Visual_Params] [image] NOT NULL, - [Texture] [image] NOT NULL, - [Avatar_Height] float NOT NULL, - [Body_Item] [varchar](36) NOT NULL, - [Body_Asset] [varchar](36) NOT NULL, - [Skin_Item] [varchar](36) NOT NULL, - [Skin_Asset] [varchar](36) NOT NULL, - [Hair_Item] [varchar](36) NOT NULL, - [Hair_Asset] [varchar](36) NOT NULL, - [Eyes_Item] [varchar](36) NOT NULL, - [Eyes_Asset] [varchar](36) NOT NULL, - [Shirt_Item] [varchar](36) NOT NULL, - [Shirt_Asset] [varchar](36) NOT NULL, - [Pants_Item] [varchar](36) NOT NULL, - [Pants_Asset] [varchar](36) NOT NULL, - [Shoes_Item] [varchar](36) NOT NULL, - [Shoes_Asset] [varchar](36) NOT NULL, - [Socks_Item] [varchar](36) NOT NULL, - [Socks_Asset] [varchar](36) NOT NULL, - [Jacket_Item] [varchar](36) NOT NULL, - [Jacket_Asset] [varchar](36) NOT NULL, - [Gloves_Item] [varchar](36) NOT NULL, - [Gloves_Asset] [varchar](36) NOT NULL, - [Undershirt_Item] [varchar](36) NOT NULL, - [Undershirt_Asset] [varchar](36) NOT NULL, - [Underpants_Item] [varchar](36) NOT NULL, - [Underpants_Asset] [varchar](36) NOT NULL, - [Skirt_Item] [varchar](36) NOT NULL, - [Skirt_Asset] [varchar](36) NOT NULL, - - PRIMARY KEY CLUSTERED ( - [Owner] - ) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] -) ON [PRIMARY] diff --git a/OpenSim/Data/MSSQL/Resources/002_AssetStore.sql b/OpenSim/Data/MSSQL/Resources/002_AssetStore.sql deleted file mode 100644 index 3e24543..0000000 --- a/OpenSim/Data/MSSQL/Resources/002_AssetStore.sql +++ /dev/null @@ -1,29 +0,0 @@ -BEGIN TRANSACTION - -CREATE TABLE Tmp_assets - ( - id varchar(36) NOT NULL, - name varchar(64) NOT NULL, - description varchar(64) NOT NULL, - assetType tinyint NOT NULL, - local bit NOT NULL, - temporary bit NOT NULL, - data image NOT NULL - ) ON [PRIMARY] - TEXTIMAGE_ON [PRIMARY] - -IF EXISTS(SELECT * FROM assets) - EXEC('INSERT INTO Tmp_assets (id, name, description, assetType, local, temporary, data) - SELECT id, name, description, assetType, CONVERT(bit, local), CONVERT(bit, temporary), data FROM assets WITH (HOLDLOCK TABLOCKX)') - -DROP TABLE assets - -EXECUTE sp_rename N'Tmp_assets', N'assets', 'OBJECT' - -ALTER TABLE dbo.assets ADD CONSTRAINT - PK__assets__id PRIMARY KEY CLUSTERED - ( - id - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/002_AuthStore.sql b/OpenSim/Data/MSSQL/Resources/002_AuthStore.sql deleted file mode 100644 index daed955..0000000 --- a/OpenSim/Data/MSSQL/Resources/002_AuthStore.sql +++ /dev/null @@ -1,6 +0,0 @@ -BEGIN TRANSACTION - -INSERT INTO auth (UUID, passwordHash, passwordSalt, webLoginKey, accountType) SELECT [UUID] AS UUID, [passwordHash] AS passwordHash, [passwordSalt] AS passwordSalt, [webLoginKey] AS webLoginKey, 'UserAccount' as [accountType] FROM users; - - -COMMIT \ No newline at end of file diff --git a/OpenSim/Data/MSSQL/Resources/002_EstateStore.sql b/OpenSim/Data/MSSQL/Resources/002_EstateStore.sql deleted file mode 100644 index 18c12c0..0000000 --- a/OpenSim/Data/MSSQL/Resources/002_EstateStore.sql +++ /dev/null @@ -1,25 +0,0 @@ -BEGIN TRANSACTION - -ALTER TABLE dbo.estate_managers DROP CONSTRAINT PK_estate_managers - -CREATE NONCLUSTERED INDEX IX_estate_managers ON dbo.estate_managers - ( - EstateID - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -ALTER TABLE dbo.estate_groups DROP CONSTRAINT PK_estate_groups - -CREATE NONCLUSTERED INDEX IX_estate_groups ON dbo.estate_groups - ( - EstateID - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - - -ALTER TABLE dbo.estate_users DROP CONSTRAINT PK_estate_users - -CREATE NONCLUSTERED INDEX IX_estate_users ON dbo.estate_users - ( - EstateID - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/002_FriendsStore.sql b/OpenSim/Data/MSSQL/Resources/002_FriendsStore.sql deleted file mode 100644 index e67d20e..0000000 --- a/OpenSim/Data/MSSQL/Resources/002_FriendsStore.sql +++ /dev/null @@ -1,6 +0,0 @@ -BEGIN TRANSACTION - -INSERT INTO Friends (PrincipalID, Friend, Flags, Offered) SELECT [ownerID], [friendID], [friendPerms], 0 FROM userfriends; - - -COMMIT \ No newline at end of file diff --git a/OpenSim/Data/MSSQL/Resources/002_GridStore.sql b/OpenSim/Data/MSSQL/Resources/002_GridStore.sql deleted file mode 100644 index f5901cb..0000000 --- a/OpenSim/Data/MSSQL/Resources/002_GridStore.sql +++ /dev/null @@ -1,49 +0,0 @@ -BEGIN TRANSACTION - -CREATE TABLE Tmp_regions - ( - uuid varchar(36) COLLATE Latin1_General_CI_AS NOT NULL, - regionHandle bigint NULL, - regionName varchar(20) NULL, - regionRecvKey varchar(128) NULL, - regionSendKey varchar(128) NULL, - regionSecret varchar(128) NULL, - regionDataURI varchar(128) NULL, - serverIP varchar(64) NULL, - serverPort int NULL, - serverURI varchar(255) NULL, - locX int NULL, - locY int NULL, - locZ int NULL, - eastOverrideHandle bigint NULL, - westOverrideHandle bigint NULL, - southOverrideHandle bigint NULL, - northOverrideHandle bigint NULL, - regionAssetURI varchar(255) NULL, - regionAssetRecvKey varchar(128) NULL, - regionAssetSendKey varchar(128) NULL, - regionUserURI varchar(255) NULL, - regionUserRecvKey varchar(128) NULL, - regionUserSendKey varchar(128) NULL, - regionMapTexture varchar(36) NULL, - serverHttpPort int NULL, - serverRemotingPort int NULL, - owner_uuid varchar(36) NULL, - originUUID varchar(36) NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000') - ) ON [PRIMARY] - -IF EXISTS(SELECT * FROM regions) - EXEC('INSERT INTO Tmp_regions (uuid, regionHandle, regionName, regionRecvKey, regionSendKey, regionSecret, regionDataURI, serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey, regionMapTexture, serverHttpPort, serverRemotingPort, owner_uuid) - SELECT CONVERT(varchar(36), uuid), CONVERT(bigint, regionHandle), CONVERT(varchar(20), regionName), CONVERT(varchar(128), regionRecvKey), CONVERT(varchar(128), regionSendKey), CONVERT(varchar(128), regionSecret), CONVERT(varchar(128), regionDataURI), CONVERT(varchar(64), serverIP), CONVERT(int, serverPort), serverURI, CONVERT(int, locX), CONVERT(int, locY), CONVERT(int, locZ), CONVERT(bigint, eastOverrideHandle), CONVERT(bigint, westOverrideHandle), CONVERT(bigint, southOverrideHandle), CONVERT(bigint, northOverrideHandle), regionAssetURI, CONVERT(varchar(128), regionAssetRecvKey), CONVERT(varchar(128), regionAssetSendKey), regionUserURI, CONVERT(varchar(128), regionUserRecvKey), CONVERT(varchar(128), regionUserSendKey), CONVERT(varchar(36), regionMapTexture), CONVERT(int, serverHttpPort), CONVERT(int, serverRemotingPort), owner_uuid FROM regions') - -DROP TABLE regions - -EXECUTE sp_rename N'Tmp_regions', N'regions', 'OBJECT' - -ALTER TABLE regions ADD CONSTRAINT - PK__regions__uuid PRIMARY KEY CLUSTERED - ( - uuid - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -COMMIT \ No newline at end of file diff --git a/OpenSim/Data/MSSQL/Resources/002_InventoryStore.sql b/OpenSim/Data/MSSQL/Resources/002_InventoryStore.sql deleted file mode 100644 index bcc26b8..0000000 --- a/OpenSim/Data/MSSQL/Resources/002_InventoryStore.sql +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN TRANSACTION - -ALTER TABLE inventoryitems ADD inventoryGroupPermissions INTEGER NOT NULL default 0 - -COMMIT \ No newline at end of file diff --git a/OpenSim/Data/MSSQL/Resources/002_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/002_RegionStore.sql deleted file mode 100644 index 1801035..0000000 --- a/OpenSim/Data/MSSQL/Resources/002_RegionStore.sql +++ /dev/null @@ -1,50 +0,0 @@ -BEGIN TRANSACTION - -CREATE TABLE regionban ( - [regionUUID] VARCHAR(36) NOT NULL, - [bannedUUID] VARCHAR(36) NOT NULL, - [bannedIp] VARCHAR(16) NOT NULL, - [bannedIpHostMask] VARCHAR(16) NOT NULL) - -create table [dbo].[regionsettings] ( - [regionUUID] [varchar](36) not null, - [block_terraform] [bit] not null, - [block_fly] [bit] not null, - [allow_damage] [bit] not null, - [restrict_pushing] [bit] not null, - [allow_land_resell] [bit] not null, - [allow_land_join_divide] [bit] not null, - [block_show_in_search] [bit] not null, - [agent_limit] [int] not null, - [object_bonus] [float] not null, - [maturity] [int] not null, - [disable_scripts] [bit] not null, - [disable_collisions] [bit] not null, - [disable_physics] [bit] not null, - [terrain_texture_1] [varchar](36) not null, - [terrain_texture_2] [varchar](36) not null, - [terrain_texture_3] [varchar](36) not null, - [terrain_texture_4] [varchar](36) not null, - [elevation_1_nw] [float] not null, - [elevation_2_nw] [float] not null, - [elevation_1_ne] [float] not null, - [elevation_2_ne] [float] not null, - [elevation_1_se] [float] not null, - [elevation_2_se] [float] not null, - [elevation_1_sw] [float] not null, - [elevation_2_sw] [float] not null, - [water_height] [float] not null, - [terrain_raise_limit] [float] not null, - [terrain_lower_limit] [float] not null, - [use_estate_sun] [bit] not null, - [fixed_sun] [bit] not null, - [sun_position] [float] not null, - [covenant] [varchar](36) default NULL, - [Sandbox] [bit] NOT NULL, -PRIMARY KEY CLUSTERED -( - [regionUUID] ASC -)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] -) ON [PRIMARY] - -COMMIT \ No newline at end of file diff --git a/OpenSim/Data/MSSQL/Resources/002_UserAccount.sql b/OpenSim/Data/MSSQL/Resources/002_UserAccount.sql deleted file mode 100644 index 89d1f34..0000000 --- a/OpenSim/Data/MSSQL/Resources/002_UserAccount.sql +++ /dev/null @@ -1,12 +0,0 @@ -BEGIN TRANSACTION - -INSERT INTO UserAccounts (PrincipalID, ScopeID, FirstName, LastName, Email, ServiceURLs, Created) SELECT [UUID] AS PrincipalID, '00000000-0000-0000-0000-000000000000' AS ScopeID, -username AS FirstName, -lastname AS LastName, -email as Email, ( -'AssetServerURI=' + -userAssetURI + ' InventoryServerURI=' + userInventoryURI + ' GatewayURI= HomeURI=') AS ServiceURLs, -created as Created FROM users; - - -COMMIT \ No newline at end of file diff --git a/OpenSim/Data/MSSQL/Resources/002_UserStore.sql b/OpenSim/Data/MSSQL/Resources/002_UserStore.sql deleted file mode 100644 index 402eddf..0000000 --- a/OpenSim/Data/MSSQL/Resources/002_UserStore.sql +++ /dev/null @@ -1,9 +0,0 @@ -BEGIN TRANSACTION - -ALTER TABLE users ADD homeRegionID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000'; -ALTER TABLE users ADD userFlags int NOT NULL default 0; -ALTER TABLE users ADD godLevel int NOT NULL default 0; -ALTER TABLE users ADD customType varchar(32) not null default ''; -ALTER TABLE users ADD partner varchar(36) not null default '00000000-0000-0000-0000-000000000000'; - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/003_AssetStore.sql b/OpenSim/Data/MSSQL/Resources/003_AssetStore.sql deleted file mode 100644 index 1434330..0000000 --- a/OpenSim/Data/MSSQL/Resources/003_AssetStore.sql +++ /dev/null @@ -1,6 +0,0 @@ -BEGIN TRANSACTION - -ALTER TABLE assets add create_time integer default 0 -ALTER TABLE assets add access_time integer default 0 - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/003_EstateStore.sql b/OpenSim/Data/MSSQL/Resources/003_EstateStore.sql deleted file mode 100644 index 120966a..0000000 --- a/OpenSim/Data/MSSQL/Resources/003_EstateStore.sql +++ /dev/null @@ -1,25 +0,0 @@ -BEGIN TRANSACTION - -CREATE TABLE dbo.Tmp_estateban - ( - EstateID int NOT NULL, - bannedUUID varchar(36) NOT NULL, - bannedIp varchar(16) NULL, - bannedIpHostMask varchar(16) NULL, - bannedNameMask varchar(64) NULL - ) ON [PRIMARY] - -IF EXISTS(SELECT * FROM dbo.estateban) - EXEC('INSERT INTO dbo.Tmp_estateban (EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask) - SELECT EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask FROM dbo.estateban') - -DROP TABLE dbo.estateban - -EXECUTE sp_rename N'dbo.Tmp_estateban', N'estateban', 'OBJECT' - -CREATE NONCLUSTERED INDEX IX_estateban ON dbo.estateban - ( - EstateID - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/003_GridStore.sql b/OpenSim/Data/MSSQL/Resources/003_GridStore.sql deleted file mode 100644 index e080947..0000000 --- a/OpenSim/Data/MSSQL/Resources/003_GridStore.sql +++ /dev/null @@ -1,22 +0,0 @@ -BEGIN TRANSACTION - -CREATE NONCLUSTERED INDEX IX_regions_name ON dbo.regions - ( - regionName - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -CREATE NONCLUSTERED INDEX IX_regions_handle ON dbo.regions - ( - regionHandle - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - - -CREATE NONCLUSTERED INDEX IX_regions_override ON dbo.regions - ( - eastOverrideHandle, - westOverrideHandle, - southOverrideHandle, - northOverrideHandle - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/003_InventoryStore.sql b/OpenSim/Data/MSSQL/Resources/003_InventoryStore.sql deleted file mode 100644 index 2f623ec..0000000 --- a/OpenSim/Data/MSSQL/Resources/003_InventoryStore.sql +++ /dev/null @@ -1,38 +0,0 @@ -/* To prevent any potential data loss issues, you should review this script in detail before running it outside the context of the database designer.*/ -BEGIN TRANSACTION - -CREATE TABLE dbo.Tmp_inventoryfolders - ( - folderID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'), - agentID uniqueidentifier NULL DEFAULT (NULL), - parentFolderID uniqueidentifier NULL DEFAULT (NULL), - folderName varchar(64) NULL DEFAULT (NULL), - type smallint NOT NULL DEFAULT ((0)), - version int NOT NULL DEFAULT ((0)) - ) ON [PRIMARY] - -IF EXISTS(SELECT * FROM dbo.inventoryfolders) - EXEC('INSERT INTO dbo.Tmp_inventoryfolders (folderID, agentID, parentFolderID, folderName, type, version) - SELECT CONVERT(uniqueidentifier, folderID), CONVERT(uniqueidentifier, agentID), CONVERT(uniqueidentifier, parentFolderID), folderName, type, version FROM dbo.inventoryfolders WITH (HOLDLOCK TABLOCKX)') - -DROP TABLE dbo.inventoryfolders - -EXECUTE sp_rename N'dbo.Tmp_inventoryfolders', N'inventoryfolders', 'OBJECT' - -ALTER TABLE dbo.inventoryfolders ADD CONSTRAINT - PK__inventor__C2FABFB3173876EA PRIMARY KEY CLUSTERED - ( - folderID - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -CREATE NONCLUSTERED INDEX owner ON dbo.inventoryfolders - ( - agentID - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -CREATE NONCLUSTERED INDEX parent ON dbo.inventoryfolders - ( - parentFolderID - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/003_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/003_RegionStore.sql deleted file mode 100644 index a8f40c2..0000000 --- a/OpenSim/Data/MSSQL/Resources/003_RegionStore.sql +++ /dev/null @@ -1,67 +0,0 @@ -BEGIN TRANSACTION - -CREATE TABLE dbo.Tmp_prims - ( - UUID varchar(36) NOT NULL, - RegionUUID varchar(36) NULL, - ParentID int NULL, - CreationDate int NULL, - Name varchar(255) NULL, - SceneGroupID varchar(36) NULL, - Text varchar(255) NULL, - Description varchar(255) NULL, - SitName varchar(255) NULL, - TouchName varchar(255) NULL, - ObjectFlags int NULL, - CreatorID varchar(36) NULL, - OwnerID varchar(36) NULL, - GroupID varchar(36) NULL, - LastOwnerID varchar(36) NULL, - OwnerMask int NULL, - NextOwnerMask int NULL, - GroupMask int NULL, - EveryoneMask int NULL, - BaseMask int NULL, - PositionX float(53) NULL, - PositionY float(53) NULL, - PositionZ float(53) NULL, - GroupPositionX float(53) NULL, - GroupPositionY float(53) NULL, - GroupPositionZ float(53) NULL, - VelocityX float(53) NULL, - VelocityY float(53) NULL, - VelocityZ float(53) NULL, - AngularVelocityX float(53) NULL, - AngularVelocityY float(53) NULL, - AngularVelocityZ float(53) NULL, - AccelerationX float(53) NULL, - AccelerationY float(53) NULL, - AccelerationZ float(53) NULL, - RotationX float(53) NULL, - RotationY float(53) NULL, - RotationZ float(53) NULL, - RotationW float(53) NULL, - SitTargetOffsetX float(53) NULL, - SitTargetOffsetY float(53) NULL, - SitTargetOffsetZ float(53) NULL, - SitTargetOrientW float(53) NULL, - SitTargetOrientX float(53) NULL, - SitTargetOrientY float(53) NULL, - SitTargetOrientZ float(53) NULL - ) ON [PRIMARY] - -IF EXISTS(SELECT * FROM dbo.prims) - EXEC('INSERT INTO dbo.Tmp_prims (UUID, RegionUUID, ParentID, CreationDate, Name, SceneGroupID, Text, Description, SitName, TouchName, ObjectFlags, CreatorID, OwnerID, GroupID, LastOwnerID, OwnerMask, NextOwnerMask, GroupMask, EveryoneMask, BaseMask, PositionX, PositionY, PositionZ, GroupPositionX, GroupPositionY, GroupPositionZ, VelocityX, VelocityY, VelocityZ, AngularVelocityX, AngularVelocityY, AngularVelocityZ, AccelerationX, AccelerationY, AccelerationZ, RotationX, RotationY, RotationZ, RotationW, SitTargetOffsetX, SitTargetOffsetY, SitTargetOffsetZ, SitTargetOrientW, SitTargetOrientX, SitTargetOrientY, SitTargetOrientZ) - SELECT CONVERT(varchar(36), UUID), CONVERT(varchar(36), RegionUUID), ParentID, CreationDate, Name, CONVERT(varchar(36), SceneGroupID), Text, Description, SitName, TouchName, ObjectFlags, CONVERT(varchar(36), CreatorID), CONVERT(varchar(36), OwnerID), CONVERT(varchar(36), GroupID), CONVERT(varchar(36), LastOwnerID), OwnerMask, NextOwnerMask, GroupMask, EveryoneMask, BaseMask, PositionX, PositionY, PositionZ, GroupPositionX, GroupPositionY, GroupPositionZ, VelocityX, VelocityY, VelocityZ, AngularVelocityX, AngularVelocityY, AngularVelocityZ, AccelerationX, AccelerationY, AccelerationZ, RotationX, RotationY, RotationZ, RotationW, SitTargetOffsetX, SitTargetOffsetY, SitTargetOffsetZ, SitTargetOrientW, SitTargetOrientX, SitTargetOrientY, SitTargetOrientZ FROM dbo.prims WITH (HOLDLOCK TABLOCKX)') - -DROP TABLE dbo.prims - -EXECUTE sp_rename N'dbo.Tmp_prims', N'prims', 'OBJECT' - -ALTER TABLE dbo.prims ADD CONSTRAINT - PK__prims__10566F31 PRIMARY KEY CLUSTERED - ( - UUID - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -COMMIT \ No newline at end of file diff --git a/OpenSim/Data/MSSQL/Resources/003_UserAccount.sql b/OpenSim/Data/MSSQL/Resources/003_UserAccount.sql deleted file mode 100644 index da0395b..0000000 --- a/OpenSim/Data/MSSQL/Resources/003_UserAccount.sql +++ /dev/null @@ -1,9 +0,0 @@ -BEGIN TRANSACTION - -CREATE UNIQUE INDEX PrincipalID ON UserAccounts(PrincipalID); -CREATE INDEX Email ON UserAccounts(Email); -CREATE INDEX FirstName ON UserAccounts(FirstName); -CREATE INDEX LastName ON UserAccounts(LastName); -CREATE INDEX Name ON UserAccounts(FirstName,LastName); - -COMMIT \ No newline at end of file diff --git a/OpenSim/Data/MSSQL/Resources/003_UserStore.sql b/OpenSim/Data/MSSQL/Resources/003_UserStore.sql deleted file mode 100644 index cb507c9..0000000 --- a/OpenSim/Data/MSSQL/Resources/003_UserStore.sql +++ /dev/null @@ -1,15 +0,0 @@ -BEGIN TRANSACTION - -CREATE TABLE [avatarattachments] ( - [UUID] varchar(36) NOT NULL - , [attachpoint] int NOT NULL - , [item] varchar(36) NOT NULL - , [asset] varchar(36) NOT NULL) - -CREATE NONCLUSTERED INDEX IX_avatarattachments ON dbo.avatarattachments - ( - UUID - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/004_AssetStore.sql b/OpenSim/Data/MSSQL/Resources/004_AssetStore.sql deleted file mode 100644 index 215cf3a..0000000 --- a/OpenSim/Data/MSSQL/Resources/004_AssetStore.sql +++ /dev/null @@ -1,31 +0,0 @@ -BEGIN TRANSACTION - -CREATE TABLE dbo.Tmp_assets - ( - id uniqueidentifier NOT NULL, - name varchar(64) NOT NULL, - description varchar(64) NOT NULL, - assetType tinyint NOT NULL, - local bit NOT NULL, - temporary bit NOT NULL, - data image NOT NULL, - create_time int NULL, - access_time int NULL - ) ON [PRIMARY] - TEXTIMAGE_ON [PRIMARY] - -IF EXISTS(SELECT * FROM dbo.assets) - EXEC('INSERT INTO dbo.Tmp_assets (id, name, description, assetType, local, temporary, data, create_time, access_time) - SELECT CONVERT(uniqueidentifier, id), name, description, assetType, local, temporary, data, create_time, access_time FROM dbo.assets WITH (HOLDLOCK TABLOCKX)') - -DROP TABLE assets - -EXECUTE sp_rename N'Tmp_assets', N'assets', 'OBJECT' - -ALTER TABLE dbo.assets ADD CONSTRAINT - PK__assets__id PRIMARY KEY CLUSTERED - ( - id - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/004_EstateStore.sql b/OpenSim/Data/MSSQL/Resources/004_EstateStore.sql deleted file mode 100644 index 0a132c1..0000000 --- a/OpenSim/Data/MSSQL/Resources/004_EstateStore.sql +++ /dev/null @@ -1,22 +0,0 @@ -BEGIN TRANSACTION - -CREATE TABLE dbo.Tmp_estate_managers - ( - EstateID int NOT NULL, - uuid uniqueidentifier NOT NULL - ) ON [PRIMARY] - -IF EXISTS(SELECT * FROM dbo.estate_managers) - EXEC('INSERT INTO dbo.Tmp_estate_managers (EstateID, uuid) - SELECT EstateID, CONVERT(uniqueidentifier, uuid) FROM dbo.estate_managers WITH (HOLDLOCK TABLOCKX)') - -DROP TABLE dbo.estate_managers - -EXECUTE sp_rename N'dbo.Tmp_estate_managers', N'estate_managers', 'OBJECT' - -CREATE NONCLUSTERED INDEX IX_estate_managers ON dbo.estate_managers - ( - EstateID - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/004_GridStore.sql b/OpenSim/Data/MSSQL/Resources/004_GridStore.sql deleted file mode 100644 index 6456c95..0000000 --- a/OpenSim/Data/MSSQL/Resources/004_GridStore.sql +++ /dev/null @@ -1,68 +0,0 @@ -/* To prevent any potential data loss issues, you should review this script in detail before running it outside the context of the database designer.*/ -BEGIN TRANSACTION - -CREATE TABLE dbo.Tmp_regions - ( - uuid uniqueidentifier NOT NULL, - regionHandle bigint NULL, - regionName varchar(20) NULL, - regionRecvKey varchar(128) NULL, - regionSendKey varchar(128) NULL, - regionSecret varchar(128) NULL, - regionDataURI varchar(128) NULL, - serverIP varchar(64) NULL, - serverPort int NULL, - serverURI varchar(255) NULL, - locX int NULL, - locY int NULL, - locZ int NULL, - eastOverrideHandle bigint NULL, - westOverrideHandle bigint NULL, - southOverrideHandle bigint NULL, - northOverrideHandle bigint NULL, - regionAssetURI varchar(255) NULL, - regionAssetRecvKey varchar(128) NULL, - regionAssetSendKey varchar(128) NULL, - regionUserURI varchar(255) NULL, - regionUserRecvKey varchar(128) NULL, - regionUserSendKey varchar(128) NULL, - regionMapTexture uniqueidentifier NULL, - serverHttpPort int NULL, - serverRemotingPort int NULL, - owner_uuid uniqueidentifier NOT NULL, - originUUID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000') - ) ON [PRIMARY] - -IF EXISTS(SELECT * FROM dbo.regions) - EXEC('INSERT INTO dbo.Tmp_regions (uuid, regionHandle, regionName, regionRecvKey, regionSendKey, regionSecret, regionDataURI, serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey, regionMapTexture, serverHttpPort, serverRemotingPort, owner_uuid, originUUID) - SELECT CONVERT(uniqueidentifier, uuid), regionHandle, regionName, regionRecvKey, regionSendKey, regionSecret, regionDataURI, serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey, CONVERT(uniqueidentifier, regionMapTexture), serverHttpPort, serverRemotingPort, CONVERT(uniqueidentifier, owner_uuid), CONVERT(uniqueidentifier, originUUID) FROM dbo.regions WITH (HOLDLOCK TABLOCKX)') - -DROP TABLE dbo.regions - -EXECUTE sp_rename N'dbo.Tmp_regions', N'regions', 'OBJECT' - -ALTER TABLE dbo.regions ADD CONSTRAINT - PK__regions__uuid PRIMARY KEY CLUSTERED - ( - uuid - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -CREATE NONCLUSTERED INDEX IX_regions_name ON dbo.regions - ( - regionName - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -CREATE NONCLUSTERED INDEX IX_regions_handle ON dbo.regions - ( - regionHandle - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -CREATE NONCLUSTERED INDEX IX_regions_override ON dbo.regions - ( - eastOverrideHandle, - westOverrideHandle, - southOverrideHandle, - northOverrideHandle - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/004_InventoryStore.sql b/OpenSim/Data/MSSQL/Resources/004_InventoryStore.sql deleted file mode 100644 index 96ef1c0..0000000 --- a/OpenSim/Data/MSSQL/Resources/004_InventoryStore.sql +++ /dev/null @@ -1,52 +0,0 @@ -BEGIN TRANSACTION - -CREATE TABLE dbo.Tmp_inventoryitems - ( - inventoryID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'), - assetID uniqueidentifier NULL DEFAULT (NULL), - assetType int NULL DEFAULT (NULL), - parentFolderID uniqueidentifier NULL DEFAULT (NULL), - avatarID uniqueidentifier NULL DEFAULT (NULL), - inventoryName varchar(64) NULL DEFAULT (NULL), - inventoryDescription varchar(128) NULL DEFAULT (NULL), - inventoryNextPermissions int NULL DEFAULT (NULL), - inventoryCurrentPermissions int NULL DEFAULT (NULL), - invType int NULL DEFAULT (NULL), - creatorID uniqueidentifier NULL DEFAULT (NULL), - inventoryBasePermissions int NOT NULL DEFAULT ((0)), - inventoryEveryOnePermissions int NOT NULL DEFAULT ((0)), - salePrice int NULL DEFAULT (NULL), - saleType tinyint NULL DEFAULT (NULL), - creationDate int NULL DEFAULT (NULL), - groupID uniqueidentifier NULL DEFAULT (NULL), - groupOwned bit NULL DEFAULT (NULL), - flags int NULL DEFAULT (NULL), - inventoryGroupPermissions int NOT NULL DEFAULT ((0)) - ) ON [PRIMARY] - -IF EXISTS(SELECT * FROM dbo.inventoryitems) - EXEC('INSERT INTO dbo.Tmp_inventoryitems (inventoryID, assetID, assetType, parentFolderID, avatarID, inventoryName, inventoryDescription, inventoryNextPermissions, inventoryCurrentPermissions, invType, creatorID, inventoryBasePermissions, inventoryEveryOnePermissions, salePrice, saleType, creationDate, groupID, groupOwned, flags, inventoryGroupPermissions) - SELECT CONVERT(uniqueidentifier, inventoryID), CONVERT(uniqueidentifier, assetID), assetType, CONVERT(uniqueidentifier, parentFolderID), CONVERT(uniqueidentifier, avatarID), inventoryName, inventoryDescription, inventoryNextPermissions, inventoryCurrentPermissions, invType, CONVERT(uniqueidentifier, creatorID), inventoryBasePermissions, inventoryEveryOnePermissions, salePrice, saleType, creationDate, CONVERT(uniqueidentifier, groupID), groupOwned, flags, inventoryGroupPermissions FROM dbo.inventoryitems WITH (HOLDLOCK TABLOCKX)') - -DROP TABLE dbo.inventoryitems - -EXECUTE sp_rename N'dbo.Tmp_inventoryitems', N'inventoryitems', 'OBJECT' - -ALTER TABLE dbo.inventoryitems ADD CONSTRAINT - PK__inventor__C4B7BC2220C1E124 PRIMARY KEY CLUSTERED - ( - inventoryID - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - - -CREATE NONCLUSTERED INDEX owner ON dbo.inventoryitems - ( - avatarID - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -CREATE NONCLUSTERED INDEX folder ON dbo.inventoryitems - ( - parentFolderID - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/004_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/004_RegionStore.sql deleted file mode 100644 index 15b39a7..0000000 --- a/OpenSim/Data/MSSQL/Resources/004_RegionStore.sql +++ /dev/null @@ -1,40 +0,0 @@ -BEGIN TRANSACTION - -CREATE TABLE Tmp_primitems - ( - itemID varchar(36) NOT NULL, - primID varchar(36) NULL, - assetID varchar(36) NULL, - parentFolderID varchar(36) NULL, - invType int NULL, - assetType int NULL, - name varchar(255) NULL, - description varchar(255) NULL, - creationDate varchar(255) NULL, - creatorID varchar(36) NULL, - ownerID varchar(36) NULL, - lastOwnerID varchar(36) NULL, - groupID varchar(36) NULL, - nextPermissions int NULL, - currentPermissions int NULL, - basePermissions int NULL, - everyonePermissions int NULL, - groupPermissions int NULL - ) ON [PRIMARY] - -IF EXISTS(SELECT * FROM primitems) - EXEC('INSERT INTO Tmp_primitems (itemID, primID, assetID, parentFolderID, invType, assetType, name, description, creationDate, creatorID, ownerID, lastOwnerID, groupID, nextPermissions, currentPermissions, basePermissions, everyonePermissions, groupPermissions) - SELECT CONVERT(varchar(36), itemID), CONVERT(varchar(36), primID), CONVERT(varchar(36), assetID), CONVERT(varchar(36), parentFolderID), invType, assetType, name, description, creationDate, CONVERT(varchar(36), creatorID), CONVERT(varchar(36), ownerID), CONVERT(varchar(36), lastOwnerID), CONVERT(varchar(36), groupID), nextPermissions, currentPermissions, basePermissions, everyonePermissions, groupPermissions') - -DROP TABLE primitems - -EXECUTE sp_rename N'Tmp_primitems', N'primitems', 'OBJECT' - -ALTER TABLE primitems ADD CONSTRAINT - PK__primitems__0A688BB1 PRIMARY KEY CLUSTERED - ( - itemID - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/004_UserAccount.sql b/OpenSim/Data/MSSQL/Resources/004_UserAccount.sql deleted file mode 100644 index a9a9021..0000000 --- a/OpenSim/Data/MSSQL/Resources/004_UserAccount.sql +++ /dev/null @@ -1,7 +0,0 @@ -BEGIN TRANSACTION - -ALTER TABLE UserAccounts ADD UserLevel integer NOT NULL DEFAULT 0; -ALTER TABLE UserAccounts ADD UserFlags integer NOT NULL DEFAULT 0; -ALTER TABLE UserAccounts ADD UserTitle varchar(64) NOT NULL DEFAULT ''; - -COMMIT \ No newline at end of file diff --git a/OpenSim/Data/MSSQL/Resources/004_UserStore.sql b/OpenSim/Data/MSSQL/Resources/004_UserStore.sql deleted file mode 100644 index 08f1a1d..0000000 --- a/OpenSim/Data/MSSQL/Resources/004_UserStore.sql +++ /dev/null @@ -1,29 +0,0 @@ -BEGIN TRANSACTION - -CREATE TABLE Tmp_userfriends - ( - ownerID varchar(36) NOT NULL, - friendID varchar(36) NOT NULL, - friendPerms int NOT NULL, - datetimestamp int NOT NULL - ) ON [PRIMARY] - -IF EXISTS(SELECT * FROM userfriends) - EXEC('INSERT INTO dbo.Tmp_userfriends (ownerID, friendID, friendPerms, datetimestamp) - SELECT CONVERT(varchar(36), ownerID), CONVERT(varchar(36), friendID), CONVERT(int, friendPerms), CONVERT(int, datetimestamp) FROM dbo.userfriends WITH (HOLDLOCK TABLOCKX)') - -DROP TABLE dbo.userfriends - -EXECUTE sp_rename N'Tmp_userfriends', N'userfriends', 'OBJECT' - -CREATE NONCLUSTERED INDEX IX_userfriends_ownerID ON userfriends - ( - ownerID - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -CREATE NONCLUSTERED INDEX IX_userfriends_friendID ON userfriends - ( - friendID - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/005_AssetStore.sql b/OpenSim/Data/MSSQL/Resources/005_AssetStore.sql deleted file mode 100644 index 4e95b2b..0000000 --- a/OpenSim/Data/MSSQL/Resources/005_AssetStore.sql +++ /dev/null @@ -1 +0,0 @@ -DELETE FROM assets WHERE id = 'dc4b9f0b-d008-45c6-96a4-01dd947ac621'; diff --git a/OpenSim/Data/MSSQL/Resources/005_EstateStore.sql b/OpenSim/Data/MSSQL/Resources/005_EstateStore.sql deleted file mode 100644 index ba93b39..0000000 --- a/OpenSim/Data/MSSQL/Resources/005_EstateStore.sql +++ /dev/null @@ -1,22 +0,0 @@ -BEGIN TRANSACTION - -CREATE TABLE dbo.Tmp_estate_groups - ( - EstateID int NOT NULL, - uuid uniqueidentifier NOT NULL - ) ON [PRIMARY] - -IF EXISTS(SELECT * FROM dbo.estate_groups) - EXEC('INSERT INTO dbo.Tmp_estate_groups (EstateID, uuid) - SELECT EstateID, CONVERT(uniqueidentifier, uuid) FROM dbo.estate_groups WITH (HOLDLOCK TABLOCKX)') - -DROP TABLE dbo.estate_groups - -EXECUTE sp_rename N'dbo.Tmp_estate_groups', N'estate_groups', 'OBJECT' - -CREATE NONCLUSTERED INDEX IX_estate_groups ON dbo.estate_groups - ( - EstateID - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/005_GridStore.sql b/OpenSim/Data/MSSQL/Resources/005_GridStore.sql deleted file mode 100644 index aa04a33..0000000 --- a/OpenSim/Data/MSSQL/Resources/005_GridStore.sql +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN TRANSACTION - -ALTER TABLE regions ADD access int default 0; - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/005_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/005_RegionStore.sql deleted file mode 100644 index eb0862c..0000000 --- a/OpenSim/Data/MSSQL/Resources/005_RegionStore.sql +++ /dev/null @@ -1,49 +0,0 @@ -BEGIN TRANSACTION - -CREATE TABLE Tmp_primshapes - ( - UUID varchar(36) NOT NULL, - Shape int NULL, - ScaleX float(53) NULL, - ScaleY float(53) NULL, - ScaleZ float(53) NULL, - PCode int NULL, - PathBegin int NULL, - PathEnd int NULL, - PathScaleX int NULL, - PathScaleY int NULL, - PathShearX int NULL, - PathShearY int NULL, - PathSkew int NULL, - PathCurve int NULL, - PathRadiusOffset int NULL, - PathRevolutions int NULL, - PathTaperX int NULL, - PathTaperY int NULL, - PathTwist int NULL, - PathTwistBegin int NULL, - ProfileBegin int NULL, - ProfileEnd int NULL, - ProfileCurve int NULL, - ProfileHollow int NULL, - State int NULL, - Texture image NULL, - ExtraParams image NULL - ) ON [PRIMARY] - TEXTIMAGE_ON [PRIMARY] - -IF EXISTS(SELECT * FROM primshapes) - EXEC('INSERT INTO Tmp_primshapes (UUID, Shape, ScaleX, ScaleY, ScaleZ, PCode, PathBegin, PathEnd, PathScaleX, PathScaleY, PathShearX, PathShearY, PathSkew, PathCurve, PathRadiusOffset, PathRevolutions, PathTaperX, PathTaperY, PathTwist, PathTwistBegin, ProfileBegin, ProfileEnd, ProfileCurve, ProfileHollow, State, Texture, ExtraParams) - SELECT CONVERT(varchar(36), UUID), Shape, ScaleX, ScaleY, ScaleZ, PCode, PathBegin, PathEnd, PathScaleX, PathScaleY, PathShearX, PathShearY, PathSkew, PathCurve, PathRadiusOffset, PathRevolutions, PathTaperX, PathTaperY, PathTwist, PathTwistBegin, ProfileBegin, ProfileEnd, ProfileCurve, ProfileHollow, State, Texture, ExtraParams FROM primshapes WITH (HOLDLOCK TABLOCKX)') - -DROP TABLE primshapes - -EXECUTE sp_rename N'Tmp_primshapes', N'primshapes', 'OBJECT' - -ALTER TABLE primshapes ADD CONSTRAINT - PK__primshapes__0880433F PRIMARY KEY CLUSTERED - ( - UUID - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/005_UserStore.sql b/OpenSim/Data/MSSQL/Resources/005_UserStore.sql deleted file mode 100644 index 1b6ab8f..0000000 --- a/OpenSim/Data/MSSQL/Resources/005_UserStore.sql +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN TRANSACTION - - ALTER TABLE users add email varchar(250); - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/006_EstateStore.sql b/OpenSim/Data/MSSQL/Resources/006_EstateStore.sql deleted file mode 100644 index f7df8fd..0000000 --- a/OpenSim/Data/MSSQL/Resources/006_EstateStore.sql +++ /dev/null @@ -1,22 +0,0 @@ -BEGIN TRANSACTION - -CREATE TABLE dbo.Tmp_estate_users - ( - EstateID int NOT NULL, - uuid uniqueidentifier NOT NULL - ) ON [PRIMARY] - -IF EXISTS(SELECT * FROM dbo.estate_users) - EXEC('INSERT INTO dbo.Tmp_estate_users (EstateID, uuid) - SELECT EstateID, CONVERT(uniqueidentifier, uuid) FROM dbo.estate_users WITH (HOLDLOCK TABLOCKX)') - -DROP TABLE dbo.estate_users - -EXECUTE sp_rename N'dbo.Tmp_estate_users', N'estate_users', 'OBJECT' - -CREATE NONCLUSTERED INDEX IX_estate_users ON dbo.estate_users - ( - EstateID - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/006_GridStore.sql b/OpenSim/Data/MSSQL/Resources/006_GridStore.sql deleted file mode 100644 index 42010ce..0000000 --- a/OpenSim/Data/MSSQL/Resources/006_GridStore.sql +++ /dev/null @@ -1,8 +0,0 @@ -BEGIN TRANSACTION - -ALTER TABLE regions ADD scopeid uniqueidentifier default '00000000-0000-0000-0000-000000000000'; -ALTER TABLE regions ADD DEFAULT ('00000000-0000-0000-0000-000000000000') FOR [owner_uuid]; -ALTER TABLE regions ADD sizeX integer not null default 0; -ALTER TABLE regions ADD sizeY integer not null default 0; - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/006_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/006_RegionStore.sql deleted file mode 100644 index 0419c0c..0000000 --- a/OpenSim/Data/MSSQL/Resources/006_RegionStore.sql +++ /dev/null @@ -1,36 +0,0 @@ -BEGIN TRANSACTION - -ALTER TABLE prims ADD PayPrice int not null default 0 -ALTER TABLE prims ADD PayButton1 int not null default 0 -ALTER TABLE prims ADD PayButton2 int not null default 0 -ALTER TABLE prims ADD PayButton3 int not null default 0 -ALTER TABLE prims ADD PayButton4 int not null default 0 -ALTER TABLE prims ADD LoopedSound varchar(36) not null default '00000000-0000-0000-0000-000000000000'; -ALTER TABLE prims ADD LoopedSoundGain float not null default 0.0; -ALTER TABLE prims ADD TextureAnimation image -ALTER TABLE prims ADD OmegaX float not null default 0.0 -ALTER TABLE prims ADD OmegaY float not null default 0.0 -ALTER TABLE prims ADD OmegaZ float not null default 0.0 -ALTER TABLE prims ADD CameraEyeOffsetX float not null default 0.0 -ALTER TABLE prims ADD CameraEyeOffsetY float not null default 0.0 -ALTER TABLE prims ADD CameraEyeOffsetZ float not null default 0.0 -ALTER TABLE prims ADD CameraAtOffsetX float not null default 0.0 -ALTER TABLE prims ADD CameraAtOffsetY float not null default 0.0 -ALTER TABLE prims ADD CameraAtOffsetZ float not null default 0.0 -ALTER TABLE prims ADD ForceMouselook tinyint not null default 0 -ALTER TABLE prims ADD ScriptAccessPin int not null default 0 -ALTER TABLE prims ADD AllowedDrop tinyint not null default 0 -ALTER TABLE prims ADD DieAtEdge tinyint not null default 0 -ALTER TABLE prims ADD SalePrice int not null default 10 -ALTER TABLE prims ADD SaleType tinyint not null default 0 - -ALTER TABLE primitems add flags integer not null default 0 - -ALTER TABLE land ADD AuthbuyerID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000' - -CREATE index prims_regionuuid on prims(RegionUUID) -CREATE index prims_parentid on prims(ParentID) - -CREATE index primitems_primid on primitems(primID) - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/006_UserStore.sql b/OpenSim/Data/MSSQL/Resources/006_UserStore.sql deleted file mode 100644 index 67fe581..0000000 --- a/OpenSim/Data/MSSQL/Resources/006_UserStore.sql +++ /dev/null @@ -1,57 +0,0 @@ -BEGIN TRANSACTION - -CREATE TABLE dbo.Tmp_users - ( - UUID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'), - username varchar(32) NOT NULL, - lastname varchar(32) NOT NULL, - passwordHash varchar(32) NOT NULL, - passwordSalt varchar(32) NOT NULL, - homeRegion bigint NULL DEFAULT (NULL), - homeLocationX float(53) NULL DEFAULT (NULL), - homeLocationY float(53) NULL DEFAULT (NULL), - homeLocationZ float(53) NULL DEFAULT (NULL), - homeLookAtX float(53) NULL DEFAULT (NULL), - homeLookAtY float(53) NULL DEFAULT (NULL), - homeLookAtZ float(53) NULL DEFAULT (NULL), - created int NOT NULL, - lastLogin int NOT NULL, - userInventoryURI varchar(255) NULL DEFAULT (NULL), - userAssetURI varchar(255) NULL DEFAULT (NULL), - profileCanDoMask int NULL DEFAULT (NULL), - profileWantDoMask int NULL DEFAULT (NULL), - profileAboutText ntext NULL, - profileFirstText ntext NULL, - profileImage uniqueidentifier NULL DEFAULT (NULL), - profileFirstImage uniqueidentifier NULL DEFAULT (NULL), - webLoginKey uniqueidentifier NULL DEFAULT (NULL), - homeRegionID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'), - userFlags int NOT NULL DEFAULT ((0)), - godLevel int NOT NULL DEFAULT ((0)), - customType varchar(32) NOT NULL DEFAULT (''), - partner uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'), - email varchar(250) NULL - ) ON [PRIMARY] - TEXTIMAGE_ON [PRIMARY] - -IF EXISTS(SELECT * FROM dbo.users) - EXEC('INSERT INTO dbo.Tmp_users (UUID, username, lastname, passwordHash, passwordSalt, homeRegion, homeLocationX, homeLocationY, homeLocationZ, homeLookAtX, homeLookAtY, homeLookAtZ, created, lastLogin, userInventoryURI, userAssetURI, profileCanDoMask, profileWantDoMask, profileAboutText, profileFirstText, profileImage, profileFirstImage, webLoginKey, homeRegionID, userFlags, godLevel, customType, partner, email) - SELECT CONVERT(uniqueidentifier, UUID), username, lastname, passwordHash, passwordSalt, homeRegion, homeLocationX, homeLocationY, homeLocationZ, homeLookAtX, homeLookAtY, homeLookAtZ, created, lastLogin, userInventoryURI, userAssetURI, profileCanDoMask, profileWantDoMask, profileAboutText, profileFirstText, CONVERT(uniqueidentifier, profileImage), CONVERT(uniqueidentifier, profileFirstImage), CONVERT(uniqueidentifier, webLoginKey), CONVERT(uniqueidentifier, homeRegionID), userFlags, godLevel, customType, CONVERT(uniqueidentifier, partner), email FROM dbo.users WITH (HOLDLOCK TABLOCKX)') - -DROP TABLE dbo.users - -EXECUTE sp_rename N'dbo.Tmp_users', N'users', 'OBJECT' - -ALTER TABLE dbo.users ADD CONSTRAINT - PK__users__65A475E737A5467C PRIMARY KEY CLUSTERED - ( - UUID - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -CREATE NONCLUSTERED INDEX usernames ON dbo.users - ( - username, - lastname - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/007_EstateStore.sql b/OpenSim/Data/MSSQL/Resources/007_EstateStore.sql deleted file mode 100644 index c9165b0..0000000 --- a/OpenSim/Data/MSSQL/Resources/007_EstateStore.sql +++ /dev/null @@ -1,25 +0,0 @@ -BEGIN TRANSACTION - -CREATE TABLE dbo.Tmp_estateban - ( - EstateID int NOT NULL, - bannedUUID uniqueidentifier NOT NULL, - bannedIp varchar(16) NULL, - bannedIpHostMask varchar(16) NULL, - bannedNameMask varchar(64) NULL - ) ON [PRIMARY] - -IF EXISTS(SELECT * FROM dbo.estateban) - EXEC('INSERT INTO dbo.Tmp_estateban (EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask) - SELECT EstateID, CONVERT(uniqueidentifier, bannedUUID), bannedIp, bannedIpHostMask, bannedNameMask FROM dbo.estateban WITH (HOLDLOCK TABLOCKX)') - -DROP TABLE dbo.estateban - -EXECUTE sp_rename N'dbo.Tmp_estateban', N'estateban', 'OBJECT' - -CREATE NONCLUSTERED INDEX IX_estateban ON dbo.estateban - ( - EstateID - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/007_GridStore.sql b/OpenSim/Data/MSSQL/Resources/007_GridStore.sql deleted file mode 100644 index 0b66d40..0000000 --- a/OpenSim/Data/MSSQL/Resources/007_GridStore.sql +++ /dev/null @@ -1,9 +0,0 @@ -BEGIN TRANSACTION - -ALTER TABLE regions ADD [flags] integer NOT NULL DEFAULT 0; -CREATE INDEX [flags] ON regions(flags); -ALTER TABLE [regions] ADD [last_seen] integer NOT NULL DEFAULT 0; -ALTER TABLE [regions] ADD [PrincipalID] uniqueidentifier NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000'; -ALTER TABLE [regions] ADD [Token] varchar(255) NOT NULL DEFAULT 0; - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/007_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/007_RegionStore.sql deleted file mode 100644 index 684f937..0000000 --- a/OpenSim/Data/MSSQL/Resources/007_RegionStore.sql +++ /dev/null @@ -1,10 +0,0 @@ -BEGIN TRANSACTION - -ALTER TABLE prims ADD ColorR int not null default 0; -ALTER TABLE prims ADD ColorG int not null default 0; -ALTER TABLE prims ADD ColorB int not null default 0; -ALTER TABLE prims ADD ColorA int not null default 0; -ALTER TABLE prims ADD ParticleSystem IMAGE; -ALTER TABLE prims ADD ClickAction tinyint NOT NULL default 0; - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/007_UserStore.sql b/OpenSim/Data/MSSQL/Resources/007_UserStore.sql deleted file mode 100644 index 92a8fc5..0000000 --- a/OpenSim/Data/MSSQL/Resources/007_UserStore.sql +++ /dev/null @@ -1,42 +0,0 @@ -BEGIN TRANSACTION - -CREATE TABLE dbo.Tmp_agents - ( - UUID uniqueidentifier NOT NULL, - sessionID uniqueidentifier NOT NULL, - secureSessionID uniqueidentifier NOT NULL, - agentIP varchar(16) NOT NULL, - agentPort int NOT NULL, - agentOnline tinyint NOT NULL, - loginTime int NOT NULL, - logoutTime int NOT NULL, - currentRegion uniqueidentifier NOT NULL, - currentHandle bigint NOT NULL, - currentPos varchar(64) NOT NULL - ) ON [PRIMARY] - -IF EXISTS(SELECT * FROM dbo.agents) - EXEC('INSERT INTO dbo.Tmp_agents (UUID, sessionID, secureSessionID, agentIP, agentPort, agentOnline, loginTime, logoutTime, currentRegion, currentHandle, currentPos) - SELECT CONVERT(uniqueidentifier, UUID), CONVERT(uniqueidentifier, sessionID), CONVERT(uniqueidentifier, secureSessionID), agentIP, agentPort, agentOnline, loginTime, logoutTime, CONVERT(uniqueidentifier, currentRegion), currentHandle, currentPos FROM dbo.agents WITH (HOLDLOCK TABLOCKX)') - -DROP TABLE dbo.agents - -EXECUTE sp_rename N'dbo.Tmp_agents', N'agents', 'OBJECT' - -ALTER TABLE dbo.agents ADD CONSTRAINT - PK__agents__65A475E749C3F6B7 PRIMARY KEY CLUSTERED - ( - UUID - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -CREATE NONCLUSTERED INDEX session ON dbo.agents - ( - sessionID - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -CREATE NONCLUSTERED INDEX ssession ON dbo.agents - ( - secureSessionID - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/008_EstateStore.sql b/OpenSim/Data/MSSQL/Resources/008_EstateStore.sql deleted file mode 100644 index 9c5355e..0000000 --- a/OpenSim/Data/MSSQL/Resources/008_EstateStore.sql +++ /dev/null @@ -1,49 +0,0 @@ -BEGIN TRANSACTION - -CREATE TABLE dbo.Tmp_estate_settings - ( - EstateID int NOT NULL IDENTITY (1, 100), - EstateName varchar(64) NULL DEFAULT (NULL), - AbuseEmailToEstateOwner bit NOT NULL, - DenyAnonymous bit NOT NULL, - ResetHomeOnTeleport bit NOT NULL, - FixedSun bit NOT NULL, - DenyTransacted bit NOT NULL, - BlockDwell bit NOT NULL, - DenyIdentified bit NOT NULL, - AllowVoice bit NOT NULL, - UseGlobalTime bit NOT NULL, - PricePerMeter int NOT NULL, - TaxFree bit NOT NULL, - AllowDirectTeleport bit NOT NULL, - RedirectGridX int NOT NULL, - RedirectGridY int NOT NULL, - ParentEstateID int NOT NULL, - SunPosition float(53) NOT NULL, - EstateSkipScripts bit NOT NULL, - BillableFactor float(53) NOT NULL, - PublicAccess bit NOT NULL, - AbuseEmail varchar(255) NOT NULL, - EstateOwner uniqueidentifier NOT NULL, - DenyMinors bit NOT NULL - ) ON [PRIMARY] - -SET IDENTITY_INSERT dbo.Tmp_estate_settings ON - -IF EXISTS(SELECT * FROM dbo.estate_settings) - EXEC('INSERT INTO dbo.Tmp_estate_settings (EstateID, EstateName, AbuseEmailToEstateOwner, DenyAnonymous, ResetHomeOnTeleport, FixedSun, DenyTransacted, BlockDwell, DenyIdentified, AllowVoice, UseGlobalTime, PricePerMeter, TaxFree, AllowDirectTeleport, RedirectGridX, RedirectGridY, ParentEstateID, SunPosition, EstateSkipScripts, BillableFactor, PublicAccess, AbuseEmail, EstateOwner, DenyMinors) - SELECT EstateID, EstateName, AbuseEmailToEstateOwner, DenyAnonymous, ResetHomeOnTeleport, FixedSun, DenyTransacted, BlockDwell, DenyIdentified, AllowVoice, UseGlobalTime, PricePerMeter, TaxFree, AllowDirectTeleport, RedirectGridX, RedirectGridY, ParentEstateID, SunPosition, EstateSkipScripts, BillableFactor, PublicAccess, AbuseEmail, CONVERT(uniqueidentifier, EstateOwner), DenyMinors FROM dbo.estate_settings WITH (HOLDLOCK TABLOCKX)') - -SET IDENTITY_INSERT dbo.Tmp_estate_settings OFF - -DROP TABLE dbo.estate_settings - -EXECUTE sp_rename N'dbo.Tmp_estate_settings', N'estate_settings', 'OBJECT' - -ALTER TABLE dbo.estate_settings ADD CONSTRAINT - PK_estate_settings PRIMARY KEY CLUSTERED - ( - EstateID - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/008_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/008_RegionStore.sql deleted file mode 100644 index 87d6d80..0000000 --- a/OpenSim/Data/MSSQL/Resources/008_RegionStore.sql +++ /dev/null @@ -1,7 +0,0 @@ -BEGIN TRANSACTION - -ALTER TABLE land ADD OtherCleanTime integer NOT NULL default 0; -ALTER TABLE land ADD Dwell integer NOT NULL default 0; - -COMMIT - diff --git a/OpenSim/Data/MSSQL/Resources/008_UserStore.sql b/OpenSim/Data/MSSQL/Resources/008_UserStore.sql deleted file mode 100644 index 505252b..0000000 --- a/OpenSim/Data/MSSQL/Resources/008_UserStore.sql +++ /dev/null @@ -1,29 +0,0 @@ -BEGIN TRANSACTION - -CREATE TABLE dbo.Tmp_userfriends - ( - ownerID uniqueidentifier NOT NULL, - friendID uniqueidentifier NOT NULL, - friendPerms int NOT NULL, - datetimestamp int NOT NULL - ) ON [PRIMARY] - -IF EXISTS(SELECT * FROM dbo.userfriends) - EXEC('INSERT INTO dbo.Tmp_userfriends (ownerID, friendID, friendPerms, datetimestamp) - SELECT CONVERT(uniqueidentifier, ownerID), CONVERT(uniqueidentifier, friendID), friendPerms, datetimestamp FROM dbo.userfriends WITH (HOLDLOCK TABLOCKX)') - -DROP TABLE dbo.userfriends - -EXECUTE sp_rename N'dbo.Tmp_userfriends', N'userfriends', 'OBJECT' - -CREATE NONCLUSTERED INDEX IX_userfriends_ownerID ON dbo.userfriends - ( - ownerID - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -CREATE NONCLUSTERED INDEX IX_userfriends_friendID ON dbo.userfriends - ( - friendID - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/009_EstateStore.sql b/OpenSim/Data/MSSQL/Resources/009_EstateStore.sql deleted file mode 100644 index f91557c..0000000 --- a/OpenSim/Data/MSSQL/Resources/009_EstateStore.sql +++ /dev/null @@ -1,24 +0,0 @@ -BEGIN TRANSACTION - -CREATE TABLE dbo.Tmp_estate_map - ( - RegionID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'), - EstateID int NOT NULL - ) ON [PRIMARY] - -IF EXISTS(SELECT * FROM dbo.estate_map) - EXEC('INSERT INTO dbo.Tmp_estate_map (RegionID, EstateID) - SELECT CONVERT(uniqueidentifier, RegionID), EstateID FROM dbo.estate_map WITH (HOLDLOCK TABLOCKX)') - -DROP TABLE dbo.estate_map - -EXECUTE sp_rename N'dbo.Tmp_estate_map', N'estate_map', 'OBJECT' - -ALTER TABLE dbo.estate_map ADD CONSTRAINT - PK_estate_map PRIMARY KEY CLUSTERED - ( - RegionID - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/009_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/009_RegionStore.sql deleted file mode 100644 index 4ef3b3f..0000000 --- a/OpenSim/Data/MSSQL/Resources/009_RegionStore.sql +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN TRANSACTION - -ALTER TABLE prims ADD Material tinyint NOT NULL default 3 - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/009_UserStore.sql b/OpenSim/Data/MSSQL/Resources/009_UserStore.sql deleted file mode 100644 index b1ab8ba..0000000 --- a/OpenSim/Data/MSSQL/Resources/009_UserStore.sql +++ /dev/null @@ -1,53 +0,0 @@ -BEGIN TRANSACTION - -CREATE TABLE dbo.Tmp_avatarappearance - ( - Owner uniqueidentifier NOT NULL, - Serial int NOT NULL, - Visual_Params image NOT NULL, - Texture image NOT NULL, - Avatar_Height float(53) NOT NULL, - Body_Item uniqueidentifier NOT NULL, - Body_Asset uniqueidentifier NOT NULL, - Skin_Item uniqueidentifier NOT NULL, - Skin_Asset uniqueidentifier NOT NULL, - Hair_Item uniqueidentifier NOT NULL, - Hair_Asset uniqueidentifier NOT NULL, - Eyes_Item uniqueidentifier NOT NULL, - Eyes_Asset uniqueidentifier NOT NULL, - Shirt_Item uniqueidentifier NOT NULL, - Shirt_Asset uniqueidentifier NOT NULL, - Pants_Item uniqueidentifier NOT NULL, - Pants_Asset uniqueidentifier NOT NULL, - Shoes_Item uniqueidentifier NOT NULL, - Shoes_Asset uniqueidentifier NOT NULL, - Socks_Item uniqueidentifier NOT NULL, - Socks_Asset uniqueidentifier NOT NULL, - Jacket_Item uniqueidentifier NOT NULL, - Jacket_Asset uniqueidentifier NOT NULL, - Gloves_Item uniqueidentifier NOT NULL, - Gloves_Asset uniqueidentifier NOT NULL, - Undershirt_Item uniqueidentifier NOT NULL, - Undershirt_Asset uniqueidentifier NOT NULL, - Underpants_Item uniqueidentifier NOT NULL, - Underpants_Asset uniqueidentifier NOT NULL, - Skirt_Item uniqueidentifier NOT NULL, - Skirt_Asset uniqueidentifier NOT NULL - ) ON [PRIMARY] - TEXTIMAGE_ON [PRIMARY] - -IF EXISTS(SELECT * FROM dbo.avatarappearance) - EXEC('INSERT INTO dbo.Tmp_avatarappearance (Owner, Serial, Visual_Params, Texture, Avatar_Height, Body_Item, Body_Asset, Skin_Item, Skin_Asset, Hair_Item, Hair_Asset, Eyes_Item, Eyes_Asset, Shirt_Item, Shirt_Asset, Pants_Item, Pants_Asset, Shoes_Item, Shoes_Asset, Socks_Item, Socks_Asset, Jacket_Item, Jacket_Asset, Gloves_Item, Gloves_Asset, Undershirt_Item, Undershirt_Asset, Underpants_Item, Underpants_Asset, Skirt_Item, Skirt_Asset) - SELECT CONVERT(uniqueidentifier, Owner), Serial, Visual_Params, Texture, Avatar_Height, CONVERT(uniqueidentifier, Body_Item), CONVERT(uniqueidentifier, Body_Asset), CONVERT(uniqueidentifier, Skin_Item), CONVERT(uniqueidentifier, Skin_Asset), CONVERT(uniqueidentifier, Hair_Item), CONVERT(uniqueidentifier, Hair_Asset), CONVERT(uniqueidentifier, Eyes_Item), CONVERT(uniqueidentifier, Eyes_Asset), CONVERT(uniqueidentifier, Shirt_Item), CONVERT(uniqueidentifier, Shirt_Asset), CONVERT(uniqueidentifier, Pants_Item), CONVERT(uniqueidentifier, Pants_Asset), CONVERT(uniqueidentifier, Shoes_Item), CONVERT(uniqueidentifier, Shoes_Asset), CONVERT(uniqueidentifier, Socks_Item), CONVERT(uniqueidentifier, Socks_Asset), CONVERT(uniqueidentifier, Jacket_Item), CONVERT(uniqueidentifier, Jacket_Asset), CONVERT(uniqueidentifier, Gloves_Item), CONVERT(uniqueidentifier, Gloves_Asset), CONVERT(uniqueidentifier, Undershirt_Item), CONVERT(uniqueidentifier, Undershirt_Asset), CONVERT(uniqueidentifier, Underpants_Item), CONVERT(uniqueidentifier, Underpants_Asset), CONVERT(uniqueidentifier, Skirt_Item), CONVERT(uniqueidentifier, Skirt_Asset) FROM dbo.avatarappearance WITH (HOLDLOCK TABLOCKX)') - -DROP TABLE dbo.avatarappearance - -EXECUTE sp_rename N'dbo.Tmp_avatarappearance', N'avatarappearance', 'OBJECT' - -ALTER TABLE dbo.avatarappearance ADD CONSTRAINT - PK__avatarap__7DD115CC4E88ABD4 PRIMARY KEY CLUSTERED - ( - Owner - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/010_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/010_RegionStore.sql deleted file mode 100644 index 74ad9c2..0000000 --- a/OpenSim/Data/MSSQL/Resources/010_RegionStore.sql +++ /dev/null @@ -1,7 +0,0 @@ -BEGIN TRANSACTION - -ALTER TABLE regionsettings ADD sunvectorx float NOT NULL default 0; -ALTER TABLE regionsettings ADD sunvectory float NOT NULL default 0; -ALTER TABLE regionsettings ADD sunvectorz float NOT NULL default 0; - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/010_UserStore.sql b/OpenSim/Data/MSSQL/Resources/010_UserStore.sql deleted file mode 100644 index 0af008a..0000000 --- a/OpenSim/Data/MSSQL/Resources/010_UserStore.sql +++ /dev/null @@ -1,24 +0,0 @@ -BEGIN TRANSACTION - -CREATE TABLE dbo.Tmp_avatarattachments - ( - UUID uniqueidentifier NOT NULL, - attachpoint int NOT NULL, - item uniqueidentifier NOT NULL, - asset uniqueidentifier NOT NULL - ) ON [PRIMARY] - -IF EXISTS(SELECT * FROM dbo.avatarattachments) - EXEC('INSERT INTO dbo.Tmp_avatarattachments (UUID, attachpoint, item, asset) - SELECT CONVERT(uniqueidentifier, UUID), attachpoint, CONVERT(uniqueidentifier, item), CONVERT(uniqueidentifier, asset) FROM dbo.avatarattachments WITH (HOLDLOCK TABLOCKX)') - -DROP TABLE dbo.avatarattachments - -EXECUTE sp_rename N'dbo.Tmp_avatarattachments', N'avatarattachments', 'OBJECT' - -CREATE NONCLUSTERED INDEX IX_avatarattachments ON dbo.avatarattachments - ( - UUID - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/011_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/011_RegionStore.sql deleted file mode 100644 index 14c71a3..0000000 --- a/OpenSim/Data/MSSQL/Resources/011_RegionStore.sql +++ /dev/null @@ -1,6 +0,0 @@ -BEGIN TRANSACTION - -ALTER TABLE prims ADD CollisionSound char(36) not null default '00000000-0000-0000-0000-000000000000' -ALTER TABLE prims ADD CollisionSoundVolume float not null default 0.0 - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/011_UserStore.sql b/OpenSim/Data/MSSQL/Resources/011_UserStore.sql deleted file mode 100644 index 5aa064f..0000000 --- a/OpenSim/Data/MSSQL/Resources/011_UserStore.sql +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN TRANSACTION - -ALTER TABLE users ADD scopeID uniqueidentifier not null default '00000000-0000-0000-0000-000000000000' - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/012_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/012_RegionStore.sql deleted file mode 100644 index eef8d90..0000000 --- a/OpenSim/Data/MSSQL/Resources/012_RegionStore.sql +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN TRANSACTION - -ALTER TABLE prims ADD LinkNumber integer not null default 0 - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/013_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/013_RegionStore.sql deleted file mode 100644 index ef5d4c0..0000000 --- a/OpenSim/Data/MSSQL/Resources/013_RegionStore.sql +++ /dev/null @@ -1,112 +0,0 @@ -BEGIN TRANSACTION - -CREATE TABLE dbo.Tmp_prims - ( - UUID uniqueidentifier NOT NULL, - RegionUUID uniqueidentifier NULL, - ParentID int NULL, - CreationDate int NULL, - Name varchar(255) NULL, - SceneGroupID uniqueidentifier NULL, - Text varchar(255) NULL, - Description varchar(255) NULL, - SitName varchar(255) NULL, - TouchName varchar(255) NULL, - ObjectFlags int NULL, - CreatorID uniqueidentifier NULL, - OwnerID uniqueidentifier NULL, - GroupID uniqueidentifier NULL, - LastOwnerID uniqueidentifier NULL, - OwnerMask int NULL, - NextOwnerMask int NULL, - GroupMask int NULL, - EveryoneMask int NULL, - BaseMask int NULL, - PositionX float(53) NULL, - PositionY float(53) NULL, - PositionZ float(53) NULL, - GroupPositionX float(53) NULL, - GroupPositionY float(53) NULL, - GroupPositionZ float(53) NULL, - VelocityX float(53) NULL, - VelocityY float(53) NULL, - VelocityZ float(53) NULL, - AngularVelocityX float(53) NULL, - AngularVelocityY float(53) NULL, - AngularVelocityZ float(53) NULL, - AccelerationX float(53) NULL, - AccelerationY float(53) NULL, - AccelerationZ float(53) NULL, - RotationX float(53) NULL, - RotationY float(53) NULL, - RotationZ float(53) NULL, - RotationW float(53) NULL, - SitTargetOffsetX float(53) NULL, - SitTargetOffsetY float(53) NULL, - SitTargetOffsetZ float(53) NULL, - SitTargetOrientW float(53) NULL, - SitTargetOrientX float(53) NULL, - SitTargetOrientY float(53) NULL, - SitTargetOrientZ float(53) NULL, - PayPrice int NOT NULL DEFAULT ((0)), - PayButton1 int NOT NULL DEFAULT ((0)), - PayButton2 int NOT NULL DEFAULT ((0)), - PayButton3 int NOT NULL DEFAULT ((0)), - PayButton4 int NOT NULL DEFAULT ((0)), - LoopedSound uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'), - LoopedSoundGain float(53) NOT NULL DEFAULT ((0.0)), - TextureAnimation image NULL, - OmegaX float(53) NOT NULL DEFAULT ((0.0)), - OmegaY float(53) NOT NULL DEFAULT ((0.0)), - OmegaZ float(53) NOT NULL DEFAULT ((0.0)), - CameraEyeOffsetX float(53) NOT NULL DEFAULT ((0.0)), - CameraEyeOffsetY float(53) NOT NULL DEFAULT ((0.0)), - CameraEyeOffsetZ float(53) NOT NULL DEFAULT ((0.0)), - CameraAtOffsetX float(53) NOT NULL DEFAULT ((0.0)), - CameraAtOffsetY float(53) NOT NULL DEFAULT ((0.0)), - CameraAtOffsetZ float(53) NOT NULL DEFAULT ((0.0)), - ForceMouselook tinyint NOT NULL DEFAULT ((0)), - ScriptAccessPin int NOT NULL DEFAULT ((0)), - AllowedDrop tinyint NOT NULL DEFAULT ((0)), - DieAtEdge tinyint NOT NULL DEFAULT ((0)), - SalePrice int NOT NULL DEFAULT ((10)), - SaleType tinyint NOT NULL DEFAULT ((0)), - ColorR int NOT NULL DEFAULT ((0)), - ColorG int NOT NULL DEFAULT ((0)), - ColorB int NOT NULL DEFAULT ((0)), - ColorA int NOT NULL DEFAULT ((0)), - ParticleSystem image NULL, - ClickAction tinyint NOT NULL DEFAULT ((0)), - Material tinyint NOT NULL DEFAULT ((3)), - CollisionSound uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'), - CollisionSoundVolume float(53) NOT NULL DEFAULT ((0.0)), - LinkNumber int NOT NULL DEFAULT ((0)) - ) ON [PRIMARY] - TEXTIMAGE_ON [PRIMARY] - -IF EXISTS(SELECT * FROM dbo.prims) - EXEC('INSERT INTO dbo.Tmp_prims (UUID, RegionUUID, ParentID, CreationDate, Name, SceneGroupID, Text, Description, SitName, TouchName, ObjectFlags, CreatorID, OwnerID, GroupID, LastOwnerID, OwnerMask, NextOwnerMask, GroupMask, EveryoneMask, BaseMask, PositionX, PositionY, PositionZ, GroupPositionX, GroupPositionY, GroupPositionZ, VelocityX, VelocityY, VelocityZ, AngularVelocityX, AngularVelocityY, AngularVelocityZ, AccelerationX, AccelerationY, AccelerationZ, RotationX, RotationY, RotationZ, RotationW, SitTargetOffsetX, SitTargetOffsetY, SitTargetOffsetZ, SitTargetOrientW, SitTargetOrientX, SitTargetOrientY, SitTargetOrientZ, PayPrice, PayButton1, PayButton2, PayButton3, PayButton4, LoopedSound, LoopedSoundGain, TextureAnimation, OmegaX, OmegaY, OmegaZ, CameraEyeOffsetX, CameraEyeOffsetY, CameraEyeOffsetZ, CameraAtOffsetX, CameraAtOffsetY, CameraAtOffsetZ, ForceMouselook, ScriptAccessPin, AllowedDrop, DieAtEdge, SalePrice, SaleType, ColorR, ColorG, ColorB, ColorA, ParticleSystem, ClickAction, Material, CollisionSound, CollisionSoundVolume, LinkNumber) - SELECT CONVERT(uniqueidentifier, UUID), CONVERT(uniqueidentifier, RegionUUID), ParentID, CreationDate, Name, CONVERT(uniqueidentifier, SceneGroupID), Text, Description, SitName, TouchName, ObjectFlags, CONVERT(uniqueidentifier, CreatorID), CONVERT(uniqueidentifier, OwnerID), CONVERT(uniqueidentifier, GroupID), CONVERT(uniqueidentifier, LastOwnerID), OwnerMask, NextOwnerMask, GroupMask, EveryoneMask, BaseMask, PositionX, PositionY, PositionZ, GroupPositionX, GroupPositionY, GroupPositionZ, VelocityX, VelocityY, VelocityZ, AngularVelocityX, AngularVelocityY, AngularVelocityZ, AccelerationX, AccelerationY, AccelerationZ, RotationX, RotationY, RotationZ, RotationW, SitTargetOffsetX, SitTargetOffsetY, SitTargetOffsetZ, SitTargetOrientW, SitTargetOrientX, SitTargetOrientY, SitTargetOrientZ, PayPrice, PayButton1, PayButton2, PayButton3, PayButton4, CONVERT(uniqueidentifier, LoopedSound), LoopedSoundGain, TextureAnimation, OmegaX, OmegaY, OmegaZ, CameraEyeOffsetX, CameraEyeOffsetY, CameraEyeOffsetZ, CameraAtOffsetX, CameraAtOffsetY, CameraAtOffsetZ, ForceMouselook, ScriptAccessPin, AllowedDrop, DieAtEdge, SalePrice, SaleType, ColorR, ColorG, ColorB, ColorA, ParticleSystem, ClickAction, Material, CONVERT(uniqueidentifier, CollisionSound), CollisionSoundVolume, LinkNumber FROM dbo.prims WITH (HOLDLOCK TABLOCKX)') - -DROP TABLE dbo.prims - -EXECUTE sp_rename N'dbo.Tmp_prims', N'prims', 'OBJECT' - -ALTER TABLE dbo.prims ADD CONSTRAINT - PK__prims__10566F31 PRIMARY KEY CLUSTERED - ( - UUID - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - - -CREATE NONCLUSTERED INDEX prims_regionuuid ON dbo.prims - ( - RegionUUID - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -CREATE NONCLUSTERED INDEX prims_parentid ON dbo.prims - ( - ParentID - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/014_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/014_RegionStore.sql deleted file mode 100644 index 02f6f55..0000000 --- a/OpenSim/Data/MSSQL/Resources/014_RegionStore.sql +++ /dev/null @@ -1,49 +0,0 @@ -BEGIN TRANSACTION - -CREATE TABLE dbo.Tmp_primshapes - ( - UUID uniqueidentifier NOT NULL, - Shape int NULL, - ScaleX float(53) NULL, - ScaleY float(53) NULL, - ScaleZ float(53) NULL, - PCode int NULL, - PathBegin int NULL, - PathEnd int NULL, - PathScaleX int NULL, - PathScaleY int NULL, - PathShearX int NULL, - PathShearY int NULL, - PathSkew int NULL, - PathCurve int NULL, - PathRadiusOffset int NULL, - PathRevolutions int NULL, - PathTaperX int NULL, - PathTaperY int NULL, - PathTwist int NULL, - PathTwistBegin int NULL, - ProfileBegin int NULL, - ProfileEnd int NULL, - ProfileCurve int NULL, - ProfileHollow int NULL, - State int NULL, - Texture image NULL, - ExtraParams image NULL - ) ON [PRIMARY] - TEXTIMAGE_ON [PRIMARY] - -IF EXISTS(SELECT * FROM dbo.primshapes) - EXEC('INSERT INTO dbo.Tmp_primshapes (UUID, Shape, ScaleX, ScaleY, ScaleZ, PCode, PathBegin, PathEnd, PathScaleX, PathScaleY, PathShearX, PathShearY, PathSkew, PathCurve, PathRadiusOffset, PathRevolutions, PathTaperX, PathTaperY, PathTwist, PathTwistBegin, ProfileBegin, ProfileEnd, ProfileCurve, ProfileHollow, State, Texture, ExtraParams) - SELECT CONVERT(uniqueidentifier, UUID), Shape, ScaleX, ScaleY, ScaleZ, PCode, PathBegin, PathEnd, PathScaleX, PathScaleY, PathShearX, PathShearY, PathSkew, PathCurve, PathRadiusOffset, PathRevolutions, PathTaperX, PathTaperY, PathTwist, PathTwistBegin, ProfileBegin, ProfileEnd, ProfileCurve, ProfileHollow, State, Texture, ExtraParams FROM dbo.primshapes WITH (HOLDLOCK TABLOCKX)') - -DROP TABLE dbo.primshapes - -EXECUTE sp_rename N'dbo.Tmp_primshapes', N'primshapes', 'OBJECT' - -ALTER TABLE dbo.primshapes ADD CONSTRAINT - PK__primshapes__0880433F PRIMARY KEY CLUSTERED - ( - UUID - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/015_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/015_RegionStore.sql deleted file mode 100644 index cbaaf88..0000000 --- a/OpenSim/Data/MSSQL/Resources/015_RegionStore.sql +++ /dev/null @@ -1,45 +0,0 @@ -BEGIN TRANSACTION - -CREATE TABLE dbo.Tmp_primitems - ( - itemID uniqueidentifier NOT NULL, - primID uniqueidentifier NULL, - assetID uniqueidentifier NULL, - parentFolderID uniqueidentifier NULL, - invType int NULL, - assetType int NULL, - name varchar(255) NULL, - description varchar(255) NULL, - creationDate varchar(255) NULL, - creatorID uniqueidentifier NULL, - ownerID uniqueidentifier NULL, - lastOwnerID uniqueidentifier NULL, - groupID uniqueidentifier NULL, - nextPermissions int NULL, - currentPermissions int NULL, - basePermissions int NULL, - everyonePermissions int NULL, - groupPermissions int NULL, - flags int NOT NULL DEFAULT ((0)) - ) ON [PRIMARY] - -IF EXISTS(SELECT * FROM dbo.primitems) - EXEC('INSERT INTO dbo.Tmp_primitems (itemID, primID, assetID, parentFolderID, invType, assetType, name, description, creationDate, creatorID, ownerID, lastOwnerID, groupID, nextPermissions, currentPermissions, basePermissions, everyonePermissions, groupPermissions, flags) - SELECT CONVERT(uniqueidentifier, itemID), CONVERT(uniqueidentifier, primID), CONVERT(uniqueidentifier, assetID), CONVERT(uniqueidentifier, parentFolderID), invType, assetType, name, description, creationDate, CONVERT(uniqueidentifier, creatorID), CONVERT(uniqueidentifier, ownerID), CONVERT(uniqueidentifier, lastOwnerID), CONVERT(uniqueidentifier, groupID), nextPermissions, currentPermissions, basePermissions, everyonePermissions, groupPermissions, flags FROM dbo.primitems WITH (HOLDLOCK TABLOCKX)') - -DROP TABLE dbo.primitems - -EXECUTE sp_rename N'dbo.Tmp_primitems', N'primitems', 'OBJECT' - -ALTER TABLE dbo.primitems ADD CONSTRAINT - PK__primitems__0A688BB1 PRIMARY KEY CLUSTERED - ( - itemID - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -CREATE NONCLUSTERED INDEX primitems_primid ON dbo.primitems - ( - primID - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/016_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/016_RegionStore.sql deleted file mode 100644 index e91da19..0000000 --- a/OpenSim/Data/MSSQL/Resources/016_RegionStore.sql +++ /dev/null @@ -1,19 +0,0 @@ -BEGIN TRANSACTION - -CREATE TABLE dbo.Tmp_terrain - ( - RegionUUID uniqueidentifier NULL, - Revision int NULL, - Heightfield image NULL - ) ON [PRIMARY] - TEXTIMAGE_ON [PRIMARY] - -IF EXISTS(SELECT * FROM dbo.terrain) - EXEC('INSERT INTO dbo.Tmp_terrain (RegionUUID, Revision, Heightfield) - SELECT CONVERT(uniqueidentifier, RegionUUID), Revision, Heightfield FROM dbo.terrain WITH (HOLDLOCK TABLOCKX)') - -DROP TABLE dbo.terrain - -EXECUTE sp_rename N'dbo.Tmp_terrain', N'terrain', 'OBJECT' - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/017_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/017_RegionStore.sql deleted file mode 100644 index 3d3dbc0..0000000 --- a/OpenSim/Data/MSSQL/Resources/017_RegionStore.sql +++ /dev/null @@ -1,56 +0,0 @@ -BEGIN TRANSACTION - -CREATE TABLE dbo.Tmp_land - ( - UUID uniqueidentifier NOT NULL, - RegionUUID uniqueidentifier NULL, - LocalLandID int NULL, - Bitmap image NULL, - Name varchar(255) NULL, - Description varchar(255) NULL, - OwnerUUID uniqueidentifier NULL, - IsGroupOwned int NULL, - Area int NULL, - AuctionID int NULL, - Category int NULL, - ClaimDate int NULL, - ClaimPrice int NULL, - GroupUUID uniqueidentifier NULL, - SalePrice int NULL, - LandStatus int NULL, - LandFlags int NULL, - LandingType int NULL, - MediaAutoScale int NULL, - MediaTextureUUID uniqueidentifier NULL, - MediaURL varchar(255) NULL, - MusicURL varchar(255) NULL, - PassHours float(53) NULL, - PassPrice int NULL, - SnapshotUUID uniqueidentifier NULL, - UserLocationX float(53) NULL, - UserLocationY float(53) NULL, - UserLocationZ float(53) NULL, - UserLookAtX float(53) NULL, - UserLookAtY float(53) NULL, - UserLookAtZ float(53) NULL, - AuthbuyerID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'), - OtherCleanTime int NOT NULL DEFAULT ((0)), - Dwell int NOT NULL DEFAULT ((0)) - ) ON [PRIMARY] - TEXTIMAGE_ON [PRIMARY] - -IF EXISTS(SELECT * FROM dbo.land) - EXEC('INSERT INTO dbo.Tmp_land (UUID, RegionUUID, LocalLandID, Bitmap, Name, Description, OwnerUUID, IsGroupOwned, Area, AuctionID, Category, ClaimDate, ClaimPrice, GroupUUID, SalePrice, LandStatus, LandFlags, LandingType, MediaAutoScale, MediaTextureUUID, MediaURL, MusicURL, PassHours, PassPrice, SnapshotUUID, UserLocationX, UserLocationY, UserLocationZ, UserLookAtX, UserLookAtY, UserLookAtZ, AuthbuyerID, OtherCleanTime, Dwell) - SELECT CONVERT(uniqueidentifier, UUID), CONVERT(uniqueidentifier, RegionUUID), LocalLandID, Bitmap, Name, Description, CONVERT(uniqueidentifier, OwnerUUID), IsGroupOwned, Area, AuctionID, Category, ClaimDate, ClaimPrice, CONVERT(uniqueidentifier, GroupUUID), SalePrice, LandStatus, LandFlags, LandingType, MediaAutoScale, CONVERT(uniqueidentifier, MediaTextureUUID), MediaURL, MusicURL, PassHours, PassPrice, CONVERT(uniqueidentifier, SnapshotUUID), UserLocationX, UserLocationY, UserLocationZ, UserLookAtX, UserLookAtY, UserLookAtZ, CONVERT(uniqueidentifier, AuthbuyerID), OtherCleanTime, Dwell FROM dbo.land WITH (HOLDLOCK TABLOCKX)') - -DROP TABLE dbo.land - -EXECUTE sp_rename N'dbo.Tmp_land', N'land', 'OBJECT' - -ALTER TABLE dbo.land ADD CONSTRAINT - PK__land__65A475E71BFD2C07 PRIMARY KEY CLUSTERED - ( - UUID - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/018_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/018_RegionStore.sql deleted file mode 100644 index 6157e35..0000000 --- a/OpenSim/Data/MSSQL/Resources/018_RegionStore.sql +++ /dev/null @@ -1,18 +0,0 @@ -BEGIN TRANSACTION - -CREATE TABLE dbo.Tmp_landaccesslist - ( - LandUUID uniqueidentifier NULL, - AccessUUID uniqueidentifier NULL, - Flags int NULL - ) ON [PRIMARY] - -IF EXISTS(SELECT * FROM dbo.landaccesslist) - EXEC('INSERT INTO dbo.Tmp_landaccesslist (LandUUID, AccessUUID, Flags) - SELECT CONVERT(uniqueidentifier, LandUUID), CONVERT(uniqueidentifier, AccessUUID), Flags FROM dbo.landaccesslist WITH (HOLDLOCK TABLOCKX)') - -DROP TABLE dbo.landaccesslist - -EXECUTE sp_rename N'dbo.Tmp_landaccesslist', N'landaccesslist', 'OBJECT' - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/019_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/019_RegionStore.sql deleted file mode 100644 index 8e613b9..0000000 --- a/OpenSim/Data/MSSQL/Resources/019_RegionStore.sql +++ /dev/null @@ -1,19 +0,0 @@ -BEGIN TRANSACTION - -CREATE TABLE dbo.Tmp_regionban - ( - regionUUID uniqueidentifier NOT NULL, - bannedUUID uniqueidentifier NOT NULL, - bannedIp varchar(16) NOT NULL, - bannedIpHostMask varchar(16) NOT NULL - ) ON [PRIMARY] - -IF EXISTS(SELECT * FROM dbo.regionban) - EXEC('INSERT INTO dbo.Tmp_regionban (regionUUID, bannedUUID, bannedIp, bannedIpHostMask) - SELECT CONVERT(uniqueidentifier, regionUUID), CONVERT(uniqueidentifier, bannedUUID), bannedIp, bannedIpHostMask FROM dbo.regionban WITH (HOLDLOCK TABLOCKX)') - -DROP TABLE dbo.regionban - -EXECUTE sp_rename N'dbo.Tmp_regionban', N'regionban', 'OBJECT' - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/020_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/020_RegionStore.sql deleted file mode 100644 index 2ce91f6..0000000 --- a/OpenSim/Data/MSSQL/Resources/020_RegionStore.sql +++ /dev/null @@ -1,58 +0,0 @@ -BEGIN TRANSACTION - -CREATE TABLE dbo.Tmp_regionsettings - ( - regionUUID uniqueidentifier NOT NULL, - block_terraform bit NOT NULL, - block_fly bit NOT NULL, - allow_damage bit NOT NULL, - restrict_pushing bit NOT NULL, - allow_land_resell bit NOT NULL, - allow_land_join_divide bit NOT NULL, - block_show_in_search bit NOT NULL, - agent_limit int NOT NULL, - object_bonus float(53) NOT NULL, - maturity int NOT NULL, - disable_scripts bit NOT NULL, - disable_collisions bit NOT NULL, - disable_physics bit NOT NULL, - terrain_texture_1 uniqueidentifier NOT NULL, - terrain_texture_2 uniqueidentifier NOT NULL, - terrain_texture_3 uniqueidentifier NOT NULL, - terrain_texture_4 uniqueidentifier NOT NULL, - elevation_1_nw float(53) NOT NULL, - elevation_2_nw float(53) NOT NULL, - elevation_1_ne float(53) NOT NULL, - elevation_2_ne float(53) NOT NULL, - elevation_1_se float(53) NOT NULL, - elevation_2_se float(53) NOT NULL, - elevation_1_sw float(53) NOT NULL, - elevation_2_sw float(53) NOT NULL, - water_height float(53) NOT NULL, - terrain_raise_limit float(53) NOT NULL, - terrain_lower_limit float(53) NOT NULL, - use_estate_sun bit NOT NULL, - fixed_sun bit NOT NULL, - sun_position float(53) NOT NULL, - covenant uniqueidentifier NULL DEFAULT (NULL), - Sandbox bit NOT NULL, - sunvectorx float(53) NOT NULL DEFAULT ((0)), - sunvectory float(53) NOT NULL DEFAULT ((0)), - sunvectorz float(53) NOT NULL DEFAULT ((0)) - ) ON [PRIMARY] - -IF EXISTS(SELECT * FROM dbo.regionsettings) - EXEC('INSERT INTO dbo.Tmp_regionsettings (regionUUID, block_terraform, block_fly, allow_damage, restrict_pushing, allow_land_resell, allow_land_join_divide, block_show_in_search, agent_limit, object_bonus, maturity, disable_scripts, disable_collisions, disable_physics, terrain_texture_1, terrain_texture_2, terrain_texture_3, terrain_texture_4, elevation_1_nw, elevation_2_nw, elevation_1_ne, elevation_2_ne, elevation_1_se, elevation_2_se, elevation_1_sw, elevation_2_sw, water_height, terrain_raise_limit, terrain_lower_limit, use_estate_sun, fixed_sun, sun_position, covenant, Sandbox, sunvectorx, sunvectory, sunvectorz) - SELECT CONVERT(uniqueidentifier, regionUUID), block_terraform, block_fly, allow_damage, restrict_pushing, allow_land_resell, allow_land_join_divide, block_show_in_search, agent_limit, object_bonus, maturity, disable_scripts, disable_collisions, disable_physics, CONVERT(uniqueidentifier, terrain_texture_1), CONVERT(uniqueidentifier, terrain_texture_2), CONVERT(uniqueidentifier, terrain_texture_3), CONVERT(uniqueidentifier, terrain_texture_4), elevation_1_nw, elevation_2_nw, elevation_1_ne, elevation_2_ne, elevation_1_se, elevation_2_se, elevation_1_sw, elevation_2_sw, water_height, terrain_raise_limit, terrain_lower_limit, use_estate_sun, fixed_sun, sun_position, CONVERT(uniqueidentifier, covenant), Sandbox, sunvectorx, sunvectory, sunvectorz FROM dbo.regionsettings WITH (HOLDLOCK TABLOCKX)') - -DROP TABLE dbo.regionsettings - -EXECUTE sp_rename N'dbo.Tmp_regionsettings', N'regionsettings', 'OBJECT' - -ALTER TABLE dbo.regionsettings ADD CONSTRAINT - PK__regionse__5B35159D21B6055D PRIMARY KEY CLUSTERED - ( - regionUUID - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/021_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/021_RegionStore.sql deleted file mode 100644 index ac59182..0000000 --- a/OpenSim/Data/MSSQL/Resources/021_RegionStore.sql +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN TRANSACTION - -ALTER TABLE prims ADD PassTouches bit not null default 0 - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/022_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/022_RegionStore.sql deleted file mode 100644 index 421e8d3..0000000 --- a/OpenSim/Data/MSSQL/Resources/022_RegionStore.sql +++ /dev/null @@ -1,7 +0,0 @@ -BEGIN TRANSACTION - -ALTER TABLE regionsettings ADD loaded_creation_date varchar(20) -ALTER TABLE regionsettings ADD loaded_creation_time varchar(20) -ALTER TABLE regionsettings ADD loaded_creation_id varchar(64) - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/023_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/023_RegionStore.sql deleted file mode 100644 index 75a16f3..0000000 --- a/OpenSim/Data/MSSQL/Resources/023_RegionStore.sql +++ /dev/null @@ -1,7 +0,0 @@ -BEGIN TRANSACTION - -ALTER TABLE regionsettings DROP COLUMN loaded_creation_date -ALTER TABLE regionsettings DROP COLUMN loaded_creation_time -ALTER TABLE regionsettings ADD loaded_creation_datetime int NOT NULL default 0 - -COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/AssetStore.migrations b/OpenSim/Data/MSSQL/Resources/AssetStore.migrations new file mode 100644 index 0000000..beb82b9 --- /dev/null +++ b/OpenSim/Data/MSSQL/Resources/AssetStore.migrations @@ -0,0 +1,100 @@ +:VERSION 1 + +CREATE TABLE [assets] ( + [id] [varchar](36) NOT NULL, + [name] [varchar](64) NOT NULL, + [description] [varchar](64) NOT NULL, + [assetType] [tinyint] NOT NULL, + [local] [tinyint] NOT NULL, + [temporary] [tinyint] NOT NULL, + [data] [image] NOT NULL, +PRIMARY KEY CLUSTERED +( + [id] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + + +:VERSION 2 + +BEGIN TRANSACTION + +CREATE TABLE Tmp_assets + ( + id varchar(36) NOT NULL, + name varchar(64) NOT NULL, + description varchar(64) NOT NULL, + assetType tinyint NOT NULL, + local bit NOT NULL, + temporary bit NOT NULL, + data image NOT NULL + ) ON [PRIMARY] + TEXTIMAGE_ON [PRIMARY] + +IF EXISTS(SELECT * FROM assets) + EXEC('INSERT INTO Tmp_assets (id, name, description, assetType, local, temporary, data) + SELECT id, name, description, assetType, CONVERT(bit, local), CONVERT(bit, temporary), data FROM assets WITH (HOLDLOCK TABLOCKX)') + +DROP TABLE assets + +EXECUTE sp_rename N'Tmp_assets', N'assets', 'OBJECT' + +ALTER TABLE dbo.assets ADD CONSTRAINT + PK__assets__id PRIMARY KEY CLUSTERED + ( + id + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +COMMIT + + +:VERSION 3 + +BEGIN TRANSACTION + +ALTER TABLE assets add create_time integer default 0 +ALTER TABLE assets add access_time integer default 0 + +COMMIT + + +:VERSION 4 + +BEGIN TRANSACTION + +CREATE TABLE dbo.Tmp_assets + ( + id uniqueidentifier NOT NULL, + name varchar(64) NOT NULL, + description varchar(64) NOT NULL, + assetType tinyint NOT NULL, + local bit NOT NULL, + temporary bit NOT NULL, + data image NOT NULL, + create_time int NULL, + access_time int NULL + ) ON [PRIMARY] + TEXTIMAGE_ON [PRIMARY] + +IF EXISTS(SELECT * FROM dbo.assets) + EXEC('INSERT INTO dbo.Tmp_assets (id, name, description, assetType, local, temporary, data, create_time, access_time) + SELECT CONVERT(uniqueidentifier, id), name, description, assetType, local, temporary, data, create_time, access_time FROM dbo.assets WITH (HOLDLOCK TABLOCKX)') + +DROP TABLE assets + +EXECUTE sp_rename N'Tmp_assets', N'assets', 'OBJECT' + +ALTER TABLE dbo.assets ADD CONSTRAINT + PK__assets__id PRIMARY KEY CLUSTERED + ( + id + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +COMMIT + + +:VERSION 5 + +DELETE FROM assets WHERE id = 'dc4b9f0b-d008-45c6-96a4-01dd947ac621'; + + diff --git a/OpenSim/Data/MSSQL/Resources/AuthStore.migrations b/OpenSim/Data/MSSQL/Resources/AuthStore.migrations new file mode 100644 index 0000000..5b90ca3 --- /dev/null +++ b/OpenSim/Data/MSSQL/Resources/AuthStore.migrations @@ -0,0 +1,28 @@ +:VERSION 1 + +BEGIN TRANSACTION + +CREATE TABLE [auth] ( + [uuid] [uniqueidentifier] NOT NULL default '00000000-0000-0000-0000-000000000000', + [passwordHash] [varchar](32) NOT NULL, + [passwordSalt] [varchar](32) NOT NULL, + [webLoginKey] [varchar](255) NOT NULL, + [accountType] VARCHAR(32) NOT NULL DEFAULT 'UserAccount', +) ON [PRIMARY] + +CREATE TABLE [tokens] ( + [uuid] [uniqueidentifier] NOT NULL default '00000000-0000-0000-0000-000000000000', + [token] [varchar](255) NOT NULL, + [validity] [datetime] NOT NULL ) + ON [PRIMARY] + +COMMIT + +:VERSION 2 + +BEGIN TRANSACTION + +INSERT INTO auth (UUID, passwordHash, passwordSalt, webLoginKey, accountType) SELECT [UUID] AS UUID, [passwordHash] AS passwordHash, [passwordSalt] AS passwordSalt, [webLoginKey] AS webLoginKey, 'UserAccount' as [accountType] FROM users; + + +COMMIT \ No newline at end of file diff --git a/OpenSim/Data/MSSQL/Resources/Avatar.migrations b/OpenSim/Data/MSSQL/Resources/Avatar.migrations new file mode 100644 index 0000000..759e939 --- /dev/null +++ b/OpenSim/Data/MSSQL/Resources/Avatar.migrations @@ -0,0 +1,17 @@ +:VERSION 1 + +BEGIN TRANSACTION + +CREATE TABLE [Avatars] ( +[PrincipalID] uniqueidentifier NOT NULL, +[Name] varchar(32) NOT NULL, +[Value] varchar(255) NOT NULL DEFAULT '', +PRIMARY KEY CLUSTERED +( + [PrincipalID] ASC, [Name] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + + + +COMMIT \ No newline at end of file diff --git a/OpenSim/Data/MSSQL/Resources/EstateStore.migrations b/OpenSim/Data/MSSQL/Resources/EstateStore.migrations new file mode 100644 index 0000000..64b2d2b --- /dev/null +++ b/OpenSim/Data/MSSQL/Resources/EstateStore.migrations @@ -0,0 +1,334 @@ +:VERSION 1 + +BEGIN TRANSACTION + +CREATE TABLE [dbo].[estate_managers]( + [EstateID] [int] NOT NULL, + [uuid] [varchar](36) NOT NULL, + CONSTRAINT [PK_estate_managers] PRIMARY KEY CLUSTERED +( + [EstateID] ASC +)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] +) ON [PRIMARY]; + +CREATE TABLE [dbo].[estate_groups]( + [EstateID] [int] NOT NULL, + [uuid] [varchar](36) NOT NULL, + CONSTRAINT [PK_estate_groups] PRIMARY KEY CLUSTERED +( + [EstateID] ASC +)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] +) ON [PRIMARY]; + + +CREATE TABLE [dbo].[estate_users]( + [EstateID] [int] NOT NULL, + [uuid] [varchar](36) NOT NULL, + CONSTRAINT [PK_estate_users] PRIMARY KEY CLUSTERED +( + [EstateID] ASC +)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] +) ON [PRIMARY]; + + +CREATE TABLE [dbo].[estateban]( + [EstateID] [int] NOT NULL, + [bannedUUID] [varchar](36) NOT NULL, + [bannedIp] [varchar](16) NOT NULL, + [bannedIpHostMask] [varchar](16) NOT NULL, + [bannedNameMask] [varchar](64) NULL DEFAULT (NULL), + CONSTRAINT [PK_estateban] PRIMARY KEY CLUSTERED +( + [EstateID] ASC +)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] +) ON [PRIMARY]; + +CREATE TABLE [dbo].[estate_settings]( + [EstateID] [int] IDENTITY(1,100) NOT NULL, + [EstateName] [varchar](64) NULL DEFAULT (NULL), + [AbuseEmailToEstateOwner] [bit] NOT NULL, + [DenyAnonymous] [bit] NOT NULL, + [ResetHomeOnTeleport] [bit] NOT NULL, + [FixedSun] [bit] NOT NULL, + [DenyTransacted] [bit] NOT NULL, + [BlockDwell] [bit] NOT NULL, + [DenyIdentified] [bit] NOT NULL, + [AllowVoice] [bit] NOT NULL, + [UseGlobalTime] [bit] NOT NULL, + [PricePerMeter] [int] NOT NULL, + [TaxFree] [bit] NOT NULL, + [AllowDirectTeleport] [bit] NOT NULL, + [RedirectGridX] [int] NOT NULL, + [RedirectGridY] [int] NOT NULL, + [ParentEstateID] [int] NOT NULL, + [SunPosition] [float] NOT NULL, + [EstateSkipScripts] [bit] NOT NULL, + [BillableFactor] [float] NOT NULL, + [PublicAccess] [bit] NOT NULL, + [AbuseEmail] [varchar](255) NOT NULL, + [EstateOwner] [varchar](36) NOT NULL, + [DenyMinors] [bit] NOT NULL, + CONSTRAINT [PK_estate_settings] PRIMARY KEY CLUSTERED +( + [EstateID] ASC +)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] +) ON [PRIMARY]; + + +CREATE TABLE [dbo].[estate_map]( + [RegionID] [varchar](36) NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'), + [EstateID] [int] NOT NULL, + CONSTRAINT [PK_estate_map] PRIMARY KEY CLUSTERED +( + [RegionID] ASC +)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] +) ON [PRIMARY]; + +COMMIT + +:VERSION 2 + +BEGIN TRANSACTION + +ALTER TABLE dbo.estate_managers DROP CONSTRAINT PK_estate_managers + +CREATE NONCLUSTERED INDEX IX_estate_managers ON dbo.estate_managers + ( + EstateID + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +ALTER TABLE dbo.estate_groups DROP CONSTRAINT PK_estate_groups + +CREATE NONCLUSTERED INDEX IX_estate_groups ON dbo.estate_groups + ( + EstateID + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + + +ALTER TABLE dbo.estate_users DROP CONSTRAINT PK_estate_users + +CREATE NONCLUSTERED INDEX IX_estate_users ON dbo.estate_users + ( + EstateID + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +COMMIT + + +:VERSION 3 + +BEGIN TRANSACTION + +CREATE TABLE dbo.Tmp_estateban + ( + EstateID int NOT NULL, + bannedUUID varchar(36) NOT NULL, + bannedIp varchar(16) NULL, + bannedIpHostMask varchar(16) NULL, + bannedNameMask varchar(64) NULL + ) ON [PRIMARY] + +IF EXISTS(SELECT * FROM dbo.estateban) + EXEC('INSERT INTO dbo.Tmp_estateban (EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask) + SELECT EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask FROM dbo.estateban') + +DROP TABLE dbo.estateban + +EXECUTE sp_rename N'dbo.Tmp_estateban', N'estateban', 'OBJECT' + +CREATE NONCLUSTERED INDEX IX_estateban ON dbo.estateban + ( + EstateID + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +COMMIT + + +:VERSION 4 + +BEGIN TRANSACTION + +CREATE TABLE dbo.Tmp_estate_managers + ( + EstateID int NOT NULL, + uuid uniqueidentifier NOT NULL + ) ON [PRIMARY] + +IF EXISTS(SELECT * FROM dbo.estate_managers) + EXEC('INSERT INTO dbo.Tmp_estate_managers (EstateID, uuid) + SELECT EstateID, CONVERT(uniqueidentifier, uuid) FROM dbo.estate_managers WITH (HOLDLOCK TABLOCKX)') + +DROP TABLE dbo.estate_managers + +EXECUTE sp_rename N'dbo.Tmp_estate_managers', N'estate_managers', 'OBJECT' + +CREATE NONCLUSTERED INDEX IX_estate_managers ON dbo.estate_managers + ( + EstateID + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +COMMIT + + +:VERSION 5 + +BEGIN TRANSACTION + +CREATE TABLE dbo.Tmp_estate_groups + ( + EstateID int NOT NULL, + uuid uniqueidentifier NOT NULL + ) ON [PRIMARY] + +IF EXISTS(SELECT * FROM dbo.estate_groups) + EXEC('INSERT INTO dbo.Tmp_estate_groups (EstateID, uuid) + SELECT EstateID, CONVERT(uniqueidentifier, uuid) FROM dbo.estate_groups WITH (HOLDLOCK TABLOCKX)') + +DROP TABLE dbo.estate_groups + +EXECUTE sp_rename N'dbo.Tmp_estate_groups', N'estate_groups', 'OBJECT' + +CREATE NONCLUSTERED INDEX IX_estate_groups ON dbo.estate_groups + ( + EstateID + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +COMMIT + + +:VERSION 6 + +BEGIN TRANSACTION + +CREATE TABLE dbo.Tmp_estate_users + ( + EstateID int NOT NULL, + uuid uniqueidentifier NOT NULL + ) ON [PRIMARY] + +IF EXISTS(SELECT * FROM dbo.estate_users) + EXEC('INSERT INTO dbo.Tmp_estate_users (EstateID, uuid) + SELECT EstateID, CONVERT(uniqueidentifier, uuid) FROM dbo.estate_users WITH (HOLDLOCK TABLOCKX)') + +DROP TABLE dbo.estate_users + +EXECUTE sp_rename N'dbo.Tmp_estate_users', N'estate_users', 'OBJECT' + +CREATE NONCLUSTERED INDEX IX_estate_users ON dbo.estate_users + ( + EstateID + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +COMMIT + + +:VERSION 7 + +BEGIN TRANSACTION + +CREATE TABLE dbo.Tmp_estateban + ( + EstateID int NOT NULL, + bannedUUID uniqueidentifier NOT NULL, + bannedIp varchar(16) NULL, + bannedIpHostMask varchar(16) NULL, + bannedNameMask varchar(64) NULL + ) ON [PRIMARY] + +IF EXISTS(SELECT * FROM dbo.estateban) + EXEC('INSERT INTO dbo.Tmp_estateban (EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask) + SELECT EstateID, CONVERT(uniqueidentifier, bannedUUID), bannedIp, bannedIpHostMask, bannedNameMask FROM dbo.estateban WITH (HOLDLOCK TABLOCKX)') + +DROP TABLE dbo.estateban + +EXECUTE sp_rename N'dbo.Tmp_estateban', N'estateban', 'OBJECT' + +CREATE NONCLUSTERED INDEX IX_estateban ON dbo.estateban + ( + EstateID + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +COMMIT + + +:VERSION 8 + +BEGIN TRANSACTION + +CREATE TABLE dbo.Tmp_estate_settings + ( + EstateID int NOT NULL IDENTITY (1, 100), + EstateName varchar(64) NULL DEFAULT (NULL), + AbuseEmailToEstateOwner bit NOT NULL, + DenyAnonymous bit NOT NULL, + ResetHomeOnTeleport bit NOT NULL, + FixedSun bit NOT NULL, + DenyTransacted bit NOT NULL, + BlockDwell bit NOT NULL, + DenyIdentified bit NOT NULL, + AllowVoice bit NOT NULL, + UseGlobalTime bit NOT NULL, + PricePerMeter int NOT NULL, + TaxFree bit NOT NULL, + AllowDirectTeleport bit NOT NULL, + RedirectGridX int NOT NULL, + RedirectGridY int NOT NULL, + ParentEstateID int NOT NULL, + SunPosition float(53) NOT NULL, + EstateSkipScripts bit NOT NULL, + BillableFactor float(53) NOT NULL, + PublicAccess bit NOT NULL, + AbuseEmail varchar(255) NOT NULL, + EstateOwner uniqueidentifier NOT NULL, + DenyMinors bit NOT NULL + ) ON [PRIMARY] + +SET IDENTITY_INSERT dbo.Tmp_estate_settings ON + +IF EXISTS(SELECT * FROM dbo.estate_settings) + EXEC('INSERT INTO dbo.Tmp_estate_settings (EstateID, EstateName, AbuseEmailToEstateOwner, DenyAnonymous, ResetHomeOnTeleport, FixedSun, DenyTransacted, BlockDwell, DenyIdentified, AllowVoice, UseGlobalTime, PricePerMeter, TaxFree, AllowDirectTeleport, RedirectGridX, RedirectGridY, ParentEstateID, SunPosition, EstateSkipScripts, BillableFactor, PublicAccess, AbuseEmail, EstateOwner, DenyMinors) + SELECT EstateID, EstateName, AbuseEmailToEstateOwner, DenyAnonymous, ResetHomeOnTeleport, FixedSun, DenyTransacted, BlockDwell, DenyIdentified, AllowVoice, UseGlobalTime, PricePerMeter, TaxFree, AllowDirectTeleport, RedirectGridX, RedirectGridY, ParentEstateID, SunPosition, EstateSkipScripts, BillableFactor, PublicAccess, AbuseEmail, CONVERT(uniqueidentifier, EstateOwner), DenyMinors FROM dbo.estate_settings WITH (HOLDLOCK TABLOCKX)') + +SET IDENTITY_INSERT dbo.Tmp_estate_settings OFF + +DROP TABLE dbo.estate_settings + +EXECUTE sp_rename N'dbo.Tmp_estate_settings', N'estate_settings', 'OBJECT' + +ALTER TABLE dbo.estate_settings ADD CONSTRAINT + PK_estate_settings PRIMARY KEY CLUSTERED + ( + EstateID + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +COMMIT + + +:VERSION 9 + +BEGIN TRANSACTION + +CREATE TABLE dbo.Tmp_estate_map + ( + RegionID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'), + EstateID int NOT NULL + ) ON [PRIMARY] + +IF EXISTS(SELECT * FROM dbo.estate_map) + EXEC('INSERT INTO dbo.Tmp_estate_map (RegionID, EstateID) + SELECT CONVERT(uniqueidentifier, RegionID), EstateID FROM dbo.estate_map WITH (HOLDLOCK TABLOCKX)') + +DROP TABLE dbo.estate_map + +EXECUTE sp_rename N'dbo.Tmp_estate_map', N'estate_map', 'OBJECT' + +ALTER TABLE dbo.estate_map ADD CONSTRAINT + PK_estate_map PRIMARY KEY CLUSTERED + ( + RegionID + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + + +COMMIT + + diff --git a/OpenSim/Data/MSSQL/Resources/FriendsStore.migrations b/OpenSim/Data/MSSQL/Resources/FriendsStore.migrations new file mode 100644 index 0000000..f981a91 --- /dev/null +++ b/OpenSim/Data/MSSQL/Resources/FriendsStore.migrations @@ -0,0 +1,20 @@ +:VERSION 1 + +BEGIN TRANSACTION + +CREATE TABLE [Friends] ( +[PrincipalID] uniqueidentifier NOT NULL, +[Friend] varchar(255) NOT NULL, +[Flags] char(16) NOT NULL DEFAULT '0', +[Offered] varchar(32) NOT NULL DEFAULT 0) + ON [PRIMARY] + +COMMIT + +:VERSION 2 + +BEGIN TRANSACTION + +INSERT INTO Friends (PrincipalID, Friend, Flags, Offered) SELECT [ownerID], [friendID], [friendPerms], 0 FROM userfriends; + +COMMIT \ No newline at end of file diff --git a/OpenSim/Data/MSSQL/Resources/GridStore.migrations b/OpenSim/Data/MSSQL/Resources/GridStore.migrations new file mode 100644 index 0000000..d2ca27a --- /dev/null +++ b/OpenSim/Data/MSSQL/Resources/GridStore.migrations @@ -0,0 +1,225 @@ +:VERSION 1 + +BEGIN TRANSACTION + +CREATE TABLE [dbo].[regions]( + [regionHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL, + [regionName] [varchar](255) COLLATE Latin1_General_CI_AS NULL, + [uuid] [varchar](255) COLLATE Latin1_General_CI_AS NOT NULL, + [regionRecvKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL, + [regionSecret] [varchar](255) COLLATE Latin1_General_CI_AS NULL, + [regionSendKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL, + [regionDataURI] [varchar](255) COLLATE Latin1_General_CI_AS NULL, + [serverIP] [varchar](255) COLLATE Latin1_General_CI_AS NULL, + [serverPort] [varchar](255) COLLATE Latin1_General_CI_AS NULL, + [serverURI] [varchar](255) COLLATE Latin1_General_CI_AS NULL, + [locX] [varchar](255) COLLATE Latin1_General_CI_AS NULL, + [locY] [varchar](255) COLLATE Latin1_General_CI_AS NULL, + [locZ] [varchar](255) COLLATE Latin1_General_CI_AS NULL, + [eastOverrideHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL, + [westOverrideHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL, + [southOverrideHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL, + [northOverrideHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL, + [regionAssetURI] [varchar](255) COLLATE Latin1_General_CI_AS NULL, + [regionAssetRecvKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL, + [regionAssetSendKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL, + [regionUserURI] [varchar](255) COLLATE Latin1_General_CI_AS NULL, + [regionUserRecvKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL, + [regionUserSendKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL, + [regionMapTexture] [varchar](255) COLLATE Latin1_General_CI_AS NULL, + [serverHttpPort] [varchar](255) COLLATE Latin1_General_CI_AS NULL, + [serverRemotingPort] [varchar](255) COLLATE Latin1_General_CI_AS NULL, + [owner_uuid] [varchar](36) COLLATE Latin1_General_CI_AS NULL, +PRIMARY KEY CLUSTERED +( + [uuid] ASC +)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] +) ON [PRIMARY] + +COMMIT + + +:VERSION 2 + +BEGIN TRANSACTION + +CREATE TABLE Tmp_regions + ( + uuid varchar(36) COLLATE Latin1_General_CI_AS NOT NULL, + regionHandle bigint NULL, + regionName varchar(20) NULL, + regionRecvKey varchar(128) NULL, + regionSendKey varchar(128) NULL, + regionSecret varchar(128) NULL, + regionDataURI varchar(128) NULL, + serverIP varchar(64) NULL, + serverPort int NULL, + serverURI varchar(255) NULL, + locX int NULL, + locY int NULL, + locZ int NULL, + eastOverrideHandle bigint NULL, + westOverrideHandle bigint NULL, + southOverrideHandle bigint NULL, + northOverrideHandle bigint NULL, + regionAssetURI varchar(255) NULL, + regionAssetRecvKey varchar(128) NULL, + regionAssetSendKey varchar(128) NULL, + regionUserURI varchar(255) NULL, + regionUserRecvKey varchar(128) NULL, + regionUserSendKey varchar(128) NULL, + regionMapTexture varchar(36) NULL, + serverHttpPort int NULL, + serverRemotingPort int NULL, + owner_uuid varchar(36) NULL, + originUUID varchar(36) NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000') + ) ON [PRIMARY] + +IF EXISTS(SELECT * FROM regions) + EXEC('INSERT INTO Tmp_regions (uuid, regionHandle, regionName, regionRecvKey, regionSendKey, regionSecret, regionDataURI, serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey, regionMapTexture, serverHttpPort, serverRemotingPort, owner_uuid) + SELECT CONVERT(varchar(36), uuid), CONVERT(bigint, regionHandle), CONVERT(varchar(20), regionName), CONVERT(varchar(128), regionRecvKey), CONVERT(varchar(128), regionSendKey), CONVERT(varchar(128), regionSecret), CONVERT(varchar(128), regionDataURI), CONVERT(varchar(64), serverIP), CONVERT(int, serverPort), serverURI, CONVERT(int, locX), CONVERT(int, locY), CONVERT(int, locZ), CONVERT(bigint, eastOverrideHandle), CONVERT(bigint, westOverrideHandle), CONVERT(bigint, southOverrideHandle), CONVERT(bigint, northOverrideHandle), regionAssetURI, CONVERT(varchar(128), regionAssetRecvKey), CONVERT(varchar(128), regionAssetSendKey), regionUserURI, CONVERT(varchar(128), regionUserRecvKey), CONVERT(varchar(128), regionUserSendKey), CONVERT(varchar(36), regionMapTexture), CONVERT(int, serverHttpPort), CONVERT(int, serverRemotingPort), owner_uuid FROM regions') + +DROP TABLE regions + +EXECUTE sp_rename N'Tmp_regions', N'regions', 'OBJECT' + +ALTER TABLE regions ADD CONSTRAINT + PK__regions__uuid PRIMARY KEY CLUSTERED + ( + uuid + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +COMMIT + +:VERSION 3 + +BEGIN TRANSACTION + +CREATE NONCLUSTERED INDEX IX_regions_name ON dbo.regions + ( + regionName + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +CREATE NONCLUSTERED INDEX IX_regions_handle ON dbo.regions + ( + regionHandle + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + + +CREATE NONCLUSTERED INDEX IX_regions_override ON dbo.regions + ( + eastOverrideHandle, + westOverrideHandle, + southOverrideHandle, + northOverrideHandle + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +COMMIT + + +:VERSION 4 + +/* To prevent any potential data loss issues, you should review this script in detail before running it outside the context of the database designer.*/ +BEGIN TRANSACTION + +CREATE TABLE dbo.Tmp_regions + ( + uuid uniqueidentifier NOT NULL, + regionHandle bigint NULL, + regionName varchar(20) NULL, + regionRecvKey varchar(128) NULL, + regionSendKey varchar(128) NULL, + regionSecret varchar(128) NULL, + regionDataURI varchar(128) NULL, + serverIP varchar(64) NULL, + serverPort int NULL, + serverURI varchar(255) NULL, + locX int NULL, + locY int NULL, + locZ int NULL, + eastOverrideHandle bigint NULL, + westOverrideHandle bigint NULL, + southOverrideHandle bigint NULL, + northOverrideHandle bigint NULL, + regionAssetURI varchar(255) NULL, + regionAssetRecvKey varchar(128) NULL, + regionAssetSendKey varchar(128) NULL, + regionUserURI varchar(255) NULL, + regionUserRecvKey varchar(128) NULL, + regionUserSendKey varchar(128) NULL, + regionMapTexture uniqueidentifier NULL, + serverHttpPort int NULL, + serverRemotingPort int NULL, + owner_uuid uniqueidentifier NOT NULL, + originUUID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000') + ) ON [PRIMARY] + +IF EXISTS(SELECT * FROM dbo.regions) + EXEC('INSERT INTO dbo.Tmp_regions (uuid, regionHandle, regionName, regionRecvKey, regionSendKey, regionSecret, regionDataURI, serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey, regionMapTexture, serverHttpPort, serverRemotingPort, owner_uuid, originUUID) + SELECT CONVERT(uniqueidentifier, uuid), regionHandle, regionName, regionRecvKey, regionSendKey, regionSecret, regionDataURI, serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey, CONVERT(uniqueidentifier, regionMapTexture), serverHttpPort, serverRemotingPort, CONVERT(uniqueidentifier, owner_uuid), CONVERT(uniqueidentifier, originUUID) FROM dbo.regions WITH (HOLDLOCK TABLOCKX)') + +DROP TABLE dbo.regions + +EXECUTE sp_rename N'dbo.Tmp_regions', N'regions', 'OBJECT' + +ALTER TABLE dbo.regions ADD CONSTRAINT + PK__regions__uuid PRIMARY KEY CLUSTERED + ( + uuid + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +CREATE NONCLUSTERED INDEX IX_regions_name ON dbo.regions + ( + regionName + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +CREATE NONCLUSTERED INDEX IX_regions_handle ON dbo.regions + ( + regionHandle + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +CREATE NONCLUSTERED INDEX IX_regions_override ON dbo.regions + ( + eastOverrideHandle, + westOverrideHandle, + southOverrideHandle, + northOverrideHandle + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +COMMIT + + +:VERSION 5 + +BEGIN TRANSACTION + +ALTER TABLE regions ADD access int default 0; + +COMMIT + + +:VERSION 6 + +BEGIN TRANSACTION + +ALTER TABLE regions ADD scopeid uniqueidentifier default '00000000-0000-0000-0000-000000000000'; +ALTER TABLE regions ADD DEFAULT ('00000000-0000-0000-0000-000000000000') FOR [owner_uuid]; +ALTER TABLE regions ADD sizeX integer not null default 0; +ALTER TABLE regions ADD sizeY integer not null default 0; + +COMMIT + + +:VERSION 7 + +BEGIN TRANSACTION + +ALTER TABLE regions ADD [flags] integer NOT NULL DEFAULT 0; +CREATE INDEX [flags] ON regions(flags); +ALTER TABLE [regions] ADD [last_seen] integer NOT NULL DEFAULT 0; +ALTER TABLE [regions] ADD [PrincipalID] uniqueidentifier NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000'; +ALTER TABLE [regions] ADD [Token] varchar(255) NOT NULL DEFAULT 0; + +COMMIT + + diff --git a/OpenSim/Data/MSSQL/Resources/InventoryStore.migrations b/OpenSim/Data/MSSQL/Resources/InventoryStore.migrations new file mode 100644 index 0000000..cd5dfdc --- /dev/null +++ b/OpenSim/Data/MSSQL/Resources/InventoryStore.migrations @@ -0,0 +1,174 @@ +:VERSION 1 + +BEGIN TRANSACTION + +CREATE TABLE [inventoryfolders] ( + [folderID] [varchar](36) NOT NULL default '', + [agentID] [varchar](36) default NULL, + [parentFolderID] [varchar](36) default NULL, + [folderName] [varchar](64) default NULL, + [type] [smallint] NOT NULL default 0, + [version] [int] NOT NULL default 0, + PRIMARY KEY CLUSTERED +( + [folderID] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + +CREATE NONCLUSTERED INDEX [owner] ON [inventoryfolders] +( + [agentID] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +CREATE NONCLUSTERED INDEX [parent] ON [inventoryfolders] +( + [parentFolderID] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + + +CREATE TABLE [inventoryitems] ( + [inventoryID] [varchar](36) NOT NULL default '', + [assetID] [varchar](36) default NULL, + [assetType] [int] default NULL, + [parentFolderID] [varchar](36) default NULL, + [avatarID] [varchar](36) default NULL, + [inventoryName] [varchar](64) default NULL, + [inventoryDescription] [varchar](128) default NULL, + [inventoryNextPermissions] [int] default NULL, + [inventoryCurrentPermissions] [int] default NULL, + [invType] [int] default NULL, + [creatorID] [varchar](36) default NULL, + [inventoryBasePermissions] [int] NOT NULL default 0, + [inventoryEveryOnePermissions] [int] NOT NULL default 0, + [salePrice] [int] default NULL, + [saleType] [tinyint] default NULL, + [creationDate] [int] default NULL, + [groupID] [varchar](36) default NULL, + [groupOwned] [bit] default NULL, + [flags] [int] default NULL, + PRIMARY KEY CLUSTERED +( + [inventoryID] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + + +CREATE NONCLUSTERED INDEX [owner] ON [inventoryitems] +( + [avatarID] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +CREATE NONCLUSTERED INDEX [folder] ON [inventoryitems] +( + [parentFolderID] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +COMMIT + + +:VERSION 2 + +BEGIN TRANSACTION + +ALTER TABLE inventoryitems ADD inventoryGroupPermissions INTEGER NOT NULL default 0 + +COMMIT + +:VERSION 3 + +/* To prevent any potential data loss issues, you should review this script in detail before running it outside the context of the database designer.*/ +BEGIN TRANSACTION + +CREATE TABLE dbo.Tmp_inventoryfolders + ( + folderID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'), + agentID uniqueidentifier NULL DEFAULT (NULL), + parentFolderID uniqueidentifier NULL DEFAULT (NULL), + folderName varchar(64) NULL DEFAULT (NULL), + type smallint NOT NULL DEFAULT ((0)), + version int NOT NULL DEFAULT ((0)) + ) ON [PRIMARY] + +IF EXISTS(SELECT * FROM dbo.inventoryfolders) + EXEC('INSERT INTO dbo.Tmp_inventoryfolders (folderID, agentID, parentFolderID, folderName, type, version) + SELECT CONVERT(uniqueidentifier, folderID), CONVERT(uniqueidentifier, agentID), CONVERT(uniqueidentifier, parentFolderID), folderName, type, version FROM dbo.inventoryfolders WITH (HOLDLOCK TABLOCKX)') + +DROP TABLE dbo.inventoryfolders + +EXECUTE sp_rename N'dbo.Tmp_inventoryfolders', N'inventoryfolders', 'OBJECT' + +ALTER TABLE dbo.inventoryfolders ADD CONSTRAINT + PK__inventor__C2FABFB3173876EA PRIMARY KEY CLUSTERED + ( + folderID + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +CREATE NONCLUSTERED INDEX owner ON dbo.inventoryfolders + ( + agentID + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +CREATE NONCLUSTERED INDEX parent ON dbo.inventoryfolders + ( + parentFolderID + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +COMMIT + + +:VERSION 4 + +BEGIN TRANSACTION + +CREATE TABLE dbo.Tmp_inventoryitems + ( + inventoryID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'), + assetID uniqueidentifier NULL DEFAULT (NULL), + assetType int NULL DEFAULT (NULL), + parentFolderID uniqueidentifier NULL DEFAULT (NULL), + avatarID uniqueidentifier NULL DEFAULT (NULL), + inventoryName varchar(64) NULL DEFAULT (NULL), + inventoryDescription varchar(128) NULL DEFAULT (NULL), + inventoryNextPermissions int NULL DEFAULT (NULL), + inventoryCurrentPermissions int NULL DEFAULT (NULL), + invType int NULL DEFAULT (NULL), + creatorID uniqueidentifier NULL DEFAULT (NULL), + inventoryBasePermissions int NOT NULL DEFAULT ((0)), + inventoryEveryOnePermissions int NOT NULL DEFAULT ((0)), + salePrice int NULL DEFAULT (NULL), + saleType tinyint NULL DEFAULT (NULL), + creationDate int NULL DEFAULT (NULL), + groupID uniqueidentifier NULL DEFAULT (NULL), + groupOwned bit NULL DEFAULT (NULL), + flags int NULL DEFAULT (NULL), + inventoryGroupPermissions int NOT NULL DEFAULT ((0)) + ) ON [PRIMARY] + +IF EXISTS(SELECT * FROM dbo.inventoryitems) + EXEC('INSERT INTO dbo.Tmp_inventoryitems (inventoryID, assetID, assetType, parentFolderID, avatarID, inventoryName, inventoryDescription, inventoryNextPermissions, inventoryCurrentPermissions, invType, creatorID, inventoryBasePermissions, inventoryEveryOnePermissions, salePrice, saleType, creationDate, groupID, groupOwned, flags, inventoryGroupPermissions) + SELECT CONVERT(uniqueidentifier, inventoryID), CONVERT(uniqueidentifier, assetID), assetType, CONVERT(uniqueidentifier, parentFolderID), CONVERT(uniqueidentifier, avatarID), inventoryName, inventoryDescription, inventoryNextPermissions, inventoryCurrentPermissions, invType, CONVERT(uniqueidentifier, creatorID), inventoryBasePermissions, inventoryEveryOnePermissions, salePrice, saleType, creationDate, CONVERT(uniqueidentifier, groupID), groupOwned, flags, inventoryGroupPermissions FROM dbo.inventoryitems WITH (HOLDLOCK TABLOCKX)') + +DROP TABLE dbo.inventoryitems + +EXECUTE sp_rename N'dbo.Tmp_inventoryitems', N'inventoryitems', 'OBJECT' + +ALTER TABLE dbo.inventoryitems ADD CONSTRAINT + PK__inventor__C4B7BC2220C1E124 PRIMARY KEY CLUSTERED + ( + inventoryID + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + + +CREATE NONCLUSTERED INDEX owner ON dbo.inventoryitems + ( + avatarID + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +CREATE NONCLUSTERED INDEX folder ON dbo.inventoryitems + ( + parentFolderID + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +COMMIT + + diff --git a/OpenSim/Data/MSSQL/Resources/LogStore.migrations b/OpenSim/Data/MSSQL/Resources/LogStore.migrations new file mode 100644 index 0000000..1430d8d --- /dev/null +++ b/OpenSim/Data/MSSQL/Resources/LogStore.migrations @@ -0,0 +1,19 @@ +:VERSION 1 + +BEGIN TRANSACTION + +CREATE TABLE [logs] ( + [logID] [int] NOT NULL, + [target] [varchar](36) default NULL, + [server] [varchar](64) default NULL, + [method] [varchar](64) default NULL, + [arguments] [varchar](255) default NULL, + [priority] [int] default NULL, + [message] [ntext], + PRIMARY KEY CLUSTERED +( + [logID] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + +COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/Presence.migrations b/OpenSim/Data/MSSQL/Resources/Presence.migrations new file mode 100644 index 0000000..35f78e1 --- /dev/null +++ b/OpenSim/Data/MSSQL/Resources/Presence.migrations @@ -0,0 +1,30 @@ +:VERSION 1 + +BEGIN TRANSACTION + +CREATE TABLE [Presence] ( +[UserID] varchar(255) NOT NULL, +[RegionID] uniqueidentifier NOT NULL, +[SessionID] uniqueidentifier NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', +[SecureSessionID] uniqueidentifier NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', +[Online] char(5) NOT NULL DEFAULT 'false', +[Login] char(16) NOT NULL DEFAULT '0', +[Logout] char(16) NOT NULL DEFAULT '0', +[Position] char(64) NOT NULL DEFAULT '<0,0,0>', +[LookAt] char(64) NOT NULL DEFAULT '<0,0,0>', +[HomeRegionID] uniqueidentifier NOT NULL, +[HomePosition] CHAR(64) NOT NULL DEFAULT '<0,0,0>', +[HomeLookAt] CHAR(64) NOT NULL DEFAULT '<0,0,0>', +) + ON [PRIMARY] + +COMMIT + +:VERSION 2 + +BEGIN TRANSACTION + +CREATE UNIQUE INDEX SessionID ON Presence(SessionID); +CREATE INDEX UserID ON Presence(UserID); + +COMMIT \ No newline at end of file diff --git a/OpenSim/Data/MSSQL/Resources/RegionStore.migrations b/OpenSim/Data/MSSQL/Resources/RegionStore.migrations new file mode 100644 index 0000000..e912d64 --- /dev/null +++ b/OpenSim/Data/MSSQL/Resources/RegionStore.migrations @@ -0,0 +1,929 @@ + +:VERSION 1 + +CREATE TABLE [dbo].[prims]( + [UUID] [varchar](255) NOT NULL, + [RegionUUID] [varchar](255) NULL, + [ParentID] [int] NULL, + [CreationDate] [int] NULL, + [Name] [varchar](255) NULL, + [SceneGroupID] [varchar](255) NULL, + [Text] [varchar](255) NULL, + [Description] [varchar](255) NULL, + [SitName] [varchar](255) NULL, + [TouchName] [varchar](255) NULL, + [ObjectFlags] [int] NULL, + [CreatorID] [varchar](255) NULL, + [OwnerID] [varchar](255) NULL, + [GroupID] [varchar](255) NULL, + [LastOwnerID] [varchar](255) NULL, + [OwnerMask] [int] NULL, + [NextOwnerMask] [int] NULL, + [GroupMask] [int] NULL, + [EveryoneMask] [int] NULL, + [BaseMask] [int] NULL, + [PositionX] [float] NULL, + [PositionY] [float] NULL, + [PositionZ] [float] NULL, + [GroupPositionX] [float] NULL, + [GroupPositionY] [float] NULL, + [GroupPositionZ] [float] NULL, + [VelocityX] [float] NULL, + [VelocityY] [float] NULL, + [VelocityZ] [float] NULL, + [AngularVelocityX] [float] NULL, + [AngularVelocityY] [float] NULL, + [AngularVelocityZ] [float] NULL, + [AccelerationX] [float] NULL, + [AccelerationY] [float] NULL, + [AccelerationZ] [float] NULL, + [RotationX] [float] NULL, + [RotationY] [float] NULL, + [RotationZ] [float] NULL, + [RotationW] [float] NULL, + [SitTargetOffsetX] [float] NULL, + [SitTargetOffsetY] [float] NULL, + [SitTargetOffsetZ] [float] NULL, + [SitTargetOrientW] [float] NULL, + [SitTargetOrientX] [float] NULL, + [SitTargetOrientY] [float] NULL, + [SitTargetOrientZ] [float] NULL, +PRIMARY KEY CLUSTERED +( + [UUID] ASC +)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] +) ON [PRIMARY] + +CREATE TABLE [dbo].[primshapes]( + [UUID] [varchar](255) NOT NULL, + [Shape] [int] NULL, + [ScaleX] [float] NULL, + [ScaleY] [float] NULL, + [ScaleZ] [float] NULL, + [PCode] [int] NULL, + [PathBegin] [int] NULL, + [PathEnd] [int] NULL, + [PathScaleX] [int] NULL, + [PathScaleY] [int] NULL, + [PathShearX] [int] NULL, + [PathShearY] [int] NULL, + [PathSkew] [int] NULL, + [PathCurve] [int] NULL, + [PathRadiusOffset] [int] NULL, + [PathRevolutions] [int] NULL, + [PathTaperX] [int] NULL, + [PathTaperY] [int] NULL, + [PathTwist] [int] NULL, + [PathTwistBegin] [int] NULL, + [ProfileBegin] [int] NULL, + [ProfileEnd] [int] NULL, + [ProfileCurve] [int] NULL, + [ProfileHollow] [int] NULL, + [State] [int] NULL, + [Texture] [image] NULL, + [ExtraParams] [image] NULL, +PRIMARY KEY CLUSTERED +( + [UUID] ASC +)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] +) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] + +CREATE TABLE [dbo].[primitems]( + [itemID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, + [primID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, + [assetID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, + [parentFolderID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, + [invType] [int] NULL, + [assetType] [int] NULL, + [name] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, + [description] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, + [creationDate] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, + [creatorID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, + [ownerID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, + [lastOwnerID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, + [groupID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, + [nextPermissions] [int] NULL, + [currentPermissions] [int] NULL, + [basePermissions] [int] NULL, + [everyonePermissions] [int] NULL, + [groupPermissions] [int] NULL, +PRIMARY KEY CLUSTERED +( + [itemID] ASC +)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] +) ON [PRIMARY] + +CREATE TABLE [dbo].[terrain]( + [RegionUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, + [Revision] [int] NULL, + [Heightfield] [image] NULL +) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] + +CREATE TABLE [dbo].[land]( + [UUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, + [RegionUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, + [LocalLandID] [int] NULL, + [Bitmap] [image] NULL, + [Name] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, + [Description] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, + [OwnerUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, + [IsGroupOwned] [int] NULL, + [Area] [int] NULL, + [AuctionID] [int] NULL, + [Category] [int] NULL, + [ClaimDate] [int] NULL, + [ClaimPrice] [int] NULL, + [GroupUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, + [SalePrice] [int] NULL, + [LandStatus] [int] NULL, + [LandFlags] [int] NULL, + [LandingType] [int] NULL, + [MediaAutoScale] [int] NULL, + [MediaTextureUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, + [MediaURL] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, + [MusicURL] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, + [PassHours] [float] NULL, + [PassPrice] [int] NULL, + [SnapshotUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, + [UserLocationX] [float] NULL, + [UserLocationY] [float] NULL, + [UserLocationZ] [float] NULL, + [UserLookAtX] [float] NULL, + [UserLookAtY] [float] NULL, + [UserLookAtZ] [float] NULL, +PRIMARY KEY CLUSTERED +( + [UUID] ASC +)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] +) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] + +CREATE TABLE [dbo].[landaccesslist]( + [LandUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, + [AccessUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, + [Flags] [int] NULL +) ON [PRIMARY] + +:VERSION 2 + +BEGIN TRANSACTION + +CREATE TABLE regionban ( + [regionUUID] VARCHAR(36) NOT NULL, + [bannedUUID] VARCHAR(36) NOT NULL, + [bannedIp] VARCHAR(16) NOT NULL, + [bannedIpHostMask] VARCHAR(16) NOT NULL) + +create table [dbo].[regionsettings] ( + [regionUUID] [varchar](36) not null, + [block_terraform] [bit] not null, + [block_fly] [bit] not null, + [allow_damage] [bit] not null, + [restrict_pushing] [bit] not null, + [allow_land_resell] [bit] not null, + [allow_land_join_divide] [bit] not null, + [block_show_in_search] [bit] not null, + [agent_limit] [int] not null, + [object_bonus] [float] not null, + [maturity] [int] not null, + [disable_scripts] [bit] not null, + [disable_collisions] [bit] not null, + [disable_physics] [bit] not null, + [terrain_texture_1] [varchar](36) not null, + [terrain_texture_2] [varchar](36) not null, + [terrain_texture_3] [varchar](36) not null, + [terrain_texture_4] [varchar](36) not null, + [elevation_1_nw] [float] not null, + [elevation_2_nw] [float] not null, + [elevation_1_ne] [float] not null, + [elevation_2_ne] [float] not null, + [elevation_1_se] [float] not null, + [elevation_2_se] [float] not null, + [elevation_1_sw] [float] not null, + [elevation_2_sw] [float] not null, + [water_height] [float] not null, + [terrain_raise_limit] [float] not null, + [terrain_lower_limit] [float] not null, + [use_estate_sun] [bit] not null, + [fixed_sun] [bit] not null, + [sun_position] [float] not null, + [covenant] [varchar](36) default NULL, + [Sandbox] [bit] NOT NULL, +PRIMARY KEY CLUSTERED +( + [regionUUID] ASC +)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] +) ON [PRIMARY] + +COMMIT + +:VERSION 3 + +BEGIN TRANSACTION + +CREATE TABLE dbo.Tmp_prims + ( + UUID varchar(36) NOT NULL, + RegionUUID varchar(36) NULL, + ParentID int NULL, + CreationDate int NULL, + Name varchar(255) NULL, + SceneGroupID varchar(36) NULL, + Text varchar(255) NULL, + Description varchar(255) NULL, + SitName varchar(255) NULL, + TouchName varchar(255) NULL, + ObjectFlags int NULL, + CreatorID varchar(36) NULL, + OwnerID varchar(36) NULL, + GroupID varchar(36) NULL, + LastOwnerID varchar(36) NULL, + OwnerMask int NULL, + NextOwnerMask int NULL, + GroupMask int NULL, + EveryoneMask int NULL, + BaseMask int NULL, + PositionX float(53) NULL, + PositionY float(53) NULL, + PositionZ float(53) NULL, + GroupPositionX float(53) NULL, + GroupPositionY float(53) NULL, + GroupPositionZ float(53) NULL, + VelocityX float(53) NULL, + VelocityY float(53) NULL, + VelocityZ float(53) NULL, + AngularVelocityX float(53) NULL, + AngularVelocityY float(53) NULL, + AngularVelocityZ float(53) NULL, + AccelerationX float(53) NULL, + AccelerationY float(53) NULL, + AccelerationZ float(53) NULL, + RotationX float(53) NULL, + RotationY float(53) NULL, + RotationZ float(53) NULL, + RotationW float(53) NULL, + SitTargetOffsetX float(53) NULL, + SitTargetOffsetY float(53) NULL, + SitTargetOffsetZ float(53) NULL, + SitTargetOrientW float(53) NULL, + SitTargetOrientX float(53) NULL, + SitTargetOrientY float(53) NULL, + SitTargetOrientZ float(53) NULL + ) ON [PRIMARY] + +IF EXISTS(SELECT * FROM dbo.prims) + EXEC('INSERT INTO dbo.Tmp_prims (UUID, RegionUUID, ParentID, CreationDate, Name, SceneGroupID, Text, Description, SitName, TouchName, ObjectFlags, CreatorID, OwnerID, GroupID, LastOwnerID, OwnerMask, NextOwnerMask, GroupMask, EveryoneMask, BaseMask, PositionX, PositionY, PositionZ, GroupPositionX, GroupPositionY, GroupPositionZ, VelocityX, VelocityY, VelocityZ, AngularVelocityX, AngularVelocityY, AngularVelocityZ, AccelerationX, AccelerationY, AccelerationZ, RotationX, RotationY, RotationZ, RotationW, SitTargetOffsetX, SitTargetOffsetY, SitTargetOffsetZ, SitTargetOrientW, SitTargetOrientX, SitTargetOrientY, SitTargetOrientZ) + SELECT CONVERT(varchar(36), UUID), CONVERT(varchar(36), RegionUUID), ParentID, CreationDate, Name, CONVERT(varchar(36), SceneGroupID), Text, Description, SitName, TouchName, ObjectFlags, CONVERT(varchar(36), CreatorID), CONVERT(varchar(36), OwnerID), CONVERT(varchar(36), GroupID), CONVERT(varchar(36), LastOwnerID), OwnerMask, NextOwnerMask, GroupMask, EveryoneMask, BaseMask, PositionX, PositionY, PositionZ, GroupPositionX, GroupPositionY, GroupPositionZ, VelocityX, VelocityY, VelocityZ, AngularVelocityX, AngularVelocityY, AngularVelocityZ, AccelerationX, AccelerationY, AccelerationZ, RotationX, RotationY, RotationZ, RotationW, SitTargetOffsetX, SitTargetOffsetY, SitTargetOffsetZ, SitTargetOrientW, SitTargetOrientX, SitTargetOrientY, SitTargetOrientZ FROM dbo.prims WITH (HOLDLOCK TABLOCKX)') + +DROP TABLE dbo.prims + +EXECUTE sp_rename N'dbo.Tmp_prims', N'prims', 'OBJECT' + +ALTER TABLE dbo.prims ADD CONSTRAINT + PK__prims__10566F31 PRIMARY KEY CLUSTERED + ( + UUID + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +COMMIT + +:VERSION 4 + +BEGIN TRANSACTION + +CREATE TABLE Tmp_primitems + ( + itemID varchar(36) NOT NULL, + primID varchar(36) NULL, + assetID varchar(36) NULL, + parentFolderID varchar(36) NULL, + invType int NULL, + assetType int NULL, + name varchar(255) NULL, + description varchar(255) NULL, + creationDate varchar(255) NULL, + creatorID varchar(36) NULL, + ownerID varchar(36) NULL, + lastOwnerID varchar(36) NULL, + groupID varchar(36) NULL, + nextPermissions int NULL, + currentPermissions int NULL, + basePermissions int NULL, + everyonePermissions int NULL, + groupPermissions int NULL + ) ON [PRIMARY] + +IF EXISTS(SELECT * FROM primitems) + EXEC('INSERT INTO Tmp_primitems (itemID, primID, assetID, parentFolderID, invType, assetType, name, description, creationDate, creatorID, ownerID, lastOwnerID, groupID, nextPermissions, currentPermissions, basePermissions, everyonePermissions, groupPermissions) + SELECT CONVERT(varchar(36), itemID), CONVERT(varchar(36), primID), CONVERT(varchar(36), assetID), CONVERT(varchar(36), parentFolderID), invType, assetType, name, description, creationDate, CONVERT(varchar(36), creatorID), CONVERT(varchar(36), ownerID), CONVERT(varchar(36), lastOwnerID), CONVERT(varchar(36), groupID), nextPermissions, currentPermissions, basePermissions, everyonePermissions, groupPermissions') + +DROP TABLE primitems + +EXECUTE sp_rename N'Tmp_primitems', N'primitems', 'OBJECT' + +ALTER TABLE primitems ADD CONSTRAINT + PK__primitems__0A688BB1 PRIMARY KEY CLUSTERED + ( + itemID + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + + +COMMIT + + +:VERSION 5 + +BEGIN TRANSACTION + +CREATE TABLE Tmp_primshapes + ( + UUID varchar(36) NOT NULL, + Shape int NULL, + ScaleX float(53) NULL, + ScaleY float(53) NULL, + ScaleZ float(53) NULL, + PCode int NULL, + PathBegin int NULL, + PathEnd int NULL, + PathScaleX int NULL, + PathScaleY int NULL, + PathShearX int NULL, + PathShearY int NULL, + PathSkew int NULL, + PathCurve int NULL, + PathRadiusOffset int NULL, + PathRevolutions int NULL, + PathTaperX int NULL, + PathTaperY int NULL, + PathTwist int NULL, + PathTwistBegin int NULL, + ProfileBegin int NULL, + ProfileEnd int NULL, + ProfileCurve int NULL, + ProfileHollow int NULL, + State int NULL, + Texture image NULL, + ExtraParams image NULL + ) ON [PRIMARY] + TEXTIMAGE_ON [PRIMARY] + +IF EXISTS(SELECT * FROM primshapes) + EXEC('INSERT INTO Tmp_primshapes (UUID, Shape, ScaleX, ScaleY, ScaleZ, PCode, PathBegin, PathEnd, PathScaleX, PathScaleY, PathShearX, PathShearY, PathSkew, PathCurve, PathRadiusOffset, PathRevolutions, PathTaperX, PathTaperY, PathTwist, PathTwistBegin, ProfileBegin, ProfileEnd, ProfileCurve, ProfileHollow, State, Texture, ExtraParams) + SELECT CONVERT(varchar(36), UUID), Shape, ScaleX, ScaleY, ScaleZ, PCode, PathBegin, PathEnd, PathScaleX, PathScaleY, PathShearX, PathShearY, PathSkew, PathCurve, PathRadiusOffset, PathRevolutions, PathTaperX, PathTaperY, PathTwist, PathTwistBegin, ProfileBegin, ProfileEnd, ProfileCurve, ProfileHollow, State, Texture, ExtraParams FROM primshapes WITH (HOLDLOCK TABLOCKX)') + +DROP TABLE primshapes + +EXECUTE sp_rename N'Tmp_primshapes', N'primshapes', 'OBJECT' + +ALTER TABLE primshapes ADD CONSTRAINT + PK__primshapes__0880433F PRIMARY KEY CLUSTERED + ( + UUID + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +COMMIT + + +:VERSION 6 + +BEGIN TRANSACTION + +ALTER TABLE prims ADD PayPrice int not null default 0 +ALTER TABLE prims ADD PayButton1 int not null default 0 +ALTER TABLE prims ADD PayButton2 int not null default 0 +ALTER TABLE prims ADD PayButton3 int not null default 0 +ALTER TABLE prims ADD PayButton4 int not null default 0 +ALTER TABLE prims ADD LoopedSound varchar(36) not null default '00000000-0000-0000-0000-000000000000'; +ALTER TABLE prims ADD LoopedSoundGain float not null default 0.0; +ALTER TABLE prims ADD TextureAnimation image +ALTER TABLE prims ADD OmegaX float not null default 0.0 +ALTER TABLE prims ADD OmegaY float not null default 0.0 +ALTER TABLE prims ADD OmegaZ float not null default 0.0 +ALTER TABLE prims ADD CameraEyeOffsetX float not null default 0.0 +ALTER TABLE prims ADD CameraEyeOffsetY float not null default 0.0 +ALTER TABLE prims ADD CameraEyeOffsetZ float not null default 0.0 +ALTER TABLE prims ADD CameraAtOffsetX float not null default 0.0 +ALTER TABLE prims ADD CameraAtOffsetY float not null default 0.0 +ALTER TABLE prims ADD CameraAtOffsetZ float not null default 0.0 +ALTER TABLE prims ADD ForceMouselook tinyint not null default 0 +ALTER TABLE prims ADD ScriptAccessPin int not null default 0 +ALTER TABLE prims ADD AllowedDrop tinyint not null default 0 +ALTER TABLE prims ADD DieAtEdge tinyint not null default 0 +ALTER TABLE prims ADD SalePrice int not null default 10 +ALTER TABLE prims ADD SaleType tinyint not null default 0 + +ALTER TABLE primitems add flags integer not null default 0 + +ALTER TABLE land ADD AuthbuyerID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000' + +CREATE index prims_regionuuid on prims(RegionUUID) +CREATE index prims_parentid on prims(ParentID) + +CREATE index primitems_primid on primitems(primID) + +COMMIT + + +:VERSION 7 + +BEGIN TRANSACTION + +ALTER TABLE prims ADD ColorR int not null default 0; +ALTER TABLE prims ADD ColorG int not null default 0; +ALTER TABLE prims ADD ColorB int not null default 0; +ALTER TABLE prims ADD ColorA int not null default 0; +ALTER TABLE prims ADD ParticleSystem IMAGE; +ALTER TABLE prims ADD ClickAction tinyint NOT NULL default 0; + +COMMIT + + +:VERSION 8 + +BEGIN TRANSACTION + +ALTER TABLE land ADD OtherCleanTime integer NOT NULL default 0; +ALTER TABLE land ADD Dwell integer NOT NULL default 0; + +COMMIT + +:VERSION 9 + +BEGIN TRANSACTION + +ALTER TABLE prims ADD Material tinyint NOT NULL default 3 + +COMMIT + + +:VERSION 10 + +BEGIN TRANSACTION + +ALTER TABLE regionsettings ADD sunvectorx float NOT NULL default 0; +ALTER TABLE regionsettings ADD sunvectory float NOT NULL default 0; +ALTER TABLE regionsettings ADD sunvectorz float NOT NULL default 0; + +COMMIT + + +:VERSION 11 + +BEGIN TRANSACTION + +ALTER TABLE prims ADD CollisionSound char(36) not null default '00000000-0000-0000-0000-000000000000' +ALTER TABLE prims ADD CollisionSoundVolume float not null default 0.0 + +COMMIT + + +:VERSION 12 + +BEGIN TRANSACTION + +ALTER TABLE prims ADD LinkNumber integer not null default 0 + +COMMIT + + +:VERSION 13 + +BEGIN TRANSACTION + +CREATE TABLE dbo.Tmp_prims + ( + UUID uniqueidentifier NOT NULL, + RegionUUID uniqueidentifier NULL, + ParentID int NULL, + CreationDate int NULL, + Name varchar(255) NULL, + SceneGroupID uniqueidentifier NULL, + Text varchar(255) NULL, + Description varchar(255) NULL, + SitName varchar(255) NULL, + TouchName varchar(255) NULL, + ObjectFlags int NULL, + CreatorID uniqueidentifier NULL, + OwnerID uniqueidentifier NULL, + GroupID uniqueidentifier NULL, + LastOwnerID uniqueidentifier NULL, + OwnerMask int NULL, + NextOwnerMask int NULL, + GroupMask int NULL, + EveryoneMask int NULL, + BaseMask int NULL, + PositionX float(53) NULL, + PositionY float(53) NULL, + PositionZ float(53) NULL, + GroupPositionX float(53) NULL, + GroupPositionY float(53) NULL, + GroupPositionZ float(53) NULL, + VelocityX float(53) NULL, + VelocityY float(53) NULL, + VelocityZ float(53) NULL, + AngularVelocityX float(53) NULL, + AngularVelocityY float(53) NULL, + AngularVelocityZ float(53) NULL, + AccelerationX float(53) NULL, + AccelerationY float(53) NULL, + AccelerationZ float(53) NULL, + RotationX float(53) NULL, + RotationY float(53) NULL, + RotationZ float(53) NULL, + RotationW float(53) NULL, + SitTargetOffsetX float(53) NULL, + SitTargetOffsetY float(53) NULL, + SitTargetOffsetZ float(53) NULL, + SitTargetOrientW float(53) NULL, + SitTargetOrientX float(53) NULL, + SitTargetOrientY float(53) NULL, + SitTargetOrientZ float(53) NULL, + PayPrice int NOT NULL DEFAULT ((0)), + PayButton1 int NOT NULL DEFAULT ((0)), + PayButton2 int NOT NULL DEFAULT ((0)), + PayButton3 int NOT NULL DEFAULT ((0)), + PayButton4 int NOT NULL DEFAULT ((0)), + LoopedSound uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'), + LoopedSoundGain float(53) NOT NULL DEFAULT ((0.0)), + TextureAnimation image NULL, + OmegaX float(53) NOT NULL DEFAULT ((0.0)), + OmegaY float(53) NOT NULL DEFAULT ((0.0)), + OmegaZ float(53) NOT NULL DEFAULT ((0.0)), + CameraEyeOffsetX float(53) NOT NULL DEFAULT ((0.0)), + CameraEyeOffsetY float(53) NOT NULL DEFAULT ((0.0)), + CameraEyeOffsetZ float(53) NOT NULL DEFAULT ((0.0)), + CameraAtOffsetX float(53) NOT NULL DEFAULT ((0.0)), + CameraAtOffsetY float(53) NOT NULL DEFAULT ((0.0)), + CameraAtOffsetZ float(53) NOT NULL DEFAULT ((0.0)), + ForceMouselook tinyint NOT NULL DEFAULT ((0)), + ScriptAccessPin int NOT NULL DEFAULT ((0)), + AllowedDrop tinyint NOT NULL DEFAULT ((0)), + DieAtEdge tinyint NOT NULL DEFAULT ((0)), + SalePrice int NOT NULL DEFAULT ((10)), + SaleType tinyint NOT NULL DEFAULT ((0)), + ColorR int NOT NULL DEFAULT ((0)), + ColorG int NOT NULL DEFAULT ((0)), + ColorB int NOT NULL DEFAULT ((0)), + ColorA int NOT NULL DEFAULT ((0)), + ParticleSystem image NULL, + ClickAction tinyint NOT NULL DEFAULT ((0)), + Material tinyint NOT NULL DEFAULT ((3)), + CollisionSound uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'), + CollisionSoundVolume float(53) NOT NULL DEFAULT ((0.0)), + LinkNumber int NOT NULL DEFAULT ((0)) + ) ON [PRIMARY] + TEXTIMAGE_ON [PRIMARY] + +IF EXISTS(SELECT * FROM dbo.prims) + EXEC('INSERT INTO dbo.Tmp_prims (UUID, RegionUUID, ParentID, CreationDate, Name, SceneGroupID, Text, Description, SitName, TouchName, ObjectFlags, CreatorID, OwnerID, GroupID, LastOwnerID, OwnerMask, NextOwnerMask, GroupMask, EveryoneMask, BaseMask, PositionX, PositionY, PositionZ, GroupPositionX, GroupPositionY, GroupPositionZ, VelocityX, VelocityY, VelocityZ, AngularVelocityX, AngularVelocityY, AngularVelocityZ, AccelerationX, AccelerationY, AccelerationZ, RotationX, RotationY, RotationZ, RotationW, SitTargetOffsetX, SitTargetOffsetY, SitTargetOffsetZ, SitTargetOrientW, SitTargetOrientX, SitTargetOrientY, SitTargetOrientZ, PayPrice, PayButton1, PayButton2, PayButton3, PayButton4, LoopedSound, LoopedSoundGain, TextureAnimation, OmegaX, OmegaY, OmegaZ, CameraEyeOffsetX, CameraEyeOffsetY, CameraEyeOffsetZ, CameraAtOffsetX, CameraAtOffsetY, CameraAtOffsetZ, ForceMouselook, ScriptAccessPin, AllowedDrop, DieAtEdge, SalePrice, SaleType, ColorR, ColorG, ColorB, ColorA, ParticleSystem, ClickAction, Material, CollisionSound, CollisionSoundVolume, LinkNumber) + SELECT CONVERT(uniqueidentifier, UUID), CONVERT(uniqueidentifier, RegionUUID), ParentID, CreationDate, Name, CONVERT(uniqueidentifier, SceneGroupID), Text, Description, SitName, TouchName, ObjectFlags, CONVERT(uniqueidentifier, CreatorID), CONVERT(uniqueidentifier, OwnerID), CONVERT(uniqueidentifier, GroupID), CONVERT(uniqueidentifier, LastOwnerID), OwnerMask, NextOwnerMask, GroupMask, EveryoneMask, BaseMask, PositionX, PositionY, PositionZ, GroupPositionX, GroupPositionY, GroupPositionZ, VelocityX, VelocityY, VelocityZ, AngularVelocityX, AngularVelocityY, AngularVelocityZ, AccelerationX, AccelerationY, AccelerationZ, RotationX, RotationY, RotationZ, RotationW, SitTargetOffsetX, SitTargetOffsetY, SitTargetOffsetZ, SitTargetOrientW, SitTargetOrientX, SitTargetOrientY, SitTargetOrientZ, PayPrice, PayButton1, PayButton2, PayButton3, PayButton4, CONVERT(uniqueidentifier, LoopedSound), LoopedSoundGain, TextureAnimation, OmegaX, OmegaY, OmegaZ, CameraEyeOffsetX, CameraEyeOffsetY, CameraEyeOffsetZ, CameraAtOffsetX, CameraAtOffsetY, CameraAtOffsetZ, ForceMouselook, ScriptAccessPin, AllowedDrop, DieAtEdge, SalePrice, SaleType, ColorR, ColorG, ColorB, ColorA, ParticleSystem, ClickAction, Material, CONVERT(uniqueidentifier, CollisionSound), CollisionSoundVolume, LinkNumber FROM dbo.prims WITH (HOLDLOCK TABLOCKX)') + +DROP TABLE dbo.prims + +EXECUTE sp_rename N'dbo.Tmp_prims', N'prims', 'OBJECT' + +ALTER TABLE dbo.prims ADD CONSTRAINT + PK__prims__10566F31 PRIMARY KEY CLUSTERED + ( + UUID + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + + +CREATE NONCLUSTERED INDEX prims_regionuuid ON dbo.prims + ( + RegionUUID + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +CREATE NONCLUSTERED INDEX prims_parentid ON dbo.prims + ( + ParentID + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +COMMIT + + +:VERSION 14 + +BEGIN TRANSACTION + +CREATE TABLE dbo.Tmp_primshapes + ( + UUID uniqueidentifier NOT NULL, + Shape int NULL, + ScaleX float(53) NULL, + ScaleY float(53) NULL, + ScaleZ float(53) NULL, + PCode int NULL, + PathBegin int NULL, + PathEnd int NULL, + PathScaleX int NULL, + PathScaleY int NULL, + PathShearX int NULL, + PathShearY int NULL, + PathSkew int NULL, + PathCurve int NULL, + PathRadiusOffset int NULL, + PathRevolutions int NULL, + PathTaperX int NULL, + PathTaperY int NULL, + PathTwist int NULL, + PathTwistBegin int NULL, + ProfileBegin int NULL, + ProfileEnd int NULL, + ProfileCurve int NULL, + ProfileHollow int NULL, + State int NULL, + Texture image NULL, + ExtraParams image NULL + ) ON [PRIMARY] + TEXTIMAGE_ON [PRIMARY] + +IF EXISTS(SELECT * FROM dbo.primshapes) + EXEC('INSERT INTO dbo.Tmp_primshapes (UUID, Shape, ScaleX, ScaleY, ScaleZ, PCode, PathBegin, PathEnd, PathScaleX, PathScaleY, PathShearX, PathShearY, PathSkew, PathCurve, PathRadiusOffset, PathRevolutions, PathTaperX, PathTaperY, PathTwist, PathTwistBegin, ProfileBegin, ProfileEnd, ProfileCurve, ProfileHollow, State, Texture, ExtraParams) + SELECT CONVERT(uniqueidentifier, UUID), Shape, ScaleX, ScaleY, ScaleZ, PCode, PathBegin, PathEnd, PathScaleX, PathScaleY, PathShearX, PathShearY, PathSkew, PathCurve, PathRadiusOffset, PathRevolutions, PathTaperX, PathTaperY, PathTwist, PathTwistBegin, ProfileBegin, ProfileEnd, ProfileCurve, ProfileHollow, State, Texture, ExtraParams FROM dbo.primshapes WITH (HOLDLOCK TABLOCKX)') + +DROP TABLE dbo.primshapes + +EXECUTE sp_rename N'dbo.Tmp_primshapes', N'primshapes', 'OBJECT' + +ALTER TABLE dbo.primshapes ADD CONSTRAINT + PK__primshapes__0880433F PRIMARY KEY CLUSTERED + ( + UUID + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +COMMIT + + +:VERSION 15 + +BEGIN TRANSACTION + +CREATE TABLE dbo.Tmp_primitems + ( + itemID uniqueidentifier NOT NULL, + primID uniqueidentifier NULL, + assetID uniqueidentifier NULL, + parentFolderID uniqueidentifier NULL, + invType int NULL, + assetType int NULL, + name varchar(255) NULL, + description varchar(255) NULL, + creationDate varchar(255) NULL, + creatorID uniqueidentifier NULL, + ownerID uniqueidentifier NULL, + lastOwnerID uniqueidentifier NULL, + groupID uniqueidentifier NULL, + nextPermissions int NULL, + currentPermissions int NULL, + basePermissions int NULL, + everyonePermissions int NULL, + groupPermissions int NULL, + flags int NOT NULL DEFAULT ((0)) + ) ON [PRIMARY] + +IF EXISTS(SELECT * FROM dbo.primitems) + EXEC('INSERT INTO dbo.Tmp_primitems (itemID, primID, assetID, parentFolderID, invType, assetType, name, description, creationDate, creatorID, ownerID, lastOwnerID, groupID, nextPermissions, currentPermissions, basePermissions, everyonePermissions, groupPermissions, flags) + SELECT CONVERT(uniqueidentifier, itemID), CONVERT(uniqueidentifier, primID), CONVERT(uniqueidentifier, assetID), CONVERT(uniqueidentifier, parentFolderID), invType, assetType, name, description, creationDate, CONVERT(uniqueidentifier, creatorID), CONVERT(uniqueidentifier, ownerID), CONVERT(uniqueidentifier, lastOwnerID), CONVERT(uniqueidentifier, groupID), nextPermissions, currentPermissions, basePermissions, everyonePermissions, groupPermissions, flags FROM dbo.primitems WITH (HOLDLOCK TABLOCKX)') + +DROP TABLE dbo.primitems + +EXECUTE sp_rename N'dbo.Tmp_primitems', N'primitems', 'OBJECT' + +ALTER TABLE dbo.primitems ADD CONSTRAINT + PK__primitems__0A688BB1 PRIMARY KEY CLUSTERED + ( + itemID + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +CREATE NONCLUSTERED INDEX primitems_primid ON dbo.primitems + ( + primID + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +COMMIT + + +:VERSION 16 + + +BEGIN TRANSACTION + +CREATE TABLE dbo.Tmp_terrain + ( + RegionUUID uniqueidentifier NULL, + Revision int NULL, + Heightfield image NULL + ) ON [PRIMARY] + TEXTIMAGE_ON [PRIMARY] + +IF EXISTS(SELECT * FROM dbo.terrain) + EXEC('INSERT INTO dbo.Tmp_terrain (RegionUUID, Revision, Heightfield) + SELECT CONVERT(uniqueidentifier, RegionUUID), Revision, Heightfield FROM dbo.terrain WITH (HOLDLOCK TABLOCKX)') + +DROP TABLE dbo.terrain + +EXECUTE sp_rename N'dbo.Tmp_terrain', N'terrain', 'OBJECT' + +COMMIT + + +:VERSION 17 + +BEGIN TRANSACTION + +CREATE TABLE dbo.Tmp_land + ( + UUID uniqueidentifier NOT NULL, + RegionUUID uniqueidentifier NULL, + LocalLandID int NULL, + Bitmap image NULL, + Name varchar(255) NULL, + Description varchar(255) NULL, + OwnerUUID uniqueidentifier NULL, + IsGroupOwned int NULL, + Area int NULL, + AuctionID int NULL, + Category int NULL, + ClaimDate int NULL, + ClaimPrice int NULL, + GroupUUID uniqueidentifier NULL, + SalePrice int NULL, + LandStatus int NULL, + LandFlags int NULL, + LandingType int NULL, + MediaAutoScale int NULL, + MediaTextureUUID uniqueidentifier NULL, + MediaURL varchar(255) NULL, + MusicURL varchar(255) NULL, + PassHours float(53) NULL, + PassPrice int NULL, + SnapshotUUID uniqueidentifier NULL, + UserLocationX float(53) NULL, + UserLocationY float(53) NULL, + UserLocationZ float(53) NULL, + UserLookAtX float(53) NULL, + UserLookAtY float(53) NULL, + UserLookAtZ float(53) NULL, + AuthbuyerID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'), + OtherCleanTime int NOT NULL DEFAULT ((0)), + Dwell int NOT NULL DEFAULT ((0)) + ) ON [PRIMARY] + TEXTIMAGE_ON [PRIMARY] + +IF EXISTS(SELECT * FROM dbo.land) + EXEC('INSERT INTO dbo.Tmp_land (UUID, RegionUUID, LocalLandID, Bitmap, Name, Description, OwnerUUID, IsGroupOwned, Area, AuctionID, Category, ClaimDate, ClaimPrice, GroupUUID, SalePrice, LandStatus, LandFlags, LandingType, MediaAutoScale, MediaTextureUUID, MediaURL, MusicURL, PassHours, PassPrice, SnapshotUUID, UserLocationX, UserLocationY, UserLocationZ, UserLookAtX, UserLookAtY, UserLookAtZ, AuthbuyerID, OtherCleanTime, Dwell) + SELECT CONVERT(uniqueidentifier, UUID), CONVERT(uniqueidentifier, RegionUUID), LocalLandID, Bitmap, Name, Description, CONVERT(uniqueidentifier, OwnerUUID), IsGroupOwned, Area, AuctionID, Category, ClaimDate, ClaimPrice, CONVERT(uniqueidentifier, GroupUUID), SalePrice, LandStatus, LandFlags, LandingType, MediaAutoScale, CONVERT(uniqueidentifier, MediaTextureUUID), MediaURL, MusicURL, PassHours, PassPrice, CONVERT(uniqueidentifier, SnapshotUUID), UserLocationX, UserLocationY, UserLocationZ, UserLookAtX, UserLookAtY, UserLookAtZ, CONVERT(uniqueidentifier, AuthbuyerID), OtherCleanTime, Dwell FROM dbo.land WITH (HOLDLOCK TABLOCKX)') + +DROP TABLE dbo.land + +EXECUTE sp_rename N'dbo.Tmp_land', N'land', 'OBJECT' + +ALTER TABLE dbo.land ADD CONSTRAINT + PK__land__65A475E71BFD2C07 PRIMARY KEY CLUSTERED + ( + UUID + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +COMMIT + + + +:VERSION 18 + +BEGIN TRANSACTION + +CREATE TABLE dbo.Tmp_landaccesslist + ( + LandUUID uniqueidentifier NULL, + AccessUUID uniqueidentifier NULL, + Flags int NULL + ) ON [PRIMARY] + +IF EXISTS(SELECT * FROM dbo.landaccesslist) + EXEC('INSERT INTO dbo.Tmp_landaccesslist (LandUUID, AccessUUID, Flags) + SELECT CONVERT(uniqueidentifier, LandUUID), CONVERT(uniqueidentifier, AccessUUID), Flags FROM dbo.landaccesslist WITH (HOLDLOCK TABLOCKX)') + +DROP TABLE dbo.landaccesslist + +EXECUTE sp_rename N'dbo.Tmp_landaccesslist', N'landaccesslist', 'OBJECT' + +COMMIT + + + +:VERSION 19 + +BEGIN TRANSACTION + +CREATE TABLE dbo.Tmp_regionban + ( + regionUUID uniqueidentifier NOT NULL, + bannedUUID uniqueidentifier NOT NULL, + bannedIp varchar(16) NOT NULL, + bannedIpHostMask varchar(16) NOT NULL + ) ON [PRIMARY] + +IF EXISTS(SELECT * FROM dbo.regionban) + EXEC('INSERT INTO dbo.Tmp_regionban (regionUUID, bannedUUID, bannedIp, bannedIpHostMask) + SELECT CONVERT(uniqueidentifier, regionUUID), CONVERT(uniqueidentifier, bannedUUID), bannedIp, bannedIpHostMask FROM dbo.regionban WITH (HOLDLOCK TABLOCKX)') + +DROP TABLE dbo.regionban + +EXECUTE sp_rename N'dbo.Tmp_regionban', N'regionban', 'OBJECT' + +COMMIT + + +:VERSION 20 + +BEGIN TRANSACTION + +CREATE TABLE dbo.Tmp_regionsettings + ( + regionUUID uniqueidentifier NOT NULL, + block_terraform bit NOT NULL, + block_fly bit NOT NULL, + allow_damage bit NOT NULL, + restrict_pushing bit NOT NULL, + allow_land_resell bit NOT NULL, + allow_land_join_divide bit NOT NULL, + block_show_in_search bit NOT NULL, + agent_limit int NOT NULL, + object_bonus float(53) NOT NULL, + maturity int NOT NULL, + disable_scripts bit NOT NULL, + disable_collisions bit NOT NULL, + disable_physics bit NOT NULL, + terrain_texture_1 uniqueidentifier NOT NULL, + terrain_texture_2 uniqueidentifier NOT NULL, + terrain_texture_3 uniqueidentifier NOT NULL, + terrain_texture_4 uniqueidentifier NOT NULL, + elevation_1_nw float(53) NOT NULL, + elevation_2_nw float(53) NOT NULL, + elevation_1_ne float(53) NOT NULL, + elevation_2_ne float(53) NOT NULL, + elevation_1_se float(53) NOT NULL, + elevation_2_se float(53) NOT NULL, + elevation_1_sw float(53) NOT NULL, + elevation_2_sw float(53) NOT NULL, + water_height float(53) NOT NULL, + terrain_raise_limit float(53) NOT NULL, + terrain_lower_limit float(53) NOT NULL, + use_estate_sun bit NOT NULL, + fixed_sun bit NOT NULL, + sun_position float(53) NOT NULL, + covenant uniqueidentifier NULL DEFAULT (NULL), + Sandbox bit NOT NULL, + sunvectorx float(53) NOT NULL DEFAULT ((0)), + sunvectory float(53) NOT NULL DEFAULT ((0)), + sunvectorz float(53) NOT NULL DEFAULT ((0)) + ) ON [PRIMARY] + +IF EXISTS(SELECT * FROM dbo.regionsettings) + EXEC('INSERT INTO dbo.Tmp_regionsettings (regionUUID, block_terraform, block_fly, allow_damage, restrict_pushing, allow_land_resell, allow_land_join_divide, block_show_in_search, agent_limit, object_bonus, maturity, disable_scripts, disable_collisions, disable_physics, terrain_texture_1, terrain_texture_2, terrain_texture_3, terrain_texture_4, elevation_1_nw, elevation_2_nw, elevation_1_ne, elevation_2_ne, elevation_1_se, elevation_2_se, elevation_1_sw, elevation_2_sw, water_height, terrain_raise_limit, terrain_lower_limit, use_estate_sun, fixed_sun, sun_position, covenant, Sandbox, sunvectorx, sunvectory, sunvectorz) + SELECT CONVERT(uniqueidentifier, regionUUID), block_terraform, block_fly, allow_damage, restrict_pushing, allow_land_resell, allow_land_join_divide, block_show_in_search, agent_limit, object_bonus, maturity, disable_scripts, disable_collisions, disable_physics, CONVERT(uniqueidentifier, terrain_texture_1), CONVERT(uniqueidentifier, terrain_texture_2), CONVERT(uniqueidentifier, terrain_texture_3), CONVERT(uniqueidentifier, terrain_texture_4), elevation_1_nw, elevation_2_nw, elevation_1_ne, elevation_2_ne, elevation_1_se, elevation_2_se, elevation_1_sw, elevation_2_sw, water_height, terrain_raise_limit, terrain_lower_limit, use_estate_sun, fixed_sun, sun_position, CONVERT(uniqueidentifier, covenant), Sandbox, sunvectorx, sunvectory, sunvectorz FROM dbo.regionsettings WITH (HOLDLOCK TABLOCKX)') + +DROP TABLE dbo.regionsettings + +EXECUTE sp_rename N'dbo.Tmp_regionsettings', N'regionsettings', 'OBJECT' + +ALTER TABLE dbo.regionsettings ADD CONSTRAINT + PK__regionse__5B35159D21B6055D PRIMARY KEY CLUSTERED + ( + regionUUID + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +COMMIT + + +:VERSION 21 + +BEGIN TRANSACTION + +ALTER TABLE prims ADD PassTouches bit not null default 0 + +COMMIT + + +:VERSION 22 + +BEGIN TRANSACTION + +ALTER TABLE regionsettings ADD loaded_creation_date varchar(20) +ALTER TABLE regionsettings ADD loaded_creation_time varchar(20) +ALTER TABLE regionsettings ADD loaded_creation_id varchar(64) + +COMMIT + +:VERSION 23 + +BEGIN TRANSACTION + +ALTER TABLE regionsettings DROP COLUMN loaded_creation_date +ALTER TABLE regionsettings DROP COLUMN loaded_creation_time +ALTER TABLE regionsettings ADD loaded_creation_datetime int NOT NULL default 0 + +COMMIT + + + diff --git a/OpenSim/Data/MSSQL/Resources/UserAccount.migrations b/OpenSim/Data/MSSQL/Resources/UserAccount.migrations new file mode 100644 index 0000000..8534e23 --- /dev/null +++ b/OpenSim/Data/MSSQL/Resources/UserAccount.migrations @@ -0,0 +1,55 @@ +:VERSION 1 + +CREATE TABLE [UserAccounts] ( + [PrincipalID] uniqueidentifier NOT NULL, + [ScopeID] uniqueidentifier NOT NULL, + [FirstName] [varchar](64) NOT NULL, + [LastName] [varchar](64) NOT NULL, + [Email] [varchar](64) NULL, + [ServiceURLs] [text] NULL, + [Created] [int] default NULL, + + PRIMARY KEY CLUSTERED +( + [PrincipalID] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + + +:VERSION 2 + +BEGIN TRANSACTION + +INSERT INTO UserAccounts (PrincipalID, ScopeID, FirstName, LastName, Email, ServiceURLs, Created) SELECT [UUID] AS PrincipalID, '00000000-0000-0000-0000-000000000000' AS ScopeID, +username AS FirstName, +lastname AS LastName, +email as Email, ( +'AssetServerURI=' + +userAssetURI + ' InventoryServerURI=' + userInventoryURI + ' GatewayURI= HomeURI=') AS ServiceURLs, +created as Created FROM users; + + +COMMIT + +:VERSION 3 + +BEGIN TRANSACTION + +CREATE UNIQUE INDEX PrincipalID ON UserAccounts(PrincipalID); +CREATE INDEX Email ON UserAccounts(Email); +CREATE INDEX FirstName ON UserAccounts(FirstName); +CREATE INDEX LastName ON UserAccounts(LastName); +CREATE INDEX Name ON UserAccounts(FirstName,LastName); + +COMMIT + +:VERSION 4 + +BEGIN TRANSACTION + +ALTER TABLE UserAccounts ADD UserLevel integer NOT NULL DEFAULT 0; +ALTER TABLE UserAccounts ADD UserFlags integer NOT NULL DEFAULT 0; +ALTER TABLE UserAccounts ADD UserTitle varchar(64) NOT NULL DEFAULT ''; + +COMMIT + diff --git a/OpenSim/Data/MSSQL/Resources/UserStore.migrations b/OpenSim/Data/MSSQL/Resources/UserStore.migrations new file mode 100644 index 0000000..050c544 --- /dev/null +++ b/OpenSim/Data/MSSQL/Resources/UserStore.migrations @@ -0,0 +1,421 @@ +:VERSION 1 + +CREATE TABLE [users] ( + [UUID] [varchar](36) NOT NULL default '', + [username] [varchar](32) NOT NULL, + [lastname] [varchar](32) NOT NULL, + [passwordHash] [varchar](32) NOT NULL, + [passwordSalt] [varchar](32) NOT NULL, + [homeRegion] [bigint] default NULL, + [homeLocationX] [float] default NULL, + [homeLocationY] [float] default NULL, + [homeLocationZ] [float] default NULL, + [homeLookAtX] [float] default NULL, + [homeLookAtY] [float] default NULL, + [homeLookAtZ] [float] default NULL, + [created] [int] NOT NULL, + [lastLogin] [int] NOT NULL, + [userInventoryURI] [varchar](255) default NULL, + [userAssetURI] [varchar](255) default NULL, + [profileCanDoMask] [int] default NULL, + [profileWantDoMask] [int] default NULL, + [profileAboutText] [ntext], + [profileFirstText] [ntext], + [profileImage] [varchar](36) default NULL, + [profileFirstImage] [varchar](36) default NULL, + [webLoginKey] [varchar](36) default NULL, + PRIMARY KEY CLUSTERED +( + [UUID] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + + +CREATE NONCLUSTERED INDEX [usernames] ON [users] +( + [username] ASC, + [lastname] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + + +CREATE TABLE [agents] ( + [UUID] [varchar](36) NOT NULL, + [sessionID] [varchar](36) NOT NULL, + [secureSessionID] [varchar](36) NOT NULL, + [agentIP] [varchar](16) NOT NULL, + [agentPort] [int] NOT NULL, + [agentOnline] [tinyint] NOT NULL, + [loginTime] [int] NOT NULL, + [logoutTime] [int] NOT NULL, + [currentRegion] [varchar](36) NOT NULL, + [currentHandle] [bigint] NOT NULL, + [currentPos] [varchar](64) NOT NULL, + PRIMARY KEY CLUSTERED +( + [UUID] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + + +CREATE NONCLUSTERED INDEX [session] ON [agents] +( + [sessionID] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +CREATE NONCLUSTERED INDEX [ssession] ON [agents] +( + [secureSessionID] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + + +CREATE TABLE [dbo].[userfriends]( + [ownerID] [varchar](50) COLLATE Latin1_General_CI_AS NOT NULL, + [friendID] [varchar](50) COLLATE Latin1_General_CI_AS NOT NULL, + [friendPerms] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, + [datetimestamp] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL +) ON [PRIMARY] + +CREATE TABLE [avatarappearance] ( + [Owner] [varchar](36) NOT NULL, + [Serial] int NOT NULL, + [Visual_Params] [image] NOT NULL, + [Texture] [image] NOT NULL, + [Avatar_Height] float NOT NULL, + [Body_Item] [varchar](36) NOT NULL, + [Body_Asset] [varchar](36) NOT NULL, + [Skin_Item] [varchar](36) NOT NULL, + [Skin_Asset] [varchar](36) NOT NULL, + [Hair_Item] [varchar](36) NOT NULL, + [Hair_Asset] [varchar](36) NOT NULL, + [Eyes_Item] [varchar](36) NOT NULL, + [Eyes_Asset] [varchar](36) NOT NULL, + [Shirt_Item] [varchar](36) NOT NULL, + [Shirt_Asset] [varchar](36) NOT NULL, + [Pants_Item] [varchar](36) NOT NULL, + [Pants_Asset] [varchar](36) NOT NULL, + [Shoes_Item] [varchar](36) NOT NULL, + [Shoes_Asset] [varchar](36) NOT NULL, + [Socks_Item] [varchar](36) NOT NULL, + [Socks_Asset] [varchar](36) NOT NULL, + [Jacket_Item] [varchar](36) NOT NULL, + [Jacket_Asset] [varchar](36) NOT NULL, + [Gloves_Item] [varchar](36) NOT NULL, + [Gloves_Asset] [varchar](36) NOT NULL, + [Undershirt_Item] [varchar](36) NOT NULL, + [Undershirt_Asset] [varchar](36) NOT NULL, + [Underpants_Item] [varchar](36) NOT NULL, + [Underpants_Asset] [varchar](36) NOT NULL, + [Skirt_Item] [varchar](36) NOT NULL, + [Skirt_Asset] [varchar](36) NOT NULL, + + PRIMARY KEY CLUSTERED ( + [Owner] + ) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + +:VERSION 2 + +BEGIN TRANSACTION + +ALTER TABLE users ADD homeRegionID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000'; +ALTER TABLE users ADD userFlags int NOT NULL default 0; +ALTER TABLE users ADD godLevel int NOT NULL default 0; +ALTER TABLE users ADD customType varchar(32) not null default ''; +ALTER TABLE users ADD partner varchar(36) not null default '00000000-0000-0000-0000-000000000000'; + +COMMIT + + +:VERSION 3 + +BEGIN TRANSACTION + +CREATE TABLE [avatarattachments] ( + [UUID] varchar(36) NOT NULL + , [attachpoint] int NOT NULL + , [item] varchar(36) NOT NULL + , [asset] varchar(36) NOT NULL) + +CREATE NONCLUSTERED INDEX IX_avatarattachments ON dbo.avatarattachments + ( + UUID + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + + +COMMIT + + +:VERSION 4 + +BEGIN TRANSACTION + +CREATE TABLE Tmp_userfriends + ( + ownerID varchar(36) NOT NULL, + friendID varchar(36) NOT NULL, + friendPerms int NOT NULL, + datetimestamp int NOT NULL + ) ON [PRIMARY] + +IF EXISTS(SELECT * FROM userfriends) + EXEC('INSERT INTO dbo.Tmp_userfriends (ownerID, friendID, friendPerms, datetimestamp) + SELECT CONVERT(varchar(36), ownerID), CONVERT(varchar(36), friendID), CONVERT(int, friendPerms), CONVERT(int, datetimestamp) FROM dbo.userfriends WITH (HOLDLOCK TABLOCKX)') + +DROP TABLE dbo.userfriends + +EXECUTE sp_rename N'Tmp_userfriends', N'userfriends', 'OBJECT' + +CREATE NONCLUSTERED INDEX IX_userfriends_ownerID ON userfriends + ( + ownerID + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +CREATE NONCLUSTERED INDEX IX_userfriends_friendID ON userfriends + ( + friendID + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +COMMIT + + +:VERSION 5 + +BEGIN TRANSACTION + + ALTER TABLE users add email varchar(250); + +COMMIT + + +:VERSION 6 + +BEGIN TRANSACTION + +CREATE TABLE dbo.Tmp_users + ( + UUID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'), + username varchar(32) NOT NULL, + lastname varchar(32) NOT NULL, + passwordHash varchar(32) NOT NULL, + passwordSalt varchar(32) NOT NULL, + homeRegion bigint NULL DEFAULT (NULL), + homeLocationX float(53) NULL DEFAULT (NULL), + homeLocationY float(53) NULL DEFAULT (NULL), + homeLocationZ float(53) NULL DEFAULT (NULL), + homeLookAtX float(53) NULL DEFAULT (NULL), + homeLookAtY float(53) NULL DEFAULT (NULL), + homeLookAtZ float(53) NULL DEFAULT (NULL), + created int NOT NULL, + lastLogin int NOT NULL, + userInventoryURI varchar(255) NULL DEFAULT (NULL), + userAssetURI varchar(255) NULL DEFAULT (NULL), + profileCanDoMask int NULL DEFAULT (NULL), + profileWantDoMask int NULL DEFAULT (NULL), + profileAboutText ntext NULL, + profileFirstText ntext NULL, + profileImage uniqueidentifier NULL DEFAULT (NULL), + profileFirstImage uniqueidentifier NULL DEFAULT (NULL), + webLoginKey uniqueidentifier NULL DEFAULT (NULL), + homeRegionID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'), + userFlags int NOT NULL DEFAULT ((0)), + godLevel int NOT NULL DEFAULT ((0)), + customType varchar(32) NOT NULL DEFAULT (''), + partner uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'), + email varchar(250) NULL + ) ON [PRIMARY] + TEXTIMAGE_ON [PRIMARY] + +IF EXISTS(SELECT * FROM dbo.users) + EXEC('INSERT INTO dbo.Tmp_users (UUID, username, lastname, passwordHash, passwordSalt, homeRegion, homeLocationX, homeLocationY, homeLocationZ, homeLookAtX, homeLookAtY, homeLookAtZ, created, lastLogin, userInventoryURI, userAssetURI, profileCanDoMask, profileWantDoMask, profileAboutText, profileFirstText, profileImage, profileFirstImage, webLoginKey, homeRegionID, userFlags, godLevel, customType, partner, email) + SELECT CONVERT(uniqueidentifier, UUID), username, lastname, passwordHash, passwordSalt, homeRegion, homeLocationX, homeLocationY, homeLocationZ, homeLookAtX, homeLookAtY, homeLookAtZ, created, lastLogin, userInventoryURI, userAssetURI, profileCanDoMask, profileWantDoMask, profileAboutText, profileFirstText, CONVERT(uniqueidentifier, profileImage), CONVERT(uniqueidentifier, profileFirstImage), CONVERT(uniqueidentifier, webLoginKey), CONVERT(uniqueidentifier, homeRegionID), userFlags, godLevel, customType, CONVERT(uniqueidentifier, partner), email FROM dbo.users WITH (HOLDLOCK TABLOCKX)') + +DROP TABLE dbo.users + +EXECUTE sp_rename N'dbo.Tmp_users', N'users', 'OBJECT' + +ALTER TABLE dbo.users ADD CONSTRAINT + PK__users__65A475E737A5467C PRIMARY KEY CLUSTERED + ( + UUID + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +CREATE NONCLUSTERED INDEX usernames ON dbo.users + ( + username, + lastname + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +COMMIT + + +:VERSION 7 + +BEGIN TRANSACTION + +CREATE TABLE dbo.Tmp_agents + ( + UUID uniqueidentifier NOT NULL, + sessionID uniqueidentifier NOT NULL, + secureSessionID uniqueidentifier NOT NULL, + agentIP varchar(16) NOT NULL, + agentPort int NOT NULL, + agentOnline tinyint NOT NULL, + loginTime int NOT NULL, + logoutTime int NOT NULL, + currentRegion uniqueidentifier NOT NULL, + currentHandle bigint NOT NULL, + currentPos varchar(64) NOT NULL + ) ON [PRIMARY] + +IF EXISTS(SELECT * FROM dbo.agents) + EXEC('INSERT INTO dbo.Tmp_agents (UUID, sessionID, secureSessionID, agentIP, agentPort, agentOnline, loginTime, logoutTime, currentRegion, currentHandle, currentPos) + SELECT CONVERT(uniqueidentifier, UUID), CONVERT(uniqueidentifier, sessionID), CONVERT(uniqueidentifier, secureSessionID), agentIP, agentPort, agentOnline, loginTime, logoutTime, CONVERT(uniqueidentifier, currentRegion), currentHandle, currentPos FROM dbo.agents WITH (HOLDLOCK TABLOCKX)') + +DROP TABLE dbo.agents + +EXECUTE sp_rename N'dbo.Tmp_agents', N'agents', 'OBJECT' + +ALTER TABLE dbo.agents ADD CONSTRAINT + PK__agents__65A475E749C3F6B7 PRIMARY KEY CLUSTERED + ( + UUID + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +CREATE NONCLUSTERED INDEX session ON dbo.agents + ( + sessionID + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +CREATE NONCLUSTERED INDEX ssession ON dbo.agents + ( + secureSessionID + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +COMMIT + + +:VERSION 8 + +BEGIN TRANSACTION + +CREATE TABLE dbo.Tmp_userfriends + ( + ownerID uniqueidentifier NOT NULL, + friendID uniqueidentifier NOT NULL, + friendPerms int NOT NULL, + datetimestamp int NOT NULL + ) ON [PRIMARY] + +IF EXISTS(SELECT * FROM dbo.userfriends) + EXEC('INSERT INTO dbo.Tmp_userfriends (ownerID, friendID, friendPerms, datetimestamp) + SELECT CONVERT(uniqueidentifier, ownerID), CONVERT(uniqueidentifier, friendID), friendPerms, datetimestamp FROM dbo.userfriends WITH (HOLDLOCK TABLOCKX)') + +DROP TABLE dbo.userfriends + +EXECUTE sp_rename N'dbo.Tmp_userfriends', N'userfriends', 'OBJECT' + +CREATE NONCLUSTERED INDEX IX_userfriends_ownerID ON dbo.userfriends + ( + ownerID + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +CREATE NONCLUSTERED INDEX IX_userfriends_friendID ON dbo.userfriends + ( + friendID + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +COMMIT + + +:VERSION 9 + +BEGIN TRANSACTION + +CREATE TABLE dbo.Tmp_avatarappearance + ( + Owner uniqueidentifier NOT NULL, + Serial int NOT NULL, + Visual_Params image NOT NULL, + Texture image NOT NULL, + Avatar_Height float(53) NOT NULL, + Body_Item uniqueidentifier NOT NULL, + Body_Asset uniqueidentifier NOT NULL, + Skin_Item uniqueidentifier NOT NULL, + Skin_Asset uniqueidentifier NOT NULL, + Hair_Item uniqueidentifier NOT NULL, + Hair_Asset uniqueidentifier NOT NULL, + Eyes_Item uniqueidentifier NOT NULL, + Eyes_Asset uniqueidentifier NOT NULL, + Shirt_Item uniqueidentifier NOT NULL, + Shirt_Asset uniqueidentifier NOT NULL, + Pants_Item uniqueidentifier NOT NULL, + Pants_Asset uniqueidentifier NOT NULL, + Shoes_Item uniqueidentifier NOT NULL, + Shoes_Asset uniqueidentifier NOT NULL, + Socks_Item uniqueidentifier NOT NULL, + Socks_Asset uniqueidentifier NOT NULL, + Jacket_Item uniqueidentifier NOT NULL, + Jacket_Asset uniqueidentifier NOT NULL, + Gloves_Item uniqueidentifier NOT NULL, + Gloves_Asset uniqueidentifier NOT NULL, + Undershirt_Item uniqueidentifier NOT NULL, + Undershirt_Asset uniqueidentifier NOT NULL, + Underpants_Item uniqueidentifier NOT NULL, + Underpants_Asset uniqueidentifier NOT NULL, + Skirt_Item uniqueidentifier NOT NULL, + Skirt_Asset uniqueidentifier NOT NULL + ) ON [PRIMARY] + TEXTIMAGE_ON [PRIMARY] + +IF EXISTS(SELECT * FROM dbo.avatarappearance) + EXEC('INSERT INTO dbo.Tmp_avatarappearance (Owner, Serial, Visual_Params, Texture, Avatar_Height, Body_Item, Body_Asset, Skin_Item, Skin_Asset, Hair_Item, Hair_Asset, Eyes_Item, Eyes_Asset, Shirt_Item, Shirt_Asset, Pants_Item, Pants_Asset, Shoes_Item, Shoes_Asset, Socks_Item, Socks_Asset, Jacket_Item, Jacket_Asset, Gloves_Item, Gloves_Asset, Undershirt_Item, Undershirt_Asset, Underpants_Item, Underpants_Asset, Skirt_Item, Skirt_Asset) + SELECT CONVERT(uniqueidentifier, Owner), Serial, Visual_Params, Texture, Avatar_Height, CONVERT(uniqueidentifier, Body_Item), CONVERT(uniqueidentifier, Body_Asset), CONVERT(uniqueidentifier, Skin_Item), CONVERT(uniqueidentifier, Skin_Asset), CONVERT(uniqueidentifier, Hair_Item), CONVERT(uniqueidentifier, Hair_Asset), CONVERT(uniqueidentifier, Eyes_Item), CONVERT(uniqueidentifier, Eyes_Asset), CONVERT(uniqueidentifier, Shirt_Item), CONVERT(uniqueidentifier, Shirt_Asset), CONVERT(uniqueidentifier, Pants_Item), CONVERT(uniqueidentifier, Pants_Asset), CONVERT(uniqueidentifier, Shoes_Item), CONVERT(uniqueidentifier, Shoes_Asset), CONVERT(uniqueidentifier, Socks_Item), CONVERT(uniqueidentifier, Socks_Asset), CONVERT(uniqueidentifier, Jacket_Item), CONVERT(uniqueidentifier, Jacket_Asset), CONVERT(uniqueidentifier, Gloves_Item), CONVERT(uniqueidentifier, Gloves_Asset), CONVERT(uniqueidentifier, Undershirt_Item), CONVERT(uniqueidentifier, Undershirt_Asset), CONVERT(uniqueidentifier, Underpants_Item), CONVERT(uniqueidentifier, Underpants_Asset), CONVERT(uniqueidentifier, Skirt_Item), CONVERT(uniqueidentifier, Skirt_Asset) FROM dbo.avatarappearance WITH (HOLDLOCK TABLOCKX)') + +DROP TABLE dbo.avatarappearance + +EXECUTE sp_rename N'dbo.Tmp_avatarappearance', N'avatarappearance', 'OBJECT' + +ALTER TABLE dbo.avatarappearance ADD CONSTRAINT + PK__avatarap__7DD115CC4E88ABD4 PRIMARY KEY CLUSTERED + ( + Owner + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +COMMIT + + +:VERSION 10 + +BEGIN TRANSACTION + +CREATE TABLE dbo.Tmp_avatarattachments + ( + UUID uniqueidentifier NOT NULL, + attachpoint int NOT NULL, + item uniqueidentifier NOT NULL, + asset uniqueidentifier NOT NULL + ) ON [PRIMARY] + +IF EXISTS(SELECT * FROM dbo.avatarattachments) + EXEC('INSERT INTO dbo.Tmp_avatarattachments (UUID, attachpoint, item, asset) + SELECT CONVERT(uniqueidentifier, UUID), attachpoint, CONVERT(uniqueidentifier, item), CONVERT(uniqueidentifier, asset) FROM dbo.avatarattachments WITH (HOLDLOCK TABLOCKX)') + +DROP TABLE dbo.avatarattachments + +EXECUTE sp_rename N'dbo.Tmp_avatarattachments', N'avatarattachments', 'OBJECT' + +CREATE NONCLUSTERED INDEX IX_avatarattachments ON dbo.avatarattachments + ( + UUID + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +COMMIT + + +:VERSION 11 + +BEGIN TRANSACTION + +ALTER TABLE users ADD scopeID uniqueidentifier not null default '00000000-0000-0000-0000-000000000000' + +COMMIT -- cgit v1.1