mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'sam/migration-fix-fix' into 'master'
Actual migration fix See merge request veloren/veloren!4498
This commit is contained in:
commit
5c0299ef82
@ -14,11 +14,23 @@ SELECT i.item_id,
|
||||
FROM item i
|
||||
WHERE i.item_definition_id = 'veloren.core.pseudo_containers.recipe_book';
|
||||
|
||||
CREATE TEMP TABLE _temp_another_recipe_book_table
|
||||
(
|
||||
recipe_parent_id INT PRIMARY KEY NOT NULL,
|
||||
recipe_item_id INTEGER NOT NULL
|
||||
);
|
||||
|
||||
INSERT
|
||||
INTO _temp_another_recipe_book_table
|
||||
SELECT i.parent_container_item_id,
|
||||
i.item_id
|
||||
FROM item i
|
||||
WHERE i.item_definition_id = 'common.items.recipes.default';
|
||||
|
||||
-- Find to see if any recipe books correctly have the default recipes item
|
||||
UPDATE _temp_recipe_book_table
|
||||
SET default_recipe_id = (SELECT item_id FROM item
|
||||
WHERE item.parent_container_item_id = recipe_book_id
|
||||
AND item.item_definition_id = 'common.items.recipes.default');
|
||||
SET default_recipe_id = (SELECT t.recipe_item_id FROM _temp_another_recipe_book_table t
|
||||
WHERE t.recipe_parent_id = recipe_book_id);
|
||||
|
||||
-- Find to see if any default recipe items ended up with an entity_id
|
||||
UPDATE _temp_recipe_book_table
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
// Touch this comment if changes only include .sql files and no .rs so that
|
||||
// migration happens.
|
||||
// A
|
||||
// B
|
||||
|
||||
pub(in crate::persistence) mod character;
|
||||
pub mod character_loader;
|
||||
|
Loading…
Reference in New Issue
Block a user