mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-10-10 17:38:08 +00:00
feat: Remove PERSISTENT ObjectID bit because it's not an ObjectID bit (#1881)
* feat: Remove PERSISTENT ObjectID bit because it's not an ObjectID bit TODO: Need to add character save migration for the pet subkey in the inventory Tested that the migrations work on mysql and sqlite and that properties have all their contents as before. Need to test pets still * fix: ugc, pet ids. remove persistent bit
This commit is contained in:
37
migrations/dlu/sqlite/7_remove_persistent_bit.sql
Normal file
37
migrations/dlu/sqlite/7_remove_persistent_bit.sql
Normal file
@@ -0,0 +1,37 @@
|
||||
BEGIN TRANSACTION;
|
||||
CREATE TABLE `ugc_2` (
|
||||
`id` BIGINT NOT NULL PRIMARY KEY,
|
||||
`account_id` INT NOT NULL REFERENCES `accounts` (`id`),
|
||||
`character_id` BIGINT NOT NULL REFERENCES `charinfo` (`id`),
|
||||
`is_optimized` INT NOT NULL DEFAULT 0,
|
||||
`lxfml` BLOB NOT NULL,
|
||||
`bake_ao` INT NOT NULL DEFAULT 0,
|
||||
`filename` TEXT NOT NULL DEFAULT ''
|
||||
);
|
||||
CREATE TABLE `properties_contents_2` (
|
||||
`id` BIGINT PRIMARY KEY NOT NULL,
|
||||
`property_id` BIGINT NOT NULL REFERENCES `properties`(`id`),
|
||||
`ugc_id` BIGINT DEFAULT NULL REFERENCES `ugc_2`(`id`),
|
||||
`lot` INT NOT NULL,
|
||||
`x` DOUBLE NOT NULL,
|
||||
`y` DOUBLE NOT NULL,
|
||||
`z` DOUBLE NOT NULL,
|
||||
`rx` DOUBLE NOT NULL,
|
||||
`ry` DOUBLE NOT NULL,
|
||||
`rz` DOUBLE NOT NULL,
|
||||
`rw` DOUBLE NOT NULL,
|
||||
`model_name` TEXT NOT NULL DEFAULT '',
|
||||
`model_description` TEXT NOT NULL DEFAULT '',
|
||||
`behavior_1` BIGINT DEFAULT 0,
|
||||
`behavior_2` BIGINT DEFAULT 0,
|
||||
`behavior_3` BIGINT DEFAULT 0,
|
||||
`behavior_4` BIGINT DEFAULT 0,
|
||||
`behavior_5` BIGINT DEFAULT 0
|
||||
);
|
||||
INSERT INTO `ugc_2` SELECT `id`|0x1000000000000000,`account_id`,`character_id`,`is_optimized`,`lxfml`,`bake_ao`,`filename` FROM `ugc`;
|
||||
INSERT INTO `properties_contents_2` SELECT `id`,`property_id`,`ugc_id`|0x1000000000000000,`lot`,`x`,`y`,`z`,`rx`,`ry`,`rz`,`rw`,`model_name`,`model_description`,`behavior_1`,`behavior_2`,`behavior_3`,`behavior_4`,`behavior_5` FROM `properties_contents`;
|
||||
DROP TABLE `properties_contents`;
|
||||
DROP TABLE `ugc`;
|
||||
ALTER TABLE `properties_contents_2` RENAME TO `properties_contents`;
|
||||
ALTER TABLE `ugc_2` RENAME TO `ugc`;
|
||||
COMMIT;
|
2
migrations/dlu/sqlite/8_fix_pet_ids.sql
Normal file
2
migrations/dlu/sqlite/8_fix_pet_ids.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
/* Unset the fake persistent bit alongside the Character bit and then re-set the Character bit */
|
||||
update pet_names set id = id % 0x100000000 | 0x1000000000000000;
|
Reference in New Issue
Block a user