migrations/Version20250513184934.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use Doctrine\DBAL\Schema\Schema;
  5. use Doctrine\Migrations\AbstractMigration;
  6. /**
  7.  * Auto-generated Migration: Please modify to your needs!
  8.  */
  9. final class Version20250513184934 extends AbstractMigration
  10. {
  11.     public function getDescription(): string
  12.     {
  13.         return '';
  14.     }
  15.     public function up(Schema $schema): void
  16.     {
  17.         // this up() migration is auto-generated, please modify it to your needs
  18.         $this->addSql('CREATE TABLE company_cache (id INT AUTO_INCREMENT NOT NULL, content JSON NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  19.         $this->addSql('CREATE TABLE coupon_discount (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) DEFAULT NULL, active TINYINT(1) DEFAULT NULL, code VARCHAR(255) DEFAULT NULL, type VARCHAR(255) DEFAULT NULL, params JSON DEFAULT NULL, active_until DATETIME DEFAULT NULL, created_at DATETIME DEFAULT NULL, updated_at DATETIME DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  20.         $this->addSql('CREATE TABLE coupon_single_use (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, name VARCHAR(255) DEFAULT NULL, active TINYINT(1) DEFAULT NULL, code VARCHAR(255) DEFAULT NULL, type VARCHAR(255) DEFAULT NULL, params JSON DEFAULT NULL, active_until DATETIME DEFAULT NULL, new_user TINYINT(1) DEFAULT NULL, email_new_user VARCHAR(255) DEFAULT NULL, used TINYINT(1) DEFAULT NULL, automatic TINYINT(1) DEFAULT NULL, language VARCHAR(255) DEFAULT NULL, created_at DATETIME DEFAULT NULL, updated_at DATETIME DEFAULT NULL, INDEX IDX_329DAD40A76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  21.         $this->addSql('CREATE TABLE offer_boost (id INT AUTO_INCREMENT NOT NULL, offer_id INT DEFAULT NULL, boost_date DATETIME NOT NULL, INDEX IDX_D5495A8153C674EE (offer_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  22.         $this->addSql('CREATE TABLE offer_name_cache (id INT AUTO_INCREMENT NOT NULL, content JSON NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  23.         $this->addSql('CREATE TABLE orders (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, package_id INT DEFAULT NULL, coupon_discount_id INT DEFAULT NULL, coupon_single_use_id INT DEFAULT NULL, invoice_file_id INT DEFAULT NULL, invoice_pro_form_file_id INT DEFAULT NULL, is_send_invoice TINYINT(1) DEFAULT NULL, is_send_invoice_pro_form TINYINT(1) DEFAULT NULL, offer_status VARCHAR(255) DEFAULT NULL, status VARCHAR(255) DEFAULT NULL, payment_status VARCHAR(255) DEFAULT NULL, price_net DOUBLE PRECISION DEFAULT NULL, price_gross DOUBLE PRECISION DEFAULT NULL, is_range TINYINT(1) DEFAULT NULL, number_localization INT DEFAULT NULL, industries_ids JSON DEFAULT NULL, is_used_code_discount TINYINT(1) DEFAULT NULL, invoice JSON DEFAULT NULL, payment JSON DEFAULT NULL, configuration JSON DEFAULT NULL, uuid VARCHAR(255) DEFAULT NULL, need_to_accepted TINYINT(1) DEFAULT NULL, expired_at DATETIME DEFAULT NULL, currency VARCHAR(255) DEFAULT NULL, created_at DATETIME DEFAULT NULL, updated_at DATETIME DEFAULT NULL, INDEX IDX_E52FFDEEA76ED395 (user_id), INDEX IDX_E52FFDEEF44CABFF (package_id), INDEX IDX_E52FFDEE3B1AF2B8 (coupon_discount_id), INDEX IDX_E52FFDEE83CC659F (coupon_single_use_id), INDEX IDX_E52FFDEE61124FBF (invoice_file_id), INDEX IDX_E52FFDEEB8EF4C50 (invoice_pro_form_file_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  24.         $this->addSql('CREATE TABLE orders_additional_features (id INT AUTO_INCREMENT NOT NULL, order_id INT DEFAULT NULL, created_at DATETIME DEFAULT NULL, updated_at DATETIME DEFAULT NULL, INDEX IDX_676A37088D9F6D38 (order_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  25.         $this->addSql('CREATE TABLE orders_additional_features_translation (id INT AUTO_INCREMENT NOT NULL, translatable_id INT DEFAULT NULL, name VARCHAR(255) DEFAULT NULL, locale VARCHAR(5) NOT NULL, INDEX IDX_134EA7242C2AC5D3 (translatable_id), UNIQUE INDEX orders_additional_features_translation_unique_translation (translatable_id, locale), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  26.         $this->addSql('CREATE TABLE package (id INT AUTO_INCREMENT NOT NULL, active TINYINT(1) DEFAULT NULL, visible_on_the_page TINYINT(1) DEFAULT NULL, promotion TINYINT(1) DEFAULT NULL, price_with_forks DOUBLE PRECISION DEFAULT NULL, price_without_forks DOUBLE PRECISION DEFAULT NULL, price_with_forks_en DOUBLE PRECISION DEFAULT NULL, price_without_forks_en DOUBLE PRECISION DEFAULT NULL, discount TINYINT(1) DEFAULT NULL, discount_percentage INT DEFAULT NULL, discount_price_with_forks DOUBLE PRECISION DEFAULT NULL, discount_price_without_forks DOUBLE PRECISION DEFAULT NULL, discount_price_with_forks_en DOUBLE PRECISION DEFAULT NULL, discount_price_without_forks_en DOUBLE PRECISION DEFAULT NULL, show_industry TINYINT(1) DEFAULT NULL, show_package_length TINYINT(1) DEFAULT NULL, package_length INT DEFAULT NULL, show_offer_length TINYINT(1) DEFAULT NULL, offer_length INT DEFAULT NULL, show_number_of_ads TINYINT(1) DEFAULT NULL, number_of_ads INT DEFAULT NULL, show_number_of_raises TINYINT(1) DEFAULT NULL, number_of_raises INT DEFAULT NULL, show_number_of_locations TINYINT(1) DEFAULT NULL, number_of_locations INT DEFAULT NULL, active_until DATETIME DEFAULT NULL, is_range TINYINT(1) DEFAULT NULL, number_of_active INT DEFAULT NULL, is_own TINYINT(1) DEFAULT NULL, free_package TINYINT(1) DEFAULT NULL, select_all_industry TINYINT(1) DEFAULT NULL, position INT DEFAULT NULL, created_at DATETIME DEFAULT NULL, updated_at DATETIME DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  27.         $this->addSql('CREATE TABLE package_industry (package_id INT NOT NULL, item_category_id INT NOT NULL, INDEX IDX_297BF8CEF44CABFF (package_id), INDEX IDX_297BF8CEF22EC5D4 (item_category_id), PRIMARY KEY(package_id, item_category_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  28.         $this->addSql('CREATE TABLE package_additional_features (id INT AUTO_INCREMENT NOT NULL, package_id INT DEFAULT NULL, created_at DATETIME DEFAULT NULL, updated_at DATETIME DEFAULT NULL, INDEX IDX_B947CAFFF44CABFF (package_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  29.         $this->addSql('CREATE TABLE package_additional_features_translation (id INT AUTO_INCREMENT NOT NULL, translatable_id INT DEFAULT NULL, name VARCHAR(255) DEFAULT NULL, locale VARCHAR(5) NOT NULL, INDEX IDX_76A981F2C2AC5D3 (translatable_id), UNIQUE INDEX package_additional_features_translation_unique_translation (translatable_id, locale), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  30.         $this->addSql('CREATE TABLE package_translation (id INT AUTO_INCREMENT NOT NULL, translatable_id INT DEFAULT NULL, name VARCHAR(255) DEFAULT NULL, range_name VARCHAR(255) DEFAULT NULL, locale VARCHAR(5) NOT NULL, INDEX IDX_79B25F092C2AC5D3 (translatable_id), UNIQUE INDEX package_translation_unique_translation (translatable_id, locale), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  31.         $this->addSql('CREATE TABLE technology_cache (id INT AUTO_INCREMENT NOT NULL, content JSON NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  32.         $this->addSql('CREATE TABLE user_link_login (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, token VARCHAR(255) NOT NULL, used TINYINT(1) NOT NULL, expired_at DATETIME NOT NULL, INDEX IDX_A2D45122A76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  33.         $this->addSql('CREATE TABLE user_package (id INT AUTO_INCREMENT NOT NULL, package_id INT DEFAULT NULL, user_id INT DEFAULT NULL, order_id INT DEFAULT NULL, active TINYINT(1) DEFAULT NULL, active_until DATETIME DEFAULT NULL, additional_user TINYINT(1) DEFAULT NULL, created_at DATETIME DEFAULT NULL, INDEX IDX_8665799FF44CABFF (package_id), INDEX IDX_8665799FA76ED395 (user_id), INDEX IDX_8665799F8D9F6D38 (order_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  34.         $this->addSql('CREATE TABLE user_package_offer (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, package_id INT DEFAULT NULL, offer_id INT DEFAULT NULL, order_id INT DEFAULT NULL, INDEX IDX_525C2D89A76ED395 (user_id), INDEX IDX_525C2D89F44CABFF (package_id), INDEX IDX_525C2D8953C674EE (offer_id), INDEX IDX_525C2D898D9F6D38 (order_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  35.         $this->addSql('ALTER TABLE coupon_single_use ADD CONSTRAINT FK_329DAD40A76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
  36.         $this->addSql('ALTER TABLE offer_boost ADD CONSTRAINT FK_D5495A8153C674EE FOREIGN KEY (offer_id) REFERENCES offer (id)');
  37.         $this->addSql('ALTER TABLE orders ADD CONSTRAINT FK_E52FFDEEA76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
  38.         $this->addSql('ALTER TABLE orders ADD CONSTRAINT FK_E52FFDEEF44CABFF FOREIGN KEY (package_id) REFERENCES package (id)');
  39.         $this->addSql('ALTER TABLE orders ADD CONSTRAINT FK_E52FFDEE3B1AF2B8 FOREIGN KEY (coupon_discount_id) REFERENCES coupon_discount (id)');
  40.         $this->addSql('ALTER TABLE orders ADD CONSTRAINT FK_E52FFDEE83CC659F FOREIGN KEY (coupon_single_use_id) REFERENCES coupon_single_use (id)');
  41.         $this->addSql('ALTER TABLE orders ADD CONSTRAINT FK_E52FFDEE61124FBF FOREIGN KEY (invoice_file_id) REFERENCES file (id)');
  42.         $this->addSql('ALTER TABLE orders ADD CONSTRAINT FK_E52FFDEEB8EF4C50 FOREIGN KEY (invoice_pro_form_file_id) REFERENCES file (id)');
  43.         $this->addSql('ALTER TABLE orders_additional_features ADD CONSTRAINT FK_676A37088D9F6D38 FOREIGN KEY (order_id) REFERENCES orders (id)');
  44.         $this->addSql('ALTER TABLE orders_additional_features_translation ADD CONSTRAINT FK_134EA7242C2AC5D3 FOREIGN KEY (translatable_id) REFERENCES orders_additional_features (id) ON DELETE CASCADE');
  45.         $this->addSql('ALTER TABLE package_industry ADD CONSTRAINT FK_297BF8CEF44CABFF FOREIGN KEY (package_id) REFERENCES package (id) ON DELETE CASCADE');
  46.         $this->addSql('ALTER TABLE package_industry ADD CONSTRAINT FK_297BF8CEF22EC5D4 FOREIGN KEY (item_category_id) REFERENCES item_category (id) ON DELETE CASCADE');
  47.         $this->addSql('ALTER TABLE package_additional_features ADD CONSTRAINT FK_B947CAFFF44CABFF FOREIGN KEY (package_id) REFERENCES package (id)');
  48.         $this->addSql('ALTER TABLE package_additional_features_translation ADD CONSTRAINT FK_76A981F2C2AC5D3 FOREIGN KEY (translatable_id) REFERENCES package_additional_features (id) ON DELETE CASCADE');
  49.         $this->addSql('ALTER TABLE package_translation ADD CONSTRAINT FK_79B25F092C2AC5D3 FOREIGN KEY (translatable_id) REFERENCES package (id) ON DELETE CASCADE');
  50.         $this->addSql('ALTER TABLE user_link_login ADD CONSTRAINT FK_A2D45122A76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
  51.         $this->addSql('ALTER TABLE user_package ADD CONSTRAINT FK_8665799FF44CABFF FOREIGN KEY (package_id) REFERENCES package (id)');
  52.         $this->addSql('ALTER TABLE user_package ADD CONSTRAINT FK_8665799FA76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
  53.         $this->addSql('ALTER TABLE user_package ADD CONSTRAINT FK_8665799F8D9F6D38 FOREIGN KEY (order_id) REFERENCES orders (id)');
  54.         $this->addSql('ALTER TABLE user_package_offer ADD CONSTRAINT FK_525C2D89A76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
  55.         $this->addSql('ALTER TABLE user_package_offer ADD CONSTRAINT FK_525C2D89F44CABFF FOREIGN KEY (package_id) REFERENCES package (id)');
  56.         $this->addSql('ALTER TABLE user_package_offer ADD CONSTRAINT FK_525C2D8953C674EE FOREIGN KEY (offer_id) REFERENCES offer (id)');
  57.         $this->addSql('ALTER TABLE user_package_offer ADD CONSTRAINT FK_525C2D898D9F6D38 FOREIGN KEY (order_id) REFERENCES orders (id)');
  58.         $this->addSql('ALTER TABLE application ADD main_offer_id INT DEFAULT NULL');
  59.         $this->addSql('ALTER TABLE application ADD CONSTRAINT FK_A45BDDC18AE4659B FOREIGN KEY (main_offer_id) REFERENCES offer (id)');
  60.         $this->addSql('CREATE INDEX IDX_A45BDDC18AE4659B ON application (main_offer_id)');
  61. //        $this->addSql('DROP INDEX Logo ON file');
  62.         $this->addSql('ALTER TABLE file ADD invoice_id VARCHAR(255) DEFAULT NULL, CHANGE extenstion extension VARCHAR(255) NOT NULL');
  63. //        $this->addSql('DROP INDEX invoiceData ON invoice_data');
  64. //        $this->addSql('DROP INDEX Item ON item');
  65. //        $this->addSql('DROP INDEX search_slug ON item');
  66. //        $this->addSql('DROP INDEX updated_at ON item');
  67. //        $this->addSql('DROP INDEX use_count ON item');
  68. //        $this->addSql('DROP INDEX item_category_id ON item_item_category');
  69. //        $this->addSql('DROP INDEX itemItemCategory ON item_item_category');
  70. //        $this->addSql('DROP INDEX active ON item_category');
  71. //        $this->addSql('DROP INDEX itemCategory ON item_category');
  72.         $this->addSql('ALTER TABLE item_category ADD show_label TINYINT(1) DEFAULT NULL');
  73. //        $this->addSql('DROP INDEX points ON item_points');
  74. //        $this->addSql('DROP INDEX category ON item_sort');
  75. //        $this->addSql('DROP INDEX industry ON item_sort');
  76. //        $this->addSql('DROP INDEX item_id ON item_sort');
  77. //        $this->addSql('DROP INDEX item_id_2 ON item_sort');
  78. //        $this->addSql('DROP INDEX itemSort ON item_sort');
  79. //        $this->addSql('DROP INDEX itemSort2 ON item_sort');
  80. //        $this->addSql('DROP INDEX points ON item_sort');
  81. //        $this->addSql('DROP INDEX points_sum ON item_sort');
  82. //        $this->addSql('DROP INDEX technology ON item_sort');
  83. //        $this->addSql('DROP INDEX jobListingsItemCategoryId ON job_listings');
  84. //        $this->addSql('DROP INDEX full_name ON location');
  85. //        $this->addSql('DROP INDEX name ON location');
  86. //        $this->addSql('DROP INDEX active ON offer');
  87. //        $this->addSql('DROP INDEX active_2 ON offer');
  88. //        $this->addSql('DROP INDEX category_id ON offer');
  89. //        $this->addSql('DROP INDEX done ON offer');
  90. //        $this->addSql('DROP INDEX keywordsSearch ON offer');
  91. //        $this->addSql('DROP INDEX published_at ON offer');
  92. //        $this->addSql('DROP INDEX temporary_id ON offer');
  93.         $this->addSql('ALTER TABLE offer ADD package_id INT DEFAULT NULL, ADD offer_id INT DEFAULT NULL, ADD order_id INT DEFAULT NULL, ADD boost_date DATETIME DEFAULT NULL, ADD active_until DATETIME DEFAULT NULL, ADD update_insteps DATETIME DEFAULT NULL, ADD number_of_insteps INT DEFAULT NULL, ADD visible TINYINT(1) NOT NULL');
  94.         $this->addSql('ALTER TABLE offer ADD CONSTRAINT FK_29D6873EF44CABFF FOREIGN KEY (package_id) REFERENCES package (id)');
  95.         $this->addSql('ALTER TABLE offer ADD CONSTRAINT FK_29D6873E53C674EE FOREIGN KEY (offer_id) REFERENCES offer (id)');
  96.         $this->addSql('ALTER TABLE offer ADD CONSTRAINT FK_29D6873E8D9F6D38 FOREIGN KEY (order_id) REFERENCES orders (id)');
  97.         $this->addSql('CREATE INDEX IDX_29D6873EF44CABFF ON offer (package_id)');
  98.         $this->addSql('CREATE INDEX IDX_29D6873E53C674EE ON offer (offer_id)');
  99.         $this->addSql('CREATE INDEX IDX_29D6873E8D9F6D38 ON offer (order_id)');
  100.         $this->addSql('ALTER TABLE offer_item ADD show_label TINYINT(1) DEFAULT NULL, CHANGE item_category_id item_category_id INT DEFAULT NULL');
  101.         $this->addSql('ALTER TABLE offer_salary ADD CONSTRAINT FK_4D46CCD053C674EE FOREIGN KEY (offer_id) REFERENCES offer (id)');
  102. //        $this->addSql('DROP INDEX id ON settings');
  103.     }
  104.     public function down(Schema $schema): void
  105.     {
  106.         // this down() migration is auto-generated, please modify it to your needs
  107.         $this->addSql('ALTER TABLE offer DROP FOREIGN KEY FK_29D6873E8D9F6D38');
  108.         $this->addSql('ALTER TABLE offer DROP FOREIGN KEY FK_29D6873EF44CABFF');
  109.         $this->addSql('ALTER TABLE coupon_single_use DROP FOREIGN KEY FK_329DAD40A76ED395');
  110.         $this->addSql('ALTER TABLE offer_boost DROP FOREIGN KEY FK_D5495A8153C674EE');
  111.         $this->addSql('ALTER TABLE orders DROP FOREIGN KEY FK_E52FFDEEA76ED395');
  112.         $this->addSql('ALTER TABLE orders DROP FOREIGN KEY FK_E52FFDEEF44CABFF');
  113.         $this->addSql('ALTER TABLE orders DROP FOREIGN KEY FK_E52FFDEE3B1AF2B8');
  114.         $this->addSql('ALTER TABLE orders DROP FOREIGN KEY FK_E52FFDEE83CC659F');
  115.         $this->addSql('ALTER TABLE orders DROP FOREIGN KEY FK_E52FFDEE61124FBF');
  116.         $this->addSql('ALTER TABLE orders DROP FOREIGN KEY FK_E52FFDEEB8EF4C50');
  117.         $this->addSql('ALTER TABLE orders_additional_features DROP FOREIGN KEY FK_676A37088D9F6D38');
  118.         $this->addSql('ALTER TABLE orders_additional_features_translation DROP FOREIGN KEY FK_134EA7242C2AC5D3');
  119.         $this->addSql('ALTER TABLE package_industry DROP FOREIGN KEY FK_297BF8CEF44CABFF');
  120.         $this->addSql('ALTER TABLE package_industry DROP FOREIGN KEY FK_297BF8CEF22EC5D4');
  121.         $this->addSql('ALTER TABLE package_additional_features DROP FOREIGN KEY FK_B947CAFFF44CABFF');
  122.         $this->addSql('ALTER TABLE package_additional_features_translation DROP FOREIGN KEY FK_76A981F2C2AC5D3');
  123.         $this->addSql('ALTER TABLE package_translation DROP FOREIGN KEY FK_79B25F092C2AC5D3');
  124.         $this->addSql('ALTER TABLE user_link_login DROP FOREIGN KEY FK_A2D45122A76ED395');
  125.         $this->addSql('ALTER TABLE user_package DROP FOREIGN KEY FK_8665799FF44CABFF');
  126.         $this->addSql('ALTER TABLE user_package DROP FOREIGN KEY FK_8665799FA76ED395');
  127.         $this->addSql('ALTER TABLE user_package DROP FOREIGN KEY FK_8665799F8D9F6D38');
  128.         $this->addSql('ALTER TABLE user_package_offer DROP FOREIGN KEY FK_525C2D89A76ED395');
  129.         $this->addSql('ALTER TABLE user_package_offer DROP FOREIGN KEY FK_525C2D89F44CABFF');
  130.         $this->addSql('ALTER TABLE user_package_offer DROP FOREIGN KEY FK_525C2D8953C674EE');
  131.         $this->addSql('ALTER TABLE user_package_offer DROP FOREIGN KEY FK_525C2D898D9F6D38');
  132.         $this->addSql('DROP TABLE company_cache');
  133.         $this->addSql('DROP TABLE coupon_discount');
  134.         $this->addSql('DROP TABLE coupon_single_use');
  135.         $this->addSql('DROP TABLE offer_boost');
  136.         $this->addSql('DROP TABLE offer_name_cache');
  137.         $this->addSql('DROP TABLE orders');
  138.         $this->addSql('DROP TABLE orders_additional_features');
  139.         $this->addSql('DROP TABLE orders_additional_features_translation');
  140.         $this->addSql('DROP TABLE package');
  141.         $this->addSql('DROP TABLE package_industry');
  142.         $this->addSql('DROP TABLE package_additional_features');
  143.         $this->addSql('DROP TABLE package_additional_features_translation');
  144.         $this->addSql('DROP TABLE package_translation');
  145.         $this->addSql('DROP TABLE technology_cache');
  146.         $this->addSql('DROP TABLE user_link_login');
  147.         $this->addSql('DROP TABLE user_package');
  148.         $this->addSql('DROP TABLE user_package_offer');
  149.         $this->addSql('ALTER TABLE application DROP FOREIGN KEY FK_A45BDDC18AE4659B');
  150.         $this->addSql('DROP INDEX IDX_A45BDDC18AE4659B ON application');
  151.         $this->addSql('ALTER TABLE application DROP main_offer_id');
  152.         $this->addSql('ALTER TABLE file DROP invoice_id, CHANGE extension extenstion VARCHAR(255) NOT NULL');
  153.         $this->addSql('CREATE INDEX Logo ON file (id)');
  154.         $this->addSql('CREATE INDEX invoiceData ON invoice_data (id)');
  155.         $this->addSql('CREATE INDEX Item ON item (id)');
  156.         $this->addSql('CREATE INDEX search_slug ON item (search_slug)');
  157.         $this->addSql('CREATE INDEX updated_at ON item (updated_at)');
  158.         $this->addSql('CREATE INDEX use_count ON item (use_count)');
  159.         $this->addSql('ALTER TABLE item_category DROP show_label');
  160.         $this->addSql('CREATE INDEX active ON item_category (active)');
  161.         $this->addSql('CREATE INDEX itemCategory ON item_category (id, item_category_id)');
  162.         $this->addSql('CREATE INDEX item_category_id ON item_item_category (item_category_id, item_id)');
  163.         $this->addSql('CREATE INDEX itemItemCategory ON item_item_category (item_id, item_category_id)');
  164.         $this->addSql('CREATE INDEX points ON item_points (points)');
  165.         $this->addSql('CREATE INDEX category ON item_sort (category)');
  166.         $this->addSql('CREATE INDEX industry ON item_sort (industry)');
  167.         $this->addSql('CREATE INDEX item_id ON item_sort (item_id)');
  168.         $this->addSql('CREATE INDEX item_id_2 ON item_sort (item_id, industry, points_sum)');
  169.         $this->addSql('CREATE UNIQUE INDEX itemSort ON item_sort (item_id, industry, category)');
  170.         $this->addSql('CREATE INDEX itemSort2 ON item_sort (use_count, points, technology)');
  171.         $this->addSql('CREATE INDEX points ON item_sort (points)');
  172.         $this->addSql('CREATE INDEX points_sum ON item_sort (points_sum)');
  173.         $this->addSql('CREATE INDEX technology ON item_sort (technology)');
  174.         $this->addSql('CREATE INDEX jobListingsItemCategoryId ON job_listings (item_category_id)');
  175.         $this->addSql('CREATE INDEX full_name ON location (full_name)');
  176.         $this->addSql('CREATE INDEX name ON location (name)');
  177.         $this->addSql('ALTER TABLE offer DROP FOREIGN KEY FK_29D6873E53C674EE');
  178.         $this->addSql('DROP INDEX IDX_29D6873EF44CABFF ON offer');
  179.         $this->addSql('DROP INDEX IDX_29D6873E53C674EE ON offer');
  180.         $this->addSql('DROP INDEX IDX_29D6873E8D9F6D38 ON offer');
  181.         $this->addSql('ALTER TABLE offer DROP package_id, DROP offer_id, DROP order_id, DROP boost_date, DROP active_until, DROP update_insteps, DROP number_of_insteps, DROP visible');
  182.         $this->addSql('CREATE INDEX active ON offer (active)');
  183.         $this->addSql('CREATE INDEX active_2 ON offer (active, done, published_at)');
  184.         $this->addSql('CREATE INDEX category_id ON offer (category_id)');
  185.         $this->addSql('CREATE INDEX done ON offer (done)');
  186.         $this->addSql('CREATE FULLTEXT INDEX keywordsSearch ON offer (keywords)');
  187.         $this->addSql('CREATE INDEX published_at ON offer (published_at)');
  188.         $this->addSql('CREATE INDEX temporary_id ON offer (temporary_id)');
  189.         $this->addSql('ALTER TABLE offer_item DROP show_label, CHANGE item_category_id item_category_id VARCHAR(255) DEFAULT NULL');
  190.         $this->addSql('ALTER TABLE offer_salary DROP FOREIGN KEY FK_4D46CCD053C674EE');
  191.         $this->addSql('CREATE INDEX id ON settings (id)');
  192.     }
  193. }