2011-03-10 00:43:21 +03:00
|
|
|
TRUNCATE addon_recommendations;
|
|
|
|
|
2011-03-10 03:27:24 +03:00
|
|
|
ALTER TABLE addons_collections
|
|
|
|
DROP FOREIGN KEY addons_collections_ibfk_1,
|
|
|
|
DROP FOREIGN KEY addons_collections_ibfk_2;
|
|
|
|
|
|
|
|
ALTER TABLE addons_collections
|
|
|
|
ADD CONSTRAINT `addons_collections_ibfk_1` FOREIGN KEY (`addon_id`) REFERENCES `addons` (`id`) ON DELETE CASCADE,
|
|
|
|
ADD CONSTRAINT `addons_collections_ibfk_2` FOREIGN KEY (`collection_id`) REFERENCES `collections` (`id`) ON DELETE CASCADE;
|
|
|
|
|
2011-03-10 00:43:21 +03:00
|
|
|
UPDATE collections SET recommended_collection_id=NULL;
|
|
|
|
|
|
|
|
DELETE FROM collections WHERE collection_type=3;
|