From 5e4d6cab00cb29cd088ab7b62ab13aff103b64cb Mon Sep 17 00:00:00 2001 From: onefang Date: Sun, 19 May 2019 21:24:15 +1000 Subject: Dump OpenSim 0.9.0.1 into it's own branch. --- OpenSim/Data/PGSQL/Resources/AgentPrefs.migrations | 19 + OpenSim/Data/PGSQL/Resources/AuthStore.migrations | 8 + .../Data/PGSQL/Resources/EstateStore.migrations | 410 ++++++--------------- .../Data/PGSQL/Resources/FSAssetStore.migrations | 14 + OpenSim/Data/PGSQL/Resources/Presence.migrations | 0 .../Data/PGSQL/Resources/RegionStore.migrations | 67 +++- .../Data/PGSQL/Resources/UserAccount.migrations | 6 + .../Data/PGSQL/Resources/UserProfiles.migrations | 10 +- 8 files changed, 237 insertions(+), 297 deletions(-) create mode 100644 OpenSim/Data/PGSQL/Resources/AgentPrefs.migrations create mode 100644 OpenSim/Data/PGSQL/Resources/FSAssetStore.migrations mode change 100644 => 100755 OpenSim/Data/PGSQL/Resources/Presence.migrations (limited to 'OpenSim/Data/PGSQL/Resources') diff --git a/OpenSim/Data/PGSQL/Resources/AgentPrefs.migrations b/OpenSim/Data/PGSQL/Resources/AgentPrefs.migrations new file mode 100644 index 0000000..ca3cca2 --- /dev/null +++ b/OpenSim/Data/PGSQL/Resources/AgentPrefs.migrations @@ -0,0 +1,19 @@ +:VERSION 1 + +BEGIN TRANSACTION; + +CREATE TABLE IF NOT EXISTS "public"."agentprefs" ( + "PrincipalID" uuid NOT NULL, + "AccessPrefs" char(2) NOT NULL DEFAULT 'M'::bpchar COLLATE "default", + "HoverHeight" float8 NOT NULL DEFAULT 0, + "Language" char(5) NOT NULL DEFAULT 'en-us'::bpchar COLLATE "default", + "LanguageIsPublic" bool NOT NULL DEFAULT true, + "PermEveryone" int4 NOT NULL DEFAULT 0, + "PermGroup" int4 NOT NULL DEFAULT 0, + "PermNextOwner" int4 NOT NULL DEFAULT 532480 +) +WITH (OIDS=FALSE); + +ALTER TABLE "public"."agentprefs" ADD PRIMARY KEY ("PrincipalID") NOT DEFERRABLE INITIALLY IMMEDIATE; + +COMMIT; diff --git a/OpenSim/Data/PGSQL/Resources/AuthStore.migrations b/OpenSim/Data/PGSQL/Resources/AuthStore.migrations index a1f5b61..043a8f7 100644 --- a/OpenSim/Data/PGSQL/Resources/AuthStore.migrations +++ b/OpenSim/Data/PGSQL/Resources/AuthStore.migrations @@ -30,3 +30,11 @@ BEGIN TRANSACTION; COMMIT; +:VERSION 3 + +BEGIN TRANSACTION; + +CREATE UNIQUE INDEX auth_pkey ON auth USING btree (uuid); +ALTER TABLE tokens ADD CONSTRAINT "uuid_token" UNIQUE ("uuid","token") NOT DEFERRABLE INITIALLY IMMEDIATE; + +COMMIT; \ No newline at end of file diff --git a/OpenSim/Data/PGSQL/Resources/EstateStore.migrations b/OpenSim/Data/PGSQL/Resources/EstateStore.migrations index 59270f8..5b450aa 100644 --- a/OpenSim/Data/PGSQL/Resources/EstateStore.migrations +++ b/OpenSim/Data/PGSQL/Resources/EstateStore.migrations @@ -1,307 +1,127 @@ -:VERSION 1 +:VERSION 12 BEGIN TRANSACTION; -CREATE TABLE estate_managers( - "EstateID" int NOT NULL Primary Key, - uuid varchar(36) NOT NULL - ); - -CREATE TABLE estate_groups( - "EstateID" int NOT NULL, - uuid varchar(36) NOT NULL - ); - - -CREATE TABLE estate_users( - "EstateID" int NOT NULL, - uuid varchar(36) NOT NULL - ); - - -CREATE TABLE 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 - ); - -Create Sequence estate_settings_id increment by 100 start with 100; - -CREATE TABLE estate_settings( - "EstateID" integer DEFAULT nextval('estate_settings_id') NOT NULL, - "EstateName" varchar(64) NULL DEFAULT (NULL), - "AbuseEmailToEstateOwner" boolean NOT NULL, - "DenyAnonymous" boolean NOT NULL, - "ResetHomeOnTeleport" boolean NOT NULL, - "FixedSun" boolean NOT NULL, - "DenyTransacted" boolean NOT NULL, - "BlockDwell" boolean NOT NULL, - "DenyIdentified" boolean NOT NULL, - "AllowVoice" boolean NOT NULL, - "UseGlobalTime" boolean NOT NULL, - "PricePerMeter" int NOT NULL, - "TaxFree" boolean NOT NULL, - "AllowDirectTeleport" boolean NOT NULL, - "RedirectGridX" int NOT NULL, - "RedirectGridY" int NOT NULL, - "ParentEstateID" int NOT NULL, - "SunPosition" double precision NOT NULL, - "EstateSkipScripts" boolean NOT NULL, - "BillableFactor" double precision NOT NULL, - "PublicAccess" boolean NOT NULL, - "AbuseEmail" varchar(255) NOT NULL, - "EstateOwner" varchar(36) NOT NULL, - "DenyMinors" boolean NOT NULL - ); - - -CREATE TABLE estate_map( - "RegionID" varchar(36) NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'), - "EstateID" int NOT NULL - ); - -COMMIT; - -:VERSION 2 - -BEGIN TRANSACTION; - -CREATE INDEX IX_estate_managers ON estate_managers - ( - "EstateID" - ); - - -CREATE INDEX IX_estate_groups ON estate_groups - ( - "EstateID" - ); - - -CREATE INDEX IX_estate_users ON estate_users - ( - "EstateID" - ); - -COMMIT; - -:VERSION 3 - -BEGIN TRANSACTION; - -CREATE TABLE Tmp_estateban - ( - "EstateID" int NOT NULL, - "bannedUUID" varchar(36) NOT NULL, - "bannedIp" varchar(16) NULL, - "bannedIpHostMask" varchar(16) NULL, - "bannedNameMask" varchar(64) NULL - ); - - INSERT INTO Tmp_estateban ("EstateID", "bannedUUID", "bannedIp", "bannedIpHostMask", "bannedNameMask") - SELECT "EstateID", "bannedUUID", "bannedIp", "bannedIpHostMask", "bannedNameMask" FROM estateban; - -DROP TABLE estateban; - -Alter table Tmp_estateban - rename to estateban; - -CREATE INDEX IX_estateban ON estateban - ( - "EstateID" - ); - -COMMIT; - - -:VERSION 4 - -BEGIN TRANSACTION; - -CREATE TABLE Tmp_estate_managers - ( - "EstateID" int NOT NULL, - uuid uuid NOT NULL - ); - -INSERT INTO Tmp_estate_managers ("EstateID", uuid) - SELECT "EstateID", cast(uuid as uuid) FROM estate_managers; - -DROP TABLE estate_managers; - -Alter table Tmp_estate_managers - rename to estate_managers; - -CREATE INDEX IX_estate_managers ON estate_managers - ( - "EstateID" - ); - -COMMIT; - - -:VERSION 5 - -BEGIN TRANSACTION; - -CREATE TABLE Tmp_estate_groups - ( - "EstateID" int NOT NULL, - uuid uuid NOT NULL - ) ; - - INSERT INTO Tmp_estate_groups ("EstateID", uuid) - SELECT "EstateID", cast(uuid as uuid) FROM estate_groups; - -DROP TABLE estate_groups; - -Alter table Tmp_estate_groups - rename to estate_groups; - -CREATE INDEX IX_estate_groups ON estate_groups - ( - "EstateID" - ); - -COMMIT; - - -:VERSION 6 - -BEGIN TRANSACTION; - -CREATE TABLE Tmp_estate_users - ( - "EstateID" int NOT NULL, - uuid uuid NOT NULL - ); - -INSERT INTO Tmp_estate_users ("EstateID", uuid) - SELECT "EstateID", cast(uuid as uuid) FROM estate_users ; - -DROP TABLE estate_users; - -Alter table Tmp_estate_users - rename to estate_users; - -CREATE INDEX IX_estate_users ON estate_users - ( - "EstateID" - ); - -COMMIT; - - -:VERSION 7 - -BEGIN TRANSACTION; - -CREATE TABLE Tmp_estateban - ( - "EstateID" int NOT NULL, - "bannedUUID" uuid NOT NULL, - "bannedIp" varchar(16) NULL, - "bannedIpHostMask" varchar(16) NULL, - "bannedNameMask" varchar(64) NULL - ); - -INSERT INTO Tmp_estateban ("EstateID", "bannedUUID", "bannedIp", "bannedIpHostMask", "bannedNameMask") - SELECT "EstateID", cast("bannedUUID" as uuid), "bannedIp", "bannedIpHostMask", "bannedNameMask" FROM estateban ; - -DROP TABLE estateban; - -Alter table Tmp_estateban - rename to estateban; - -CREATE INDEX IX_estateban ON estateban - ( - "EstateID" - ); - -COMMIT; - - -:VERSION 8 - -BEGIN TRANSACTION; - -CREATE TABLE Tmp_estate_settings - ( - "EstateID" integer default nextval('estate_settings_id') NOT NULL, - "EstateName" varchar(64) NULL DEFAULT (NULL), - "AbuseEmailToEstateOwner" boolean NOT NULL, - "DenyAnonymous" boolean NOT NULL, - "ResetHomeOnTeleport" boolean NOT NULL, - "FixedSun" boolean NOT NULL, - "DenyTransacted" boolean NOT NULL, - "BlockDwell" boolean NOT NULL, - "DenyIdentified" boolean NOT NULL, - "AllowVoice" boolean NOT NULL, - "UseGlobalTime" boolean NOT NULL, - "PricePerMeter" int NOT NULL, - "TaxFree" boolean NOT NULL, - "AllowDirectTeleport" boolean NOT NULL, - "RedirectGridX" int NOT NULL, - "RedirectGridY" int NOT NULL, - "ParentEstateID" int NOT NULL, - "SunPosition" double precision NOT NULL, - "EstateSkipScripts" boolean NOT NULL, - "BillableFactor" double precision NOT NULL, - "PublicAccess" boolean NOT NULL, - "AbuseEmail" varchar(255) NOT NULL, +-- ---------------------------- +-- Table structure for estate_groups +-- ---------------------------- +CREATE TABLE IF NOT EXISTS "public"."estate_groups" ( + "EstateID" int4 NOT NULL, + "uuid" uuid NOT NULL +) +WITH (OIDS=FALSE); + +-- Indexes structure for table estate_groups +-- ---------------------------- +CREATE INDEX IF NOT EXISTS "ix_estate_groups" ON "public"."estate_groups" USING btree("EstateID" "pg_catalog"."int4_ops" ASC NULLS LAST); + +-- ---------------------------- +-- Table structure for estate_managers +-- ---------------------------- +CREATE TABLE IF NOT EXISTS "public"."estate_managers" ( + "EstateID" int4 NOT NULL, + "uuid" uuid NOT NULL +) +WITH (OIDS=FALSE); + +-- Indexes structure for table estate_managers +-- ---------------------------- +CREATE INDEX IF NOT EXISTS "ix_estate_managers" ON "public"."estate_managers" USING btree("EstateID" "pg_catalog"."int4_ops" ASC NULLS LAST); + +-- ---------------------------- +-- Table structure for estate_map +-- ---------------------------- +CREATE TABLE IF NOT EXISTS "public"."estate_map" ( + "RegionID" uuid NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000'::uuid, + "EstateID" int4 NOT NULL +) +WITH (OIDS=FALSE); + +-- Primary key structure for table estate_map +-- ---------------------------- +ALTER TABLE "public"."estate_map" ADD PRIMARY KEY ("RegionID") NOT DEFERRABLE INITIALLY IMMEDIATE; + +-- ---------------------------- +-- Table structure for estate_settings +-- ---------------------------- +CREATE TABLE IF NOT EXISTS "public"."estate_settings" ( + "EstateID" int4 NOT NULL DEFAULT nextval('estate_settings_id'::regclass), + "EstateName" varchar(64) DEFAULT NULL::character varying COLLATE "default", + "AbuseEmailToEstateOwner" bool NOT NULL, + "DenyAnonymous" bool NOT NULL, + "ResetHomeOnTeleport" bool NOT NULL, + "FixedSun" bool NOT NULL, + "DenyTransacted" bool NOT NULL, + "BlockDwell" bool NOT NULL, + "DenyIdentified" bool NOT NULL, + "AllowVoice" bool NOT NULL, + "UseGlobalTime" bool NOT NULL, + "PricePerMeter" int4 NOT NULL, + "TaxFree" bool NOT NULL, + "AllowDirectTeleport" bool NOT NULL, + "RedirectGridX" int4 NOT NULL, + "RedirectGridY" int4 NOT NULL, + "ParentEstateID" int4 NOT NULL, + "SunPosition" float8 NOT NULL, + "EstateSkipScripts" bool NOT NULL, + "BillableFactor" float8 NOT NULL, + "PublicAccess" bool NOT NULL, + "AbuseEmail" varchar(255) NOT NULL COLLATE "default", "EstateOwner" uuid NOT NULL, - "DenyMinors" boolean NOT NULL - ); - -INSERT INTO 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", cast("EstateOwner" as uuid), "DenyMinors" FROM estate_settings ; - -DROP TABLE estate_settings; - - -Alter table Tmp_estate_settings - rename to estate_settings; - + "DenyMinors" bool NOT NULL, + "AllowLandmark" bool NOT NULL DEFAULT true, + "AllowParcelChanges" bool NOT NULL DEFAULT true, + "AllowSetHome" bool NOT NULL DEFAULT true +) +WITH (OIDS=FALSE); + +-- Primary key structure for table estate_settings +-- ---------------------------- +ALTER TABLE "public"."estate_settings" ADD PRIMARY KEY ("EstateID") NOT DEFERRABLE INITIALLY IMMEDIATE; + +-- ---------------------------- +-- Table structure for estate_users +-- ---------------------------- +CREATE TABLE IF NOT EXISTS "public"."estate_users" ( + "EstateID" int4 NOT NULL, + "uuid" uuid NOT NULL +) +WITH (OIDS=FALSE); + +-- Indexes structure for table estate_users +-- ---------------------------- +CREATE INDEX IF NOT EXISTS "ix_estate_users" ON "public"."estate_users" USING btree("EstateID" "pg_catalog"."int4_ops" ASC NULLS LAST); + +-- ---------------------------- +-- Table structure for estateban +-- ---------------------------- +CREATE TABLE IF NOT EXISTS "public"."estateban" ( + "EstateID" int4 NOT NULL, + "bannedUUID" uuid NOT NULL, + "bannedIp" varchar(16) COLLATE "default", + "bannedIpHostMask" varchar(16) COLLATE "default", + "bannedNameMask" varchar(64) COLLATE "default" +) +WITH (OIDS=FALSE); -Create index on estate_settings (lower("EstateName")); +-- Indexes structure for table estateban +-- ---------------------------- +CREATE INDEX IF NOT EXISTS "ix_estateban" ON "public"."estateban" USING btree("EstateID" "pg_catalog"."int4_ops" ASC NULLS LAST); COMMIT; +:VERSION 13 -:VERSION 9 - -BEGIN TRANSACTION; - -CREATE TABLE Tmp_estate_map - ( - "RegionID" uuid NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'), - "EstateID" int NOT NULL - ); - -INSERT INTO Tmp_estate_map ("RegionID", "EstateID") - SELECT cast("RegionID" as uuid), "EstateID" FROM estate_map ; - -DROP TABLE estate_map; - -Alter table Tmp_estate_map - rename to estate_map; - -COMMIT; + BEGIN TRASACTION; -:VERSION 10 +-- ---------------------------- +-- SEQUENCE estate_settings_id +-- ---------------------------- +CREATE SEQUENCE IF NOT EXISTS "public"."estate_settings_id" + INCREMENT 100 + MINVALUE 1 + MAXVALUE 9223372036854775807 + START 100 + CACHE 1; -BEGIN TRANSACTION; -ALTER TABLE estate_settings ADD COLUMN "AllowLandmark" boolean NOT NULL default true; -ALTER TABLE estate_settings ADD COLUMN "AllowParcelChanges" boolean NOT NULL default true; -ALTER TABLE estate_settings ADD COLUMN "AllowSetHome" boolean NOT NULL default true; COMMIT; - -:VERSION 11 - -Begin transaction; - - -Commit; - diff --git a/OpenSim/Data/PGSQL/Resources/FSAssetStore.migrations b/OpenSim/Data/PGSQL/Resources/FSAssetStore.migrations new file mode 100644 index 0000000..3a072e5 --- /dev/null +++ b/OpenSim/Data/PGSQL/Resources/FSAssetStore.migrations @@ -0,0 +1,14 @@ +:VERSION 1 + +BEGIN TRANSACTION; + +CREATE TABLE fsassets ( + "id" uuid NOT NULL PRIMARY KEY, + "type" integer NOT NULL, + "hash" char(64) NOT NULL, + "create_time" integer NOT NULL DEFAULT '0', + "access_time" integer NOT NULL DEFAULT '0', + "asset_flags" integer NOT NULL DEFAULT '0' +); + +COMMIT; diff --git a/OpenSim/Data/PGSQL/Resources/Presence.migrations b/OpenSim/Data/PGSQL/Resources/Presence.migrations old mode 100644 new mode 100755 diff --git a/OpenSim/Data/PGSQL/Resources/RegionStore.migrations b/OpenSim/Data/PGSQL/Resources/RegionStore.migrations index 1284ce0..fcefb6b 100644 --- a/OpenSim/Data/PGSQL/Resources/RegionStore.migrations +++ b/OpenSim/Data/PGSQL/Resources/RegionStore.migrations @@ -1153,10 +1153,75 @@ ALTER TABLE regionwindlight ALTER COLUMN draw_classic_clouds SET DEFAULT FALSE; COMMIT; -VERSION 41 #-- Change Landlags to bigint +:VERSION 41 #-- Change Landlags to bigint BEGIN TRANSACTION; ALTER TABLE land ALTER "LandFlags" TYPE bigint; COMMIT; + +:VERSION 42 #-- avination fields + +BEGIN TRANSACTION; + +ALTER TABLE prims ADD "PassCollisions" smallint NOT NULL DEFAULT (0); +ALTER TABLE prims ADD "Vehicle" text COLLATE "default"; +ALTER TABLE regionsettings ADD "block_search" smallint NOT NULL DEFAULT (0); +ALTER TABLE regionsettings ADD "casino" smallint NOT NULL DEFAULT (0); +ALTER TABLE land ADD "SeeAVs" smallint NOT NULL DEFAULT (1); +ALTER TABLE land ADD "AnyAVSounds" smallint NOT NULL DEFAULT (1); +ALTER TABLE land ADD "GroupAVSounds" smallint NOT NULL DEFAULT (1); + +COMMIT; + +:VERSION 43 #---- STATUS ROTATION axis locks + +BEGIN TRANSACTION; + +ALTER TABLE prims ADD "RotationAxisLocks" smallint NOT NULL DEFAULT (0); + +COMMIT; + +:VERSION 44 #---- add baked terrain store + +BEGIN TRANSACTION; + +CREATE TABLE bakedterrain + ( + "RegionUUID" uuid NULL, + "Revision" int NULL, + "Heightfield" bytea NULL + ); + +COMMIT; + +:VERSION 45 #---- Add RezzerID filed in table prims + +BEGIN TRANSACTION; + +ALTER TABLE prims ADD "RezzerID" uuid NULL; + +COMMIT; + +:VERSION 46 #---- Add physics inertia data to table prims + +BEGIN TRANSACTION; + +ALTER TABLE prims ADD "PhysInertia" TEXT; + +COMMIT; + + +:VERSION 47 #---- Convert field PassCollisions in table prims to BOOLEAN + +BEGIN TRANSACTION; + +ALTER TABLE "public"."prims" ALTER COLUMN "PassCollisions" DROP DEFAULT; +ALTER TABLE "public"."prims" + ALTER COLUMN "PassCollisions" TYPE BOOLEAN + USING CASE WHEN "PassCollisions" = 0 THEN FALSE + WHEN "PassCollisions" = 1 THEN TRUE + ELSE NULL + END; +COMMIT; diff --git a/OpenSim/Data/PGSQL/Resources/UserAccount.migrations b/OpenSim/Data/PGSQL/Resources/UserAccount.migrations index c785463..31358fa 100644 --- a/OpenSim/Data/PGSQL/Resources/UserAccount.migrations +++ b/OpenSim/Data/PGSQL/Resources/UserAccount.migrations @@ -48,4 +48,10 @@ ALTER TABLE UserAccounts ADD "UserTitle" varchar(64) NOT NULL DEFAULT ''; COMMIT; +:VERSION 5 +BEGIN TRANSACTION; + +ALTER TABLE UserAccounts ADD "active" integer NOT NULL DEFAULT 1; + +COMMIT; diff --git a/OpenSim/Data/PGSQL/Resources/UserProfiles.migrations b/OpenSim/Data/PGSQL/Resources/UserProfiles.migrations index a6bd8ca..26104c0 100644 --- a/OpenSim/Data/PGSQL/Resources/UserProfiles.migrations +++ b/OpenSim/Data/PGSQL/Resources/UserProfiles.migrations @@ -152,4 +152,12 @@ BEGIN; ALTER TABLE usersettings ALTER COLUMN imviaemail SET DATA TYPE boolean USING CASE WHEN false THEN false ELSE true END; -COMMIT; \ No newline at end of file +COMMIT; + +:VERSION 6 # ------------------------------- + +BEGIN TRANSACTION; + +ALTER TABLE userpicks ADD "gatekeeper" varchar(255) COLLATE "default"; + +COMMIT; -- cgit v1.1