migrations/Version20221115194903.php line 1
<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20221115194903 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE inventory_catchable (template_id INT NOT NULL, user_id INT NOT NULL, quantity INT NOT NULL, INDEX IDX_1B466B965DA0FB8 (template_id), INDEX IDX_1B466B96A76ED395 (user_id), PRIMARY KEY(template_id, user_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE inventory_equipment (id INT AUTO_INCREMENT NOT NULL, template_id INT NOT NULL, user_id INT NOT NULL, stat_square INT NOT NULL, stat_circle INT NOT NULL, stat_diamond INT NOT NULL, stat_triangle INT NOT NULL, stat_rectangle INT NOT NULL, stat_star INT NOT NULL, stat_heart INT NOT NULL, stat_octagon INT NOT NULL, INDEX IDX_54843CEB5DA0FB8 (template_id), INDEX IDX_54843CEBA76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE inventory_material (user_id INT NOT NULL, material_id INT NOT NULL, quantity INT NOT NULL, INDEX IDX_C8F4CF04A76ED395 (user_id), INDEX IDX_C8F4CF04E308AC6F (material_id), PRIMARY KEY(user_id, material_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE market_item (id INT AUTO_INCREMENT NOT NULL, nft_contract_id INT NOT NULL, owner_id INT NOT NULL, seller_id INT NOT NULL, nft_hub_id INT NOT NULL, item_id INT NOT NULL, token_id INT NOT NULL, price NUMERIC(36, 18) NOT NULL, is_sold TINYINT(1) NOT NULL, is_canceled TINYINT(1) NOT NULL, created DATETIME DEFAULT NULL, last_updated DATETIME DEFAULT NULL, is_pending TINYINT(1) NOT NULL, UNIQUE INDEX UNIQ_5017DCAE126F525E (item_id), INDEX IDX_5017DCAE76D21890 (nft_contract_id), INDEX IDX_5017DCAE7E3C61F9 (owner_id), INDEX IDX_5017DCAE8DE820D9 (seller_id), INDEX IDX_5017DCAE23E0638D (nft_hub_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE market_sale_payout (id INT AUTO_INCREMENT NOT NULL, wallet_id INT NOT NULL, sale_fee NUMERIC(36, 18) NOT NULL, sale_payout NUMERIC(36, 18) NOT NULL, INDEX IDX_2E2005DB712520F3 (wallet_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE material (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(45) NOT NULL, description LONGTEXT NOT NULL, tier INT NOT NULL, image_url VARCHAR(255) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE nft_collection (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) DEFAULT NULL, series INT DEFAULT NULL, image_url VARCHAR(255) DEFAULT NULL, created_date DATETIME DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE nft_contract (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, address VARCHAR(255) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE nft_hub (id INT AUTO_INCREMENT NOT NULL, nft_contract_id INT NOT NULL, nft_metadata_id INT NOT NULL, theta_wallet_id INT NOT NULL, token_id INT NOT NULL, INDEX IDX_B0444A2576D21890 (nft_contract_id), UNIQUE INDEX UNIQ_B0444A258F3A1134 (nft_metadata_id), INDEX IDX_B0444A259E8E5E91 (theta_wallet_id), UNIQUE INDEX nftHub_nftContract (token_id, nft_contract_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE nft_metadata (id INT AUTO_INCREMENT NOT NULL, nft_collection_id INT NOT NULL, template_id INT NOT NULL, nft_metadata_quest_id INT DEFAULT NULL, name VARCHAR(255) NOT NULL, description LONGTEXT NOT NULL, image_url VARCHAR(255) NOT NULL, tier INT NOT NULL, mint INT NOT NULL, stat_square INT NOT NULL, stat_circle INT NOT NULL, stat_diamond INT NOT NULL, stat_triangle INT NOT NULL, stat_rectangle INT NOT NULL, stat_star INT NOT NULL, stat_heart INT NOT NULL, stat_octagon INT NOT NULL, weight DOUBLE PRECISION DEFAULT NULL, INDEX IDX_7AA8653A327C6A9D (nft_collection_id), INDEX IDX_7AA8653A5DA0FB8 (template_id), INDEX IDX_7AA8653AF3B78CA9 (nft_metadata_quest_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE nft_metadata_quest (id INT AUTO_INCREMENT NOT NULL, quest_id INT NOT NULL, progress INT DEFAULT NULL, goal INT NOT NULL, stat_square_mod INT DEFAULT NULL, stat_circle_mod INT DEFAULT NULL, stat_diamond_mod INT DEFAULT NULL, stat_triangle_mod INT DEFAULT NULL, stat_rectangle_mod INT DEFAULT NULL, stat_star_mod INT DEFAULT NULL, stat_heart_mod INT DEFAULT NULL, stat_octagon_mod INT DEFAULT NULL, INDEX IDX_ECA51411209E9EF4 (quest_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE nft_queue (id INT AUTO_INCREMENT NOT NULL, user_id INT NOT NULL, created DATETIME NOT NULL, updated DATETIME NOT NULL, UNIQUE INDEX UNIQ_380C21C0A76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE nft_transfer (id INT AUTO_INCREMENT NOT NULL, nft_hub_id INT NOT NULL, block_number INT NOT NULL, from_address VARCHAR(255) NOT NULL, to_address VARCHAR(255) NOT NULL, token_id INT NOT NULL, timestamp DATETIME NOT NULL, INDEX IDX_7588F2EE23E0638D (nft_hub_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE quest (id INT AUTO_INCREMENT NOT NULL, task_id INT NOT NULL, category_id INT NOT NULL, name VARCHAR(255) NOT NULL, description LONGTEXT NOT NULL, is_enabled TINYINT(1) NOT NULL, INDEX IDX_4317F8178DB60186 (task_id), INDEX IDX_4317F81712469DE2 (category_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE quest_category (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE quest_task (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE recipe (id INT AUTO_INCREMENT NOT NULL, template_id INT NOT NULL, material_one_id INT DEFAULT NULL, material_two_id INT DEFAULT NULL, material_three_id INT DEFAULT NULL, material_four_id INT DEFAULT NULL, material_five_id INT DEFAULT NULL, name VARCHAR(255) NOT NULL, description LONGTEXT NOT NULL, UNIQUE INDEX UNIQ_DA88B1375DA0FB8 (template_id), INDEX IDX_DA88B1376AA84528 (material_one_id), INDEX IDX_DA88B1371F4A2E7 (material_two_id), INDEX IDX_DA88B137317929C7 (material_three_id), INDEX IDX_DA88B1375436DB0B (material_four_id), INDEX IDX_DA88B1378012DE0 (material_five_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE reset_password_request (id INT AUTO_INCREMENT NOT NULL, user_id INT NOT NULL, selector VARCHAR(20) NOT NULL, hashed_token VARCHAR(100) NOT NULL, requested_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', expires_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_7CE748AA76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE salvage_queue (id INT AUTO_INCREMENT NOT NULL, user_id INT NOT NULL, ready_time DATETIME NOT NULL, created_date DATETIME NOT NULL, received TINYINT(1) NOT NULL, materials JSON NOT NULL, INDEX IDX_169BEAD4A76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE sync_log (id INT AUTO_INCREMENT NOT NULL, start_block INT NOT NULL, end_block INT NOT NULL, timestamp DATETIME NOT NULL, nft_transfer INT NOT NULL, market_create INT NOT NULL, market_cancel INT NOT NULL, market_sold INT NOT NULL, nft_new INT DEFAULT NULL, market_payout INT DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE template (id INT AUTO_INCREMENT NOT NULL, genus_id INT NOT NULL, category_id INT NOT NULL, name VARCHAR(255) NOT NULL, description LONGTEXT DEFAULT NULL, image_url VARCHAR(255) NOT NULL, tier INT NOT NULL, min_stat INT NOT NULL, max_stat INT NOT NULL, min_weight DOUBLE PRECISION NOT NULL, max_weight DOUBLE PRECISION NOT NULL, aux_data JSON DEFAULT NULL, INDEX IDX_97601F8385C4074C (genus_id), INDEX IDX_97601F8312469DE2 (category_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE template_zone (template_id INT NOT NULL, zone_id INT NOT NULL, INDEX IDX_7525EA6A5DA0FB8 (template_id), INDEX IDX_7525EA6A9F2C3FAB (zone_id), PRIMARY KEY(template_id, zone_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE template_category (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE template_genus (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE template_material_probability (id INT AUTO_INCREMENT NOT NULL, template_id INT NOT NULL, material_id INT NOT NULL, probability NUMERIC(7, 4) NOT NULL, min_possible INT NOT NULL, max_possible INT NOT NULL, INDEX IDX_1FED3CF35DA0FB8 (template_id), INDEX IDX_1FED3CF3E308AC6F (material_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE theta_wallet (id INT AUTO_INCREMENT NOT NULL, address VARCHAR(255) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE transaction (id INT AUTO_INCREMENT NOT NULL, user_id INT NOT NULL, template_id INT NOT NULL, payment_tx_hash VARCHAR(255) DEFAULT NULL, payment_timestamp DATETIME DEFAULT NULL, payment_height INT DEFAULT NULL, payment_value NUMERIC(36, 18) DEFAULT NULL, nft_tx_hash VARCHAR(255) DEFAULT NULL, nft_timestamp DATETIME DEFAULT NULL, INDEX IDX_723705D1A76ED395 (user_id), INDEX IDX_723705D15DA0FB8 (template_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE user (id INT AUTO_INCREMENT NOT NULL, active_wallet_id INT DEFAULT NULL, email VARCHAR(180) NOT NULL, roles JSON NOT NULL, password VARCHAR(255) NOT NULL, game_token VARCHAR(255) DEFAULT NULL, wallet VARCHAR(255) DEFAULT NULL, google_id VARCHAR(255) DEFAULT NULL, username VARCHAR(255) DEFAULT NULL, wallet_extension INT DEFAULT NULL, config JSON DEFAULT NULL, UNIQUE INDEX UNIQ_8D93D649E7927C74 (email), UNIQUE INDEX UNIQ_8D93D64967B363C7 (active_wallet_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE user_gear (user_id INT NOT NULL, template_category_id INT NOT NULL, inventory_equipment_id INT DEFAULT NULL, nft_metadata_id INT NOT NULL, INDEX IDX_71C51F52A76ED395 (user_id), INDEX IDX_71C51F5219BF8986 (template_category_id), UNIQUE INDEX UNIQ_71C51F525AD0C4E3 (inventory_equipment_id), UNIQUE INDEX UNIQ_71C51F528F3A1134 (nft_metadata_id), UNIQUE INDEX user_template_category (template_category_id, user_id), PRIMARY KEY(user_id, template_category_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE user_record (user_id INT NOT NULL, template_id INT NOT NULL, caught_qty INT DEFAULT NULL, salvage_qty INT DEFAULT NULL, convert_nft_qty INT DEFAULT NULL, craft_qty INT DEFAULT NULL, INDEX IDX_FE6684ACA76ED395 (user_id), INDEX IDX_FE6684AC5DA0FB8 (template_id), PRIMARY KEY(user_id, template_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE zone (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE inventory_catchable ADD CONSTRAINT FK_1B466B965DA0FB8 FOREIGN KEY (template_id) REFERENCES template (id)');
$this->addSql('ALTER TABLE inventory_catchable ADD CONSTRAINT FK_1B466B96A76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE inventory_equipment ADD CONSTRAINT FK_54843CEB5DA0FB8 FOREIGN KEY (template_id) REFERENCES template (id)');
$this->addSql('ALTER TABLE inventory_equipment ADD CONSTRAINT FK_54843CEBA76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE inventory_material ADD CONSTRAINT FK_C8F4CF04A76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE inventory_material ADD CONSTRAINT FK_C8F4CF04E308AC6F FOREIGN KEY (material_id) REFERENCES material (id)');
$this->addSql('ALTER TABLE market_item ADD CONSTRAINT FK_5017DCAE76D21890 FOREIGN KEY (nft_contract_id) REFERENCES nft_contract (id)');
$this->addSql('ALTER TABLE market_item ADD CONSTRAINT FK_5017DCAE7E3C61F9 FOREIGN KEY (owner_id) REFERENCES theta_wallet (id)');
$this->addSql('ALTER TABLE market_item ADD CONSTRAINT FK_5017DCAE8DE820D9 FOREIGN KEY (seller_id) REFERENCES theta_wallet (id)');
$this->addSql('ALTER TABLE market_item ADD CONSTRAINT FK_5017DCAE23E0638D FOREIGN KEY (nft_hub_id) REFERENCES nft_hub (id)');
$this->addSql('ALTER TABLE market_sale_payout ADD CONSTRAINT FK_2E2005DB712520F3 FOREIGN KEY (wallet_id) REFERENCES theta_wallet (id)');
$this->addSql('ALTER TABLE nft_hub ADD CONSTRAINT FK_B0444A2576D21890 FOREIGN KEY (nft_contract_id) REFERENCES nft_contract (id)');
$this->addSql('ALTER TABLE nft_hub ADD CONSTRAINT FK_B0444A258F3A1134 FOREIGN KEY (nft_metadata_id) REFERENCES nft_metadata (id)');
$this->addSql('ALTER TABLE nft_hub ADD CONSTRAINT FK_B0444A259E8E5E91 FOREIGN KEY (theta_wallet_id) REFERENCES theta_wallet (id)');
$this->addSql('ALTER TABLE nft_metadata ADD CONSTRAINT FK_7AA8653A327C6A9D FOREIGN KEY (nft_collection_id) REFERENCES nft_collection (id)');
$this->addSql('ALTER TABLE nft_metadata ADD CONSTRAINT FK_7AA8653A5DA0FB8 FOREIGN KEY (template_id) REFERENCES template (id)');
$this->addSql('ALTER TABLE nft_metadata ADD CONSTRAINT FK_7AA8653AF3B78CA9 FOREIGN KEY (nft_metadata_quest_id) REFERENCES nft_metadata_quest (id)');
$this->addSql('ALTER TABLE nft_metadata_quest ADD CONSTRAINT FK_ECA51411209E9EF4 FOREIGN KEY (quest_id) REFERENCES quest (id)');
$this->addSql('ALTER TABLE nft_queue ADD CONSTRAINT FK_380C21C0A76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE nft_transfer ADD CONSTRAINT FK_7588F2EE23E0638D FOREIGN KEY (nft_hub_id) REFERENCES nft_hub (id)');
$this->addSql('ALTER TABLE quest ADD CONSTRAINT FK_4317F8178DB60186 FOREIGN KEY (task_id) REFERENCES quest_task (id)');
$this->addSql('ALTER TABLE quest ADD CONSTRAINT FK_4317F81712469DE2 FOREIGN KEY (category_id) REFERENCES quest_category (id)');
$this->addSql('ALTER TABLE recipe ADD CONSTRAINT FK_DA88B1375DA0FB8 FOREIGN KEY (template_id) REFERENCES template (id)');
$this->addSql('ALTER TABLE recipe ADD CONSTRAINT FK_DA88B1376AA84528 FOREIGN KEY (material_one_id) REFERENCES material (id)');
$this->addSql('ALTER TABLE recipe ADD CONSTRAINT FK_DA88B1371F4A2E7 FOREIGN KEY (material_two_id) REFERENCES material (id)');
$this->addSql('ALTER TABLE recipe ADD CONSTRAINT FK_DA88B137317929C7 FOREIGN KEY (material_three_id) REFERENCES material (id)');
$this->addSql('ALTER TABLE recipe ADD CONSTRAINT FK_DA88B1375436DB0B FOREIGN KEY (material_four_id) REFERENCES material (id)');
$this->addSql('ALTER TABLE recipe ADD CONSTRAINT FK_DA88B1378012DE0 FOREIGN KEY (material_five_id) REFERENCES material (id)');
$this->addSql('ALTER TABLE reset_password_request ADD CONSTRAINT FK_7CE748AA76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE salvage_queue ADD CONSTRAINT FK_169BEAD4A76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE template ADD CONSTRAINT FK_97601F8385C4074C FOREIGN KEY (genus_id) REFERENCES template_genus (id)');
$this->addSql('ALTER TABLE template ADD CONSTRAINT FK_97601F8312469DE2 FOREIGN KEY (category_id) REFERENCES template_category (id)');
$this->addSql('ALTER TABLE template_zone ADD CONSTRAINT FK_7525EA6A5DA0FB8 FOREIGN KEY (template_id) REFERENCES template (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE template_zone ADD CONSTRAINT FK_7525EA6A9F2C3FAB FOREIGN KEY (zone_id) REFERENCES zone (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE template_material_probability ADD CONSTRAINT FK_1FED3CF35DA0FB8 FOREIGN KEY (template_id) REFERENCES template (id)');
$this->addSql('ALTER TABLE template_material_probability ADD CONSTRAINT FK_1FED3CF3E308AC6F FOREIGN KEY (material_id) REFERENCES material (id)');
$this->addSql('ALTER TABLE transaction ADD CONSTRAINT FK_723705D1A76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE transaction ADD CONSTRAINT FK_723705D15DA0FB8 FOREIGN KEY (template_id) REFERENCES template (id)');
$this->addSql('ALTER TABLE user ADD CONSTRAINT FK_8D93D64967B363C7 FOREIGN KEY (active_wallet_id) REFERENCES theta_wallet (id)');
$this->addSql('ALTER TABLE user_gear ADD CONSTRAINT FK_71C51F52A76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE user_gear ADD CONSTRAINT FK_71C51F5219BF8986 FOREIGN KEY (template_category_id) REFERENCES template_category (id)');
$this->addSql('ALTER TABLE user_gear ADD CONSTRAINT FK_71C51F525AD0C4E3 FOREIGN KEY (inventory_equipment_id) REFERENCES inventory_equipment (id)');
$this->addSql('ALTER TABLE user_gear ADD CONSTRAINT FK_71C51F528F3A1134 FOREIGN KEY (nft_metadata_id) REFERENCES nft_metadata (id)');
$this->addSql('ALTER TABLE user_record ADD CONSTRAINT FK_FE6684ACA76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE user_record ADD CONSTRAINT FK_FE6684AC5DA0FB8 FOREIGN KEY (template_id) REFERENCES template (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE inventory_catchable DROP FOREIGN KEY FK_1B466B965DA0FB8');
$this->addSql('ALTER TABLE inventory_catchable DROP FOREIGN KEY FK_1B466B96A76ED395');
$this->addSql('ALTER TABLE inventory_equipment DROP FOREIGN KEY FK_54843CEB5DA0FB8');
$this->addSql('ALTER TABLE inventory_equipment DROP FOREIGN KEY FK_54843CEBA76ED395');
$this->addSql('ALTER TABLE inventory_material DROP FOREIGN KEY FK_C8F4CF04A76ED395');
$this->addSql('ALTER TABLE inventory_material DROP FOREIGN KEY FK_C8F4CF04E308AC6F');
$this->addSql('ALTER TABLE market_item DROP FOREIGN KEY FK_5017DCAE76D21890');
$this->addSql('ALTER TABLE market_item DROP FOREIGN KEY FK_5017DCAE7E3C61F9');
$this->addSql('ALTER TABLE market_item DROP FOREIGN KEY FK_5017DCAE8DE820D9');
$this->addSql('ALTER TABLE market_item DROP FOREIGN KEY FK_5017DCAE23E0638D');
$this->addSql('ALTER TABLE market_sale_payout DROP FOREIGN KEY FK_2E2005DB712520F3');
$this->addSql('ALTER TABLE nft_hub DROP FOREIGN KEY FK_B0444A2576D21890');
$this->addSql('ALTER TABLE nft_hub DROP FOREIGN KEY FK_B0444A258F3A1134');
$this->addSql('ALTER TABLE nft_hub DROP FOREIGN KEY FK_B0444A259E8E5E91');
$this->addSql('ALTER TABLE nft_metadata DROP FOREIGN KEY FK_7AA8653A327C6A9D');
$this->addSql('ALTER TABLE nft_metadata DROP FOREIGN KEY FK_7AA8653A5DA0FB8');
$this->addSql('ALTER TABLE nft_metadata DROP FOREIGN KEY FK_7AA8653AF3B78CA9');
$this->addSql('ALTER TABLE nft_metadata_quest DROP FOREIGN KEY FK_ECA51411209E9EF4');
$this->addSql('ALTER TABLE nft_queue DROP FOREIGN KEY FK_380C21C0A76ED395');
$this->addSql('ALTER TABLE nft_transfer DROP FOREIGN KEY FK_7588F2EE23E0638D');
$this->addSql('ALTER TABLE quest DROP FOREIGN KEY FK_4317F8178DB60186');
$this->addSql('ALTER TABLE quest DROP FOREIGN KEY FK_4317F81712469DE2');
$this->addSql('ALTER TABLE recipe DROP FOREIGN KEY FK_DA88B1375DA0FB8');
$this->addSql('ALTER TABLE recipe DROP FOREIGN KEY FK_DA88B1376AA84528');
$this->addSql('ALTER TABLE recipe DROP FOREIGN KEY FK_DA88B1371F4A2E7');
$this->addSql('ALTER TABLE recipe DROP FOREIGN KEY FK_DA88B137317929C7');
$this->addSql('ALTER TABLE recipe DROP FOREIGN KEY FK_DA88B1375436DB0B');
$this->addSql('ALTER TABLE recipe DROP FOREIGN KEY FK_DA88B1378012DE0');
$this->addSql('ALTER TABLE reset_password_request DROP FOREIGN KEY FK_7CE748AA76ED395');
$this->addSql('ALTER TABLE salvage_queue DROP FOREIGN KEY FK_169BEAD4A76ED395');
$this->addSql('ALTER TABLE template DROP FOREIGN KEY FK_97601F8385C4074C');
$this->addSql('ALTER TABLE template DROP FOREIGN KEY FK_97601F8312469DE2');
$this->addSql('ALTER TABLE template_zone DROP FOREIGN KEY FK_7525EA6A5DA0FB8');
$this->addSql('ALTER TABLE template_zone DROP FOREIGN KEY FK_7525EA6A9F2C3FAB');
$this->addSql('ALTER TABLE template_material_probability DROP FOREIGN KEY FK_1FED3CF35DA0FB8');
$this->addSql('ALTER TABLE template_material_probability DROP FOREIGN KEY FK_1FED3CF3E308AC6F');
$this->addSql('ALTER TABLE transaction DROP FOREIGN KEY FK_723705D1A76ED395');
$this->addSql('ALTER TABLE transaction DROP FOREIGN KEY FK_723705D15DA0FB8');
$this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D64967B363C7');
$this->addSql('ALTER TABLE user_gear DROP FOREIGN KEY FK_71C51F52A76ED395');
$this->addSql('ALTER TABLE user_gear DROP FOREIGN KEY FK_71C51F5219BF8986');
$this->addSql('ALTER TABLE user_gear DROP FOREIGN KEY FK_71C51F525AD0C4E3');
$this->addSql('ALTER TABLE user_gear DROP FOREIGN KEY FK_71C51F528F3A1134');
$this->addSql('ALTER TABLE user_record DROP FOREIGN KEY FK_FE6684ACA76ED395');
$this->addSql('ALTER TABLE user_record DROP FOREIGN KEY FK_FE6684AC5DA0FB8');
$this->addSql('DROP TABLE inventory_catchable');
$this->addSql('DROP TABLE inventory_equipment');
$this->addSql('DROP TABLE inventory_material');
$this->addSql('DROP TABLE market_item');
$this->addSql('DROP TABLE market_sale_payout');
$this->addSql('DROP TABLE material');
$this->addSql('DROP TABLE nft_collection');
$this->addSql('DROP TABLE nft_contract');
$this->addSql('DROP TABLE nft_hub');
$this->addSql('DROP TABLE nft_metadata');
$this->addSql('DROP TABLE nft_metadata_quest');
$this->addSql('DROP TABLE nft_queue');
$this->addSql('DROP TABLE nft_transfer');
$this->addSql('DROP TABLE quest');
$this->addSql('DROP TABLE quest_category');
$this->addSql('DROP TABLE quest_task');
$this->addSql('DROP TABLE recipe');
$this->addSql('DROP TABLE reset_password_request');
$this->addSql('DROP TABLE salvage_queue');
$this->addSql('DROP TABLE sync_log');
$this->addSql('DROP TABLE template');
$this->addSql('DROP TABLE template_zone');
$this->addSql('DROP TABLE template_category');
$this->addSql('DROP TABLE template_genus');
$this->addSql('DROP TABLE template_material_probability');
$this->addSql('DROP TABLE theta_wallet');
$this->addSql('DROP TABLE transaction');
$this->addSql('DROP TABLE user');
$this->addSql('DROP TABLE user_gear');
$this->addSql('DROP TABLE user_record');
$this->addSql('DROP TABLE zone');
}
}