Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

Version20210607124904.php 78KB

před 3 roky
před 3 roky
před 3 roky
před 3 roky
před 3 roky
před 3 roky
před 3 roky
před 3 roky
před 3 roky
před 3 roky
před 3 roky
před 3 roky
před 3 roky
před 3 roky
před 3 roky
před 3 roky
před 3 roky
před 3 roky
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471
  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 Version20210607124904 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 address (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, created_by_id INT NOT NULL, updated_by_id INT NOT NULL, title VARCHAR(255) NOT NULL, type VARCHAR(31) NOT NULL, civility TINYINT(1) DEFAULT NULL, lastname VARCHAR(127) DEFAULT NULL, firstname VARCHAR(127) DEFAULT NULL, address LONGTEXT NOT NULL, zip VARCHAR(31) NOT NULL, city VARCHAR(255) NOT NULL, country VARCHAR(255) NOT NULL, company VARCHAR(255) DEFAULT NULL, siret VARCHAR(127) DEFAULT NULL, tva VARCHAR(127) DEFAULT NULL, phone LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:array)\', comment LONGTEXT DEFAULT NULL, delivery_infos LONGTEXT DEFAULT NULL, dev_alias VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, status DOUBLE PRECISION NOT NULL, INDEX IDX_D4E6F81A76ED395 (user_id), INDEX IDX_D4E6F81B03A8386 (created_by_id), INDEX IDX_D4E6F81896DBBDE (updated_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  19. $this->addSql('CREATE TABLE credit_config (id INT AUTO_INCREMENT NOT NULL, active TINYINT(1) NOT NULL, limit_amount DOUBLE PRECISION DEFAULT NULL, limit_reminder DOUBLE PRECISION DEFAULT NULL, behavior VARCHAR(31) DEFAULT NULL, process_order_checked_default TINYINT(1) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  20. $this->addSql('CREATE TABLE credit_history (id INT AUTO_INCREMENT NOT NULL, user_merchant_id INT NOT NULL, order_payment_id INT DEFAULT NULL, order_refund_id INT DEFAULT NULL, created_by_id INT DEFAULT NULL, updated_by_id INT DEFAULT NULL, amount DOUBLE PRECISION DEFAULT NULL, type VARCHAR(31) NOT NULL, dev_alias VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, mean_payment VARCHAR(255) DEFAULT NULL, reference LONGTEXT DEFAULT NULL, paid_at DATETIME DEFAULT NULL, comment LONGTEXT DEFAULT NULL, INDEX IDX_1D3E1764CE8D1CC1 (user_merchant_id), UNIQUE INDEX UNIQ_1D3E1764B7195EEE (order_payment_id), UNIQUE INDEX UNIQ_1D3E1764A41F7A2D (order_refund_id), INDEX IDX_1D3E1764B03A8386 (created_by_id), INDEX IDX_1D3E1764896DBBDE (updated_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  21. $this->addSql('CREATE TABLE document (id INT AUTO_INCREMENT NOT NULL, merchant_id INT NOT NULL, merchant_address_id INT NOT NULL, buyer_address_id INT DEFAULT NULL, created_by_id INT DEFAULT NULL, updated_by_id INT DEFAULT NULL, type VARCHAR(64) NOT NULL, reference VARCHAR(128) DEFAULT NULL, logo VARCHAR(255) DEFAULT NULL, merchant_address_text LONGTEXT NOT NULL, buyer_address_text LONGTEXT DEFAULT NULL, delivery_address_text LONGTEXT DEFAULT NULL, is_sent TINYINT(1) DEFAULT NULL, title VARCHAR(255) NOT NULL, description LONGTEXT DEFAULT NULL, meta_title VARCHAR(255) DEFAULT NULL, meta_description LONGTEXT DEFAULT NULL, old_urls LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:array)\', slug VARCHAR(255) NOT NULL, position DOUBLE PRECISION NOT NULL, status DOUBLE PRECISION NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, dev_alias VARCHAR(255) DEFAULT NULL, INDEX IDX_D8698A766796D554 (merchant_id), INDEX IDX_D8698A7697D868A5 (merchant_address_id), INDEX IDX_D8698A7656E5354 (buyer_address_id), INDEX IDX_D8698A76B03A8386 (created_by_id), INDEX IDX_D8698A76896DBBDE (updated_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  22. $this->addSql('CREATE TABLE file (id INT AUTO_INCREMENT NOT NULL, created_by_id INT NOT NULL, updated_by_id INT NOT NULL, path VARCHAR(255) DEFAULT NULL, legend VARCHAR(255) DEFAULT NULL, dev_alias VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, locales_enabled LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:array)\', position DOUBLE PRECISION NOT NULL, INDEX IDX_8C9F3610B03A8386 (created_by_id), INDEX IDX_8C9F3610896DBBDE (updated_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  23. $this->addSql('CREATE TABLE group_user (id INT AUTO_INCREMENT NOT NULL, merchant_id INT NOT NULL, created_by_id INT NOT NULL, updated_by_id INT NOT NULL, title VARCHAR(255) NOT NULL, description LONGTEXT DEFAULT NULL, meta_title VARCHAR(255) DEFAULT NULL, meta_description LONGTEXT DEFAULT NULL, old_urls LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:array)\', slug VARCHAR(255) NOT NULL, position DOUBLE PRECISION NOT NULL, status DOUBLE PRECISION NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, dev_alias VARCHAR(255) DEFAULT NULL, INDEX IDX_A4C98D396796D554 (merchant_id), INDEX IDX_A4C98D39B03A8386 (created_by_id), INDEX IDX_A4C98D39896DBBDE (updated_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  24. $this->addSql('CREATE TABLE merchant (id INT AUTO_INCREMENT NOT NULL, credit_config_id INT DEFAULT NULL, tax_rate_id INT NOT NULL, address_id INT DEFAULT NULL, created_by_id INT NOT NULL, updated_by_id INT NOT NULL, title VARCHAR(255) NOT NULL, description LONGTEXT DEFAULT NULL, meta_title VARCHAR(255) DEFAULT NULL, meta_description LONGTEXT DEFAULT NULL, old_urls LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:array)\', slug VARCHAR(255) NOT NULL, position DOUBLE PRECISION NOT NULL, status DOUBLE PRECISION NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, dev_alias VARCHAR(255) DEFAULT NULL, UNIQUE INDEX UNIQ_74AB25E1E511F091 (credit_config_id), INDEX IDX_74AB25E1FDD13F95 (tax_rate_id), UNIQUE INDEX UNIQ_74AB25E1F5B7AF75 (address_id), INDEX IDX_74AB25E1B03A8386 (created_by_id), INDEX IDX_74AB25E1896DBBDE (updated_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  25. $this->addSql('CREATE TABLE merchant_setting (id INT AUTO_INCREMENT NOT NULL, merchant_id INT NOT NULL, file_id INT DEFAULT NULL, name VARCHAR(63) NOT NULL, text LONGTEXT DEFAULT NULL, date DATETIME DEFAULT NULL, INDEX IDX_464ACD036796D554 (merchant_id), INDEX IDX_464ACD0393CB796C (file_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  26. $this->addSql('CREATE TABLE news (id INT AUTO_INCREMENT NOT NULL, merchant_id INT NOT NULL, created_by_id INT NOT NULL, updated_by_id INT NOT NULL, date DATETIME NOT NULL, is_sent TINYINT(1) DEFAULT NULL, title VARCHAR(255) NOT NULL, description LONGTEXT DEFAULT NULL, meta_title VARCHAR(255) DEFAULT NULL, meta_description LONGTEXT DEFAULT NULL, old_urls LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:array)\', slug VARCHAR(255) NOT NULL, position DOUBLE PRECISION NOT NULL, status DOUBLE PRECISION NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, dev_alias VARCHAR(255) DEFAULT NULL, INDEX IDX_1DD399506796D554 (merchant_id), INDEX IDX_1DD39950B03A8386 (created_by_id), INDEX IDX_1DD39950896DBBDE (updated_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  27. $this->addSql('CREATE TABLE newsletter (id INT AUTO_INCREMENT NOT NULL, merchant_id INT DEFAULT NULL, created_by_id INT NOT NULL, updated_by_id INT NOT NULL, is_main TINYINT(1) DEFAULT NULL, title VARCHAR(255) NOT NULL, description LONGTEXT DEFAULT NULL, meta_title VARCHAR(255) DEFAULT NULL, meta_description LONGTEXT DEFAULT NULL, old_urls LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:array)\', slug VARCHAR(255) NOT NULL, position DOUBLE PRECISION NOT NULL, status DOUBLE PRECISION NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, dev_alias VARCHAR(255) DEFAULT NULL, INDEX IDX_7E8585C86796D554 (merchant_id), INDEX IDX_7E8585C8B03A8386 (created_by_id), INDEX IDX_7E8585C8896DBBDE (updated_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  28. $this->addSql('CREATE TABLE order_payment (id INT AUTO_INCREMENT NOT NULL, created_by_id INT NOT NULL, updated_by_id INT NOT NULL, order_shop_id INT NOT NULL, dev_alias VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, editable TINYINT(1) NOT NULL, mean_payment VARCHAR(255) DEFAULT NULL, reference LONGTEXT DEFAULT NULL, paid_at DATETIME DEFAULT NULL, amount DOUBLE PRECISION NOT NULL, comment LONGTEXT DEFAULT NULL, INDEX IDX_9B522D46B03A8386 (created_by_id), INDEX IDX_9B522D46896DBBDE (updated_by_id), INDEX IDX_9B522D46BB6C6D96 (order_shop_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  29. $this->addSql('CREATE TABLE order_product (id INT AUTO_INCREMENT NOT NULL, order_shop_id INT NOT NULL, product_id INT DEFAULT NULL, order_product_reduction_catalog_id INT DEFAULT NULL, unit_id INT DEFAULT NULL, tax_rate_id INT DEFAULT NULL, quantity_order INT NOT NULL, quantity_product DOUBLE PRECISION NOT NULL, title VARCHAR(255) NOT NULL, price DOUBLE PRECISION DEFAULT NULL, buying_price DOUBLE PRECISION DEFAULT NULL, INDEX IDX_2530ADE6BB6C6D96 (order_shop_id), INDEX IDX_2530ADE64584665A (product_id), UNIQUE INDEX UNIQ_2530ADE6E0D401EA (order_product_reduction_catalog_id), INDEX IDX_2530ADE6F8BD700D (unit_id), INDEX IDX_2530ADE6FDD13F95 (tax_rate_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  30. $this->addSql('CREATE TABLE order_product_reduction_catalog (id INT AUTO_INCREMENT NOT NULL, title VARCHAR(255) NOT NULL, value DOUBLE PRECISION DEFAULT NULL, unit VARCHAR(20) DEFAULT NULL, behavior_tax_rate VARCHAR(20) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  31. $this->addSql('CREATE TABLE order_product_refund (id INT AUTO_INCREMENT NOT NULL, order_product_id INT NOT NULL, quantity_refund INT NOT NULL, title VARCHAR(255) DEFAULT NULL, price DOUBLE PRECISION NOT NULL, UNIQUE INDEX UNIQ_5120854CF65E9B0F (order_product_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  32. $this->addSql('CREATE TABLE order_reduction_cart (id INT AUTO_INCREMENT NOT NULL, order_shop_id INT NOT NULL, reduction_cart_id INT NOT NULL, title VARCHAR(255) NOT NULL, value DOUBLE PRECISION DEFAULT NULL, unit VARCHAR(20) DEFAULT NULL, behavior_tax_rate VARCHAR(20) DEFAULT NULL, free_shipping TINYINT(1) DEFAULT NULL, applied_to VARCHAR(25) NOT NULL, type VARCHAR(25) NOT NULL, INDEX IDX_82A8D5B9BB6C6D96 (order_shop_id), INDEX IDX_82A8D5B99CEF50F6 (reduction_cart_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  33. $this->addSql('CREATE TABLE order_reduction_credit (id INT AUTO_INCREMENT NOT NULL, order_shop_id INT NOT NULL, reduction_credit_id INT NOT NULL, title VARCHAR(255) NOT NULL, type VARCHAR(255) NOT NULL, value DOUBLE PRECISION DEFAULT NULL, unit VARCHAR(20) DEFAULT NULL, behavior_tax_rate VARCHAR(20) DEFAULT NULL, INDEX IDX_9798E732BB6C6D96 (order_shop_id), INDEX IDX_9798E7326103B276 (reduction_credit_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  34. $this->addSql('CREATE TABLE order_refund (id INT AUTO_INCREMENT NOT NULL, document_id INT NOT NULL, created_by_id INT NOT NULL, updated_by_id INT NOT NULL, order_shop_id INT NOT NULL, delivery_refund_amount DOUBLE PRECISION DEFAULT NULL, dev_alias VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, editable TINYINT(1) NOT NULL, mean_payment VARCHAR(255) DEFAULT NULL, reference LONGTEXT DEFAULT NULL, paid_at DATETIME DEFAULT NULL, amount DOUBLE PRECISION NOT NULL, comment LONGTEXT DEFAULT NULL, UNIQUE INDEX UNIQ_98A3048DC33F7837 (document_id), INDEX IDX_98A3048DB03A8386 (created_by_id), INDEX IDX_98A3048D896DBBDE (updated_by_id), INDEX IDX_98A3048DBB6C6D96 (order_shop_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  35. $this->addSql('CREATE TABLE order_shop (id INT AUTO_INCREMENT NOT NULL, merchant_id INT NOT NULL, user_id INT DEFAULT NULL, visitor_id INT DEFAULT NULL, invoice_address_id INT DEFAULT NULL, order_status_id INT NOT NULL, created_by_id INT DEFAULT NULL, updated_by_id INT DEFAULT NULL, section_id INT NOT NULL, invoice_address_text LONGTEXT DEFAULT NULL, validation_date DATETIME DEFAULT NULL, comment LONGTEXT DEFAULT NULL, auto_payment TINYINT(1) DEFAULT NULL, mean_payment VARCHAR(31) DEFAULT NULL, delivery_infos LONGTEXT DEFAULT NULL, dev_alias VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, INDEX IDX_E19B76B56796D554 (merchant_id), INDEX IDX_E19B76B5A76ED395 (user_id), INDEX IDX_E19B76B570BEE6D (visitor_id), INDEX IDX_E19B76B5C6BDFEB (invoice_address_id), INDEX IDX_E19B76B5D7707B45 (order_status_id), INDEX IDX_E19B76B5B03A8386 (created_by_id), INDEX IDX_E19B76B5896DBBDE (updated_by_id), INDEX IDX_E19B76B5D823E37A (section_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  36. $this->addSql('CREATE TABLE order_shop_document_interface (order_shop_id INT NOT NULL, document_interface_id INT NOT NULL, INDEX IDX_3C004E6BB6C6D96 (order_shop_id), INDEX IDX_3C004E66EEC8F3 (document_interface_id), PRIMARY KEY(order_shop_id, document_interface_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  37. $this->addSql('CREATE TABLE order_status (id INT AUTO_INCREMENT NOT NULL, title VARCHAR(255) NOT NULL, description LONGTEXT DEFAULT NULL, alias VARCHAR(255) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  38. $this->addSql('CREATE TABLE order_status_order_status_interface (order_status_id INT NOT NULL, order_status_interface_id INT NOT NULL, INDEX IDX_31CB58CAD7707B45 (order_status_id), INDEX IDX_31CB58CAAEF3C90F (order_status_interface_id), PRIMARY KEY(order_status_id, order_status_interface_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  39. $this->addSql('CREATE TABLE order_status_history (id INT AUTO_INCREMENT NOT NULL, order_shop_id INT NOT NULL, order_status_id INT NOT NULL, created_by_id INT DEFAULT NULL, updated_by_id INT DEFAULT NULL, origin VARCHAR(31) NOT NULL, dev_alias VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, INDEX IDX_471AD77EBB6C6D96 (order_shop_id), INDEX IDX_471AD77ED7707B45 (order_status_id), INDEX IDX_471AD77EB03A8386 (created_by_id), INDEX IDX_471AD77E896DBBDE (updated_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  40. $this->addSql('CREATE TABLE page (id INT AUTO_INCREMENT NOT NULL, image_id INT DEFAULT NULL, merchant_id INT NOT NULL, section_id INT DEFAULT NULL, created_by_id INT NOT NULL, updated_by_id INT NOT NULL, content LONGTEXT DEFAULT NULL, title VARCHAR(255) NOT NULL, description LONGTEXT DEFAULT NULL, meta_title VARCHAR(255) DEFAULT NULL, meta_description LONGTEXT DEFAULT NULL, old_urls LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:array)\', slug VARCHAR(255) NOT NULL, position DOUBLE PRECISION NOT NULL, status DOUBLE PRECISION NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, dev_alias VARCHAR(255) DEFAULT NULL, INDEX IDX_140AB6203DA5256D (image_id), INDEX IDX_140AB6206796D554 (merchant_id), INDEX IDX_140AB620D823E37A (section_id), INDEX IDX_140AB620B03A8386 (created_by_id), INDEX IDX_140AB620896DBBDE (updated_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  41. $this->addSql('CREATE TABLE page_file (page_id INT NOT NULL, file_id INT NOT NULL, INDEX IDX_B5B2ACAC4663E4 (page_id), INDEX IDX_B5B2ACA93CB796C (file_id), PRIMARY KEY(page_id, file_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  42. $this->addSql('CREATE TABLE point_sale (id INT AUTO_INCREMENT NOT NULL, address_id INT NOT NULL, created_by_id INT NOT NULL, updated_by_id INT NOT NULL, code VARCHAR(63) DEFAULT NULL, title VARCHAR(255) NOT NULL, description LONGTEXT DEFAULT NULL, meta_title VARCHAR(255) DEFAULT NULL, meta_description LONGTEXT DEFAULT NULL, old_urls LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:array)\', slug VARCHAR(255) NOT NULL, position DOUBLE PRECISION NOT NULL, status DOUBLE PRECISION NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, dev_alias VARCHAR(255) DEFAULT NULL, order_amount_min DOUBLE PRECISION NOT NULL, UNIQUE INDEX UNIQ_6CCB2767F5B7AF75 (address_id), INDEX IDX_6CCB2767B03A8386 (created_by_id), INDEX IDX_6CCB2767896DBBDE (updated_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  43. $this->addSql('CREATE TABLE point_sale_merchant_interface (point_sale_id INT NOT NULL, merchant_interface_id INT NOT NULL, INDEX IDX_7711E325FDAAB1A4 (point_sale_id), INDEX IDX_7711E3252F3319E1 (merchant_interface_id), PRIMARY KEY(point_sale_id, merchant_interface_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  44. $this->addSql('CREATE TABLE point_sale_day_info (id INT AUTO_INCREMENT NOT NULL, point_sale_id INT NOT NULL, created_by_id INT NOT NULL, updated_by_id INT NOT NULL, active TINYINT(1) NOT NULL, day SMALLINT NOT NULL, description LONGTEXT DEFAULT NULL, dev_alias VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, INDEX IDX_34BC1A33FDAAB1A4 (point_sale_id), INDEX IDX_34BC1A33B03A8386 (created_by_id), INDEX IDX_34BC1A33896DBBDE (updated_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  45. $this->addSql('CREATE TABLE product (id INT AUTO_INCREMENT NOT NULL, created_by_id INT DEFAULT NULL, updated_by_id INT DEFAULT NULL, product_family_id INT NOT NULL, unit_id INT DEFAULT NULL, tax_rate_id INT DEFAULT NULL, title VARCHAR(255) DEFAULT NULL, origin_product TINYINT(1) DEFAULT NULL, dev_alias VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, position DOUBLE PRECISION NOT NULL, buying_price_by_ref_unit DOUBLE PRECISION DEFAULT NULL, price_by_ref_unit DOUBLE PRECISION DEFAULT NULL, quantity DOUBLE PRECISION DEFAULT NULL, available_quantity DOUBLE PRECISION DEFAULT NULL, available_quantity_default DOUBLE PRECISION DEFAULT NULL, property_expiration_date VARCHAR(255) DEFAULT NULL, price DOUBLE PRECISION DEFAULT NULL, buying_price DOUBLE PRECISION DEFAULT NULL, status DOUBLE PRECISION NOT NULL, INDEX IDX_D34A04ADB03A8386 (created_by_id), INDEX IDX_D34A04AD896DBBDE (updated_by_id), INDEX IDX_D34A04ADADFEE0E7 (product_family_id), INDEX IDX_D34A04ADF8BD700D (unit_id), INDEX IDX_D34A04ADFDD13F95 (tax_rate_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  46. $this->addSql('CREATE TABLE product_category (id INT AUTO_INCREMENT NOT NULL, merchant_id INT NOT NULL, parent_id INT DEFAULT NULL, section_id INT NOT NULL, created_by_id INT NOT NULL, updated_by_id INT NOT NULL, sale_status TINYINT(1) NOT NULL, title VARCHAR(255) NOT NULL, description LONGTEXT DEFAULT NULL, meta_title VARCHAR(255) DEFAULT NULL, meta_description LONGTEXT DEFAULT NULL, old_urls LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:array)\', slug VARCHAR(255) NOT NULL, position DOUBLE PRECISION NOT NULL, status DOUBLE PRECISION NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, dev_alias VARCHAR(255) DEFAULT NULL, INDEX IDX_CDFC73566796D554 (merchant_id), INDEX IDX_CDFC7356727ACA70 (parent_id), INDEX IDX_CDFC7356D823E37A (section_id), INDEX IDX_CDFC7356B03A8386 (created_by_id), INDEX IDX_CDFC7356896DBBDE (updated_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  47. $this->addSql('CREATE TABLE product_family (id INT AUTO_INCREMENT NOT NULL, created_by_id INT DEFAULT NULL, updated_by_id INT DEFAULT NULL, merchant_id INT NOT NULL, unit_id INT DEFAULT NULL, tax_rate_id INT DEFAULT NULL, active_products TINYINT(1) NOT NULL, products_type VARCHAR(255) DEFAULT NULL, products_quantity_as_title TINYINT(1) DEFAULT NULL, quantity_label VARCHAR(255) DEFAULT NULL, subtitle VARCHAR(255) DEFAULT NULL, warning_message LONGTEXT DEFAULT NULL, warning_message_type VARCHAR(255) DEFAULT NULL, note LONGTEXT DEFAULT NULL, behavior_out_of_stock VARCHAR(31) DEFAULT NULL, behavior_count_stock VARCHAR(31) NOT NULL, behavior_display_sale VARCHAR(255) NOT NULL, property_novelty_expiration_date DATE DEFAULT NULL, property_organic_label VARCHAR(255) DEFAULT NULL, property_allergens LONGTEXT DEFAULT NULL, property_composition LONGTEXT DEFAULT NULL, property_fragrances LONGTEXT DEFAULT NULL, property_packaging LONGTEXT DEFAULT NULL, property_characteristics LONGTEXT DEFAULT NULL, property_weight LONGTEXT DEFAULT NULL, property_quantity LONGTEXT DEFAULT NULL, property_feature LONGTEXT DEFAULT NULL, property_variety LONGTEXT DEFAULT NULL, property_alcohol_level LONGTEXT DEFAULT NULL, behavior_expiration_date VARCHAR(255) DEFAULT NULL, type_expiration_date VARCHAR(255) DEFAULT NULL, behavior_add_to_cart VARCHAR(32) DEFAULT NULL, behavior_price VARCHAR(31) NOT NULL, sale_status TINYINT(1) NOT NULL, title VARCHAR(255) NOT NULL, description LONGTEXT DEFAULT NULL, meta_title VARCHAR(255) DEFAULT NULL, meta_description LONGTEXT DEFAULT NULL, old_urls LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:array)\', slug VARCHAR(255) NOT NULL, position DOUBLE PRECISION NOT NULL, status DOUBLE PRECISION NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, dev_alias VARCHAR(255) DEFAULT NULL, buying_price_by_ref_unit DOUBLE PRECISION DEFAULT NULL, price_by_ref_unit DOUBLE PRECISION DEFAULT NULL, quantity DOUBLE PRECISION DEFAULT NULL, available_quantity DOUBLE PRECISION DEFAULT NULL, available_quantity_default DOUBLE PRECISION DEFAULT NULL, property_expiration_date VARCHAR(255) DEFAULT NULL, price DOUBLE PRECISION DEFAULT NULL, buying_price DOUBLE PRECISION DEFAULT NULL, INDEX IDX_C79A60FFB03A8386 (created_by_id), INDEX IDX_C79A60FF896DBBDE (updated_by_id), INDEX IDX_C79A60FF6796D554 (merchant_id), INDEX IDX_C79A60FFF8BD700D (unit_id), INDEX IDX_C79A60FFFDD13F95 (tax_rate_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  48. $this->addSql('CREATE TABLE product_family_product_category_interface (product_family_id INT NOT NULL, product_category_interface_id INT NOT NULL, INDEX IDX_CE291DDCADFEE0E7 (product_family_id), INDEX IDX_CE291DDC5734039 (product_category_interface_id), PRIMARY KEY(product_family_id, product_category_interface_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  49. $this->addSql('CREATE TABLE product_family_section_interface (product_family_id INT NOT NULL, section_interface_id INT NOT NULL, INDEX IDX_2991468DADFEE0E7 (product_family_id), INDEX IDX_2991468D6BA77450 (section_interface_id), PRIMARY KEY(product_family_id, section_interface_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  50. $this->addSql('CREATE TABLE reduction_cart (id INT AUTO_INCREMENT NOT NULL, merchant_id INT NOT NULL, created_by_id INT NOT NULL, updated_by_id INT NOT NULL, title VARCHAR(255) NOT NULL, codes LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:array)\', available_quantity INT NOT NULL, available_quantity_per_user INT NOT NULL, uncombinable_types LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:array)\', available_quantity_per_code INT DEFAULT NULL, dev_alias VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, status DOUBLE PRECISION NOT NULL, order_amount_min DOUBLE PRECISION NOT NULL, value DOUBLE PRECISION DEFAULT NULL, unit VARCHAR(20) DEFAULT NULL, behavior_tax_rate VARCHAR(20) DEFAULT NULL, free_shipping TINYINT(1) DEFAULT NULL, applied_to VARCHAR(25) NOT NULL, type VARCHAR(25) NOT NULL, date_start DATETIME DEFAULT NULL, date_end DATETIME DEFAULT NULL, permanent TINYINT(1) NOT NULL, INDEX IDX_EAD805096796D554 (merchant_id), INDEX IDX_EAD80509B03A8386 (created_by_id), INDEX IDX_EAD80509896DBBDE (updated_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  51. $this->addSql('CREATE TABLE reduction_cart_point_sale_interface (reduction_cart_id INT NOT NULL, point_sale_interface_id INT NOT NULL, INDEX IDX_7DA5ED389CEF50F6 (reduction_cart_id), INDEX IDX_7DA5ED38A72A2A90 (point_sale_interface_id), PRIMARY KEY(reduction_cart_id, point_sale_interface_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  52. $this->addSql('CREATE TABLE reduction_cart_reduction_cart_interface (reduction_cart_id INT NOT NULL, reduction_cart_interface_id INT NOT NULL, INDEX IDX_2B4A9229CEF50F6 (reduction_cart_id), INDEX IDX_2B4A9227B3A6295 (reduction_cart_interface_id), PRIMARY KEY(reduction_cart_id, reduction_cart_interface_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  53. $this->addSql('CREATE TABLE reduction_cart_user_interface (reduction_cart_id INT NOT NULL, user_interface_id INT NOT NULL, INDEX IDX_4BFD6F369CEF50F6 (reduction_cart_id), INDEX IDX_4BFD6F362BC79580 (user_interface_id), PRIMARY KEY(reduction_cart_id, user_interface_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  54. $this->addSql('CREATE TABLE reduction_cart_group_user_interface (reduction_cart_id INT NOT NULL, group_user_interface_id INT NOT NULL, INDEX IDX_162585209CEF50F6 (reduction_cart_id), INDEX IDX_16258520F583BABC (group_user_interface_id), PRIMARY KEY(reduction_cart_id, group_user_interface_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  55. $this->addSql('CREATE TABLE reduction_catalog (id INT AUTO_INCREMENT NOT NULL, merchant_id INT NOT NULL, product_family_id INT DEFAULT NULL, created_by_id INT NOT NULL, updated_by_id INT NOT NULL, title VARCHAR(255) NOT NULL, dev_alias VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, status DOUBLE PRECISION NOT NULL, value DOUBLE PRECISION DEFAULT NULL, unit VARCHAR(20) DEFAULT NULL, behavior_tax_rate VARCHAR(20) DEFAULT NULL, date_start DATETIME DEFAULT NULL, date_end DATETIME DEFAULT NULL, permanent TINYINT(1) NOT NULL, INDEX IDX_9D16AF0E6796D554 (merchant_id), UNIQUE INDEX UNIQ_9D16AF0EADFEE0E7 (product_family_id), INDEX IDX_9D16AF0EB03A8386 (created_by_id), INDEX IDX_9D16AF0E896DBBDE (updated_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  56. $this->addSql('CREATE TABLE reduction_catalog_product_family_interface (reduction_catalog_id INT NOT NULL, product_family_interface_id INT NOT NULL, INDEX IDX_D71BD4DBB194FDD0 (reduction_catalog_id), INDEX IDX_D71BD4DB4537D78D (product_family_interface_id), PRIMARY KEY(reduction_catalog_id, product_family_interface_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  57. $this->addSql('CREATE TABLE reduction_catalog_product_category_interface (reduction_catalog_id INT NOT NULL, product_category_interface_id INT NOT NULL, INDEX IDX_4D456464B194FDD0 (reduction_catalog_id), INDEX IDX_4D4564645734039 (product_category_interface_id), PRIMARY KEY(reduction_catalog_id, product_category_interface_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  58. $this->addSql('CREATE TABLE reduction_catalog_user_interface (reduction_catalog_id INT NOT NULL, user_interface_id INT NOT NULL, INDEX IDX_FB0FFDFAB194FDD0 (reduction_catalog_id), INDEX IDX_FB0FFDFA2BC79580 (user_interface_id), PRIMARY KEY(reduction_catalog_id, user_interface_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  59. $this->addSql('CREATE TABLE reduction_catalog_group_user_interface (reduction_catalog_id INT NOT NULL, group_user_interface_id INT NOT NULL, INDEX IDX_32F80FA3B194FDD0 (reduction_catalog_id), INDEX IDX_32F80FA3F583BABC (group_user_interface_id), PRIMARY KEY(reduction_catalog_id, group_user_interface_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  60. $this->addSql('CREATE TABLE reduction_credit (id INT AUTO_INCREMENT NOT NULL, merchant_id INT NOT NULL, owner_id INT DEFAULT NULL, created_by_id INT NOT NULL, updated_by_id INT NOT NULL, title VARCHAR(255) NOT NULL, type VARCHAR(255) NOT NULL, sended TINYINT(1) DEFAULT NULL, dev_alias VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, value DOUBLE PRECISION DEFAULT NULL, unit VARCHAR(20) DEFAULT NULL, behavior_tax_rate VARCHAR(20) DEFAULT NULL, status DOUBLE PRECISION NOT NULL, INDEX IDX_F58EF32E6796D554 (merchant_id), INDEX IDX_F58EF32E7E3C61F9 (owner_id), INDEX IDX_F58EF32EB03A8386 (created_by_id), INDEX IDX_F58EF32E896DBBDE (updated_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  61. $this->addSql('CREATE TABLE reduction_credit_user_interface (reduction_credit_id INT NOT NULL, user_interface_id INT NOT NULL, INDEX IDX_1E04D3826103B276 (reduction_credit_id), INDEX IDX_1E04D3822BC79580 (user_interface_id), PRIMARY KEY(reduction_credit_id, user_interface_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  62. $this->addSql('CREATE TABLE reminder (id INT AUTO_INCREMENT NOT NULL, merchant_id INT NOT NULL, created_by_id INT NOT NULL, updated_by_id INT NOT NULL, title VARCHAR(255) NOT NULL, description LONGTEXT DEFAULT NULL, entity_name VARCHAR(255) DEFAULT NULL, entity_id INT DEFAULT NULL, entity_action VARCHAR(255) DEFAULT NULL, date_reminder DATE DEFAULT NULL, done TINYINT(1) NOT NULL, dev_alias VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, INDEX IDX_40374F406796D554 (merchant_id), INDEX IDX_40374F40B03A8386 (created_by_id), INDEX IDX_40374F40896DBBDE (updated_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  63. $this->addSql('CREATE TABLE reminder_user_interface (reminder_id INT NOT NULL, user_interface_id INT NOT NULL, INDEX IDX_7FD2584BD987BE75 (reminder_id), INDEX IDX_7FD2584B2BC79580 (user_interface_id), PRIMARY KEY(reminder_id, user_interface_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  64. $this->addSql('CREATE TABLE section (id INT AUTO_INCREMENT NOT NULL, merchant_id INT NOT NULL, created_by_id INT NOT NULL, updated_by_id INT NOT NULL, cycle VARCHAR(32) NOT NULL, is_default TINYINT(1) DEFAULT NULL, color VARCHAR(32) NOT NULL, title VARCHAR(255) NOT NULL, description LONGTEXT DEFAULT NULL, meta_title VARCHAR(255) DEFAULT NULL, meta_description LONGTEXT DEFAULT NULL, old_urls LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:array)\', slug VARCHAR(255) NOT NULL, position DOUBLE PRECISION NOT NULL, status DOUBLE PRECISION NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, dev_alias VARCHAR(255) DEFAULT NULL, INDEX IDX_2D737AEF6796D554 (merchant_id), INDEX IDX_2D737AEFB03A8386 (created_by_id), INDEX IDX_2D737AEF896DBBDE (updated_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  65. $this->addSql('CREATE TABLE section_setting (id INT AUTO_INCREMENT NOT NULL, section_id INT NOT NULL, file_id INT DEFAULT NULL, name VARCHAR(63) NOT NULL, text LONGTEXT DEFAULT NULL, date DATETIME DEFAULT NULL, INDEX IDX_4D337597D823E37A (section_id), INDEX IDX_4D33759793CB796C (file_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  66. $this->addSql('CREATE TABLE tax_rate (id INT AUTO_INCREMENT NOT NULL, created_by_id INT NOT NULL, updated_by_id INT NOT NULL, title VARCHAR(255) NOT NULL, value DOUBLE PRECISION NOT NULL, dev_alias VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, INDEX IDX_C36330C1B03A8386 (created_by_id), INDEX IDX_C36330C1896DBBDE (updated_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  67. $this->addSql('CREATE TABLE ticket (id INT AUTO_INCREMENT NOT NULL, created_by_id INT DEFAULT NULL, updated_by_id INT DEFAULT NULL, merchant_id INT NOT NULL, order_shop_id INT DEFAULT NULL, user_id INT DEFAULT NULL, type VARCHAR(32) NOT NULL, status VARCHAR(32) NOT NULL, subject VARCHAR(255) NOT NULL, tags LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:array)\', visitor_firstname VARCHAR(64) DEFAULT NULL, visitor_lastname VARCHAR(64) DEFAULT NULL, visitor_email VARCHAR(128) DEFAULT NULL, visitor_token VARCHAR(255) DEFAULT NULL, dev_alias VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, INDEX IDX_97A0ADA3B03A8386 (created_by_id), INDEX IDX_97A0ADA3896DBBDE (updated_by_id), INDEX IDX_97A0ADA36796D554 (merchant_id), INDEX IDX_97A0ADA3BB6C6D96 (order_shop_id), INDEX IDX_97A0ADA3A76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  68. $this->addSql('CREATE TABLE ticket_message (id INT AUTO_INCREMENT NOT NULL, created_by_id INT DEFAULT NULL, updated_by_id INT DEFAULT NULL, ticket_id INT NOT NULL, message LONGTEXT NOT NULL, answer_by_admin TINYINT(1) DEFAULT NULL, image_filename VARCHAR(255) DEFAULT NULL, dev_alias VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, status DOUBLE PRECISION NOT NULL, INDEX IDX_BA71692DB03A8386 (created_by_id), INDEX IDX_BA71692D896DBBDE (updated_by_id), INDEX IDX_BA71692D700047D2 (ticket_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  69. $this->addSql('CREATE TABLE unit (id INT AUTO_INCREMENT NOT NULL, unit_reference_id INT DEFAULT NULL, created_by_id INT NOT NULL, updated_by_id INT NOT NULL, unit VARCHAR(32) NOT NULL, wording VARCHAR(32) NOT NULL, wording_unit VARCHAR(32) NOT NULL, wording_short VARCHAR(32) NOT NULL, coefficient INT NOT NULL, dev_alias VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, INDEX IDX_DCBB0C53C4D33C3E (unit_reference_id), INDEX IDX_DCBB0C53B03A8386 (created_by_id), INDEX IDX_DCBB0C53896DBBDE (updated_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  70. $this->addSql('CREATE TABLE user (id INT AUTO_INCREMENT NOT NULL, favorite_merchant_id INT DEFAULT NULL, phone VARCHAR(20) DEFAULT NULL, behavior_display_price VARCHAR(64) DEFAULT NULL, firstname VARCHAR(64) DEFAULT NULL, lastname VARCHAR(64) DEFAULT NULL, gender TINYINT(1) DEFAULT NULL, ticket_types_notification LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:array)\', email VARCHAR(180) NOT NULL, roles LONGTEXT NOT NULL COMMENT \'(DC2Type:json)\', password VARCHAR(255) NOT NULL, is_verified TINYINT(1) NOT NULL, UNIQUE INDEX UNIQ_8D93D649E7927C74 (email), INDEX IDX_8D93D649A4849017 (favorite_merchant_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  71. $this->addSql('CREATE TABLE user_newsletter_interface (user_id INT NOT NULL, newsletter_interface_id INT NOT NULL, INDEX IDX_276FB522A76ED395 (user_id), INDEX IDX_276FB522A0E6D8FC (newsletter_interface_id), PRIMARY KEY(user_id, newsletter_interface_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  72. $this->addSql('CREATE TABLE user_group_user_interface (user_id INT NOT NULL, group_user_interface_id INT NOT NULL, INDEX IDX_12B87B34A76ED395 (user_id), INDEX IDX_12B87B34F583BABC (group_user_interface_id), PRIMARY KEY(user_id, group_user_interface_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  73. $this->addSql('CREATE TABLE user_product_family_interface (user_id INT NOT NULL, product_family_interface_id INT NOT NULL, INDEX IDX_6F63A287A76ED395 (user_id), INDEX IDX_6F63A2874537D78D (product_family_interface_id), PRIMARY KEY(user_id, product_family_interface_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  74. $this->addSql('CREATE TABLE user_merchant (id INT AUTO_INCREMENT NOT NULL, user_id INT NOT NULL, merchant_id INT NOT NULL, current_admin_section_id INT DEFAULT NULL, credit DOUBLE PRECISION DEFAULT NULL, credit_active TINYINT(1) NOT NULL, active TINYINT(1) NOT NULL, roles LONGTEXT NOT NULL COMMENT \'(DC2Type:json)\', INDEX IDX_9426C1E1A76ED395 (user_id), INDEX IDX_9426C1E16796D554 (merchant_id), INDEX IDX_9426C1E1FE54D809 (current_admin_section_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  75. $this->addSql('CREATE TABLE user_point_sale (id INT AUTO_INCREMENT NOT NULL, user_id INT NOT NULL, point_sale_id INT NOT NULL, comment LONGTEXT DEFAULT NULL, INDEX IDX_CBACE18BA76ED395 (user_id), INDEX IDX_CBACE18BFDAAB1A4 (point_sale_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  76. $this->addSql('CREATE TABLE visitor (id INT AUTO_INCREMENT NOT NULL, cookie VARCHAR(255) NOT NULL, last_access DATETIME NOT NULL, ip VARCHAR(255) NOT NULL, total_visit INT NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  77. $this->addSql('ALTER TABLE address ADD CONSTRAINT FK_D4E6F81A76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
  78. $this->addSql('ALTER TABLE address ADD CONSTRAINT FK_D4E6F81B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
  79. $this->addSql('ALTER TABLE address ADD CONSTRAINT FK_D4E6F81896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
  80. $this->addSql('ALTER TABLE credit_history ADD CONSTRAINT FK_1D3E1764CE8D1CC1 FOREIGN KEY (user_merchant_id) REFERENCES user_merchant (id)');
  81. $this->addSql('ALTER TABLE credit_history ADD CONSTRAINT FK_1D3E1764B7195EEE FOREIGN KEY (order_payment_id) REFERENCES order_payment (id)');
  82. $this->addSql('ALTER TABLE credit_history ADD CONSTRAINT FK_1D3E1764A41F7A2D FOREIGN KEY (order_refund_id) REFERENCES order_refund (id)');
  83. $this->addSql('ALTER TABLE credit_history ADD CONSTRAINT FK_1D3E1764B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
  84. $this->addSql('ALTER TABLE credit_history ADD CONSTRAINT FK_1D3E1764896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
  85. $this->addSql('ALTER TABLE document ADD CONSTRAINT FK_D8698A766796D554 FOREIGN KEY (merchant_id) REFERENCES merchant (id)');
  86. $this->addSql('ALTER TABLE document ADD CONSTRAINT FK_D8698A7697D868A5 FOREIGN KEY (merchant_address_id) REFERENCES address (id)');
  87. $this->addSql('ALTER TABLE document ADD CONSTRAINT FK_D8698A7656E5354 FOREIGN KEY (buyer_address_id) REFERENCES address (id)');
  88. $this->addSql('ALTER TABLE document ADD CONSTRAINT FK_D8698A76B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
  89. $this->addSql('ALTER TABLE document ADD CONSTRAINT FK_D8698A76896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
  90. $this->addSql('ALTER TABLE file ADD CONSTRAINT FK_8C9F3610B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
  91. $this->addSql('ALTER TABLE file ADD CONSTRAINT FK_8C9F3610896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
  92. $this->addSql('ALTER TABLE group_user ADD CONSTRAINT FK_A4C98D396796D554 FOREIGN KEY (merchant_id) REFERENCES merchant (id)');
  93. $this->addSql('ALTER TABLE group_user ADD CONSTRAINT FK_A4C98D39B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
  94. $this->addSql('ALTER TABLE group_user ADD CONSTRAINT FK_A4C98D39896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
  95. $this->addSql('ALTER TABLE merchant ADD CONSTRAINT FK_74AB25E1E511F091 FOREIGN KEY (credit_config_id) REFERENCES credit_config (id)');
  96. $this->addSql('ALTER TABLE merchant ADD CONSTRAINT FK_74AB25E1FDD13F95 FOREIGN KEY (tax_rate_id) REFERENCES tax_rate (id)');
  97. $this->addSql('ALTER TABLE merchant ADD CONSTRAINT FK_74AB25E1F5B7AF75 FOREIGN KEY (address_id) REFERENCES address (id)');
  98. $this->addSql('ALTER TABLE merchant ADD CONSTRAINT FK_74AB25E1B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
  99. $this->addSql('ALTER TABLE merchant ADD CONSTRAINT FK_74AB25E1896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
  100. $this->addSql('ALTER TABLE merchant_setting ADD CONSTRAINT FK_464ACD036796D554 FOREIGN KEY (merchant_id) REFERENCES merchant (id)');
  101. $this->addSql('ALTER TABLE merchant_setting ADD CONSTRAINT FK_464ACD0393CB796C FOREIGN KEY (file_id) REFERENCES file (id)');
  102. $this->addSql('ALTER TABLE news ADD CONSTRAINT FK_1DD399506796D554 FOREIGN KEY (merchant_id) REFERENCES merchant (id)');
  103. $this->addSql('ALTER TABLE news ADD CONSTRAINT FK_1DD39950B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
  104. $this->addSql('ALTER TABLE news ADD CONSTRAINT FK_1DD39950896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
  105. $this->addSql('ALTER TABLE newsletter ADD CONSTRAINT FK_7E8585C86796D554 FOREIGN KEY (merchant_id) REFERENCES merchant (id)');
  106. $this->addSql('ALTER TABLE newsletter ADD CONSTRAINT FK_7E8585C8B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
  107. $this->addSql('ALTER TABLE newsletter ADD CONSTRAINT FK_7E8585C8896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
  108. $this->addSql('ALTER TABLE order_payment ADD CONSTRAINT FK_9B522D46B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
  109. $this->addSql('ALTER TABLE order_payment ADD CONSTRAINT FK_9B522D46896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
  110. $this->addSql('ALTER TABLE order_payment ADD CONSTRAINT FK_9B522D46BB6C6D96 FOREIGN KEY (order_shop_id) REFERENCES order_shop (id)');
  111. $this->addSql('ALTER TABLE order_product ADD CONSTRAINT FK_2530ADE6BB6C6D96 FOREIGN KEY (order_shop_id) REFERENCES order_shop (id)');
  112. $this->addSql('ALTER TABLE order_product ADD CONSTRAINT FK_2530ADE64584665A FOREIGN KEY (product_id) REFERENCES product (id)');
  113. $this->addSql('ALTER TABLE order_product ADD CONSTRAINT FK_2530ADE6E0D401EA FOREIGN KEY (order_product_reduction_catalog_id) REFERENCES order_product_reduction_catalog (id)');
  114. $this->addSql('ALTER TABLE order_product ADD CONSTRAINT FK_2530ADE6F8BD700D FOREIGN KEY (unit_id) REFERENCES unit (id)');
  115. $this->addSql('ALTER TABLE order_product ADD CONSTRAINT FK_2530ADE6FDD13F95 FOREIGN KEY (tax_rate_id) REFERENCES tax_rate (id)');
  116. $this->addSql('ALTER TABLE order_product_refund ADD CONSTRAINT FK_5120854CF65E9B0F FOREIGN KEY (order_product_id) REFERENCES order_product (id)');
  117. $this->addSql('ALTER TABLE order_reduction_cart ADD CONSTRAINT FK_82A8D5B9BB6C6D96 FOREIGN KEY (order_shop_id) REFERENCES order_shop (id)');
  118. $this->addSql('ALTER TABLE order_reduction_cart ADD CONSTRAINT FK_82A8D5B99CEF50F6 FOREIGN KEY (reduction_cart_id) REFERENCES reduction_cart (id)');
  119. $this->addSql('ALTER TABLE order_reduction_credit ADD CONSTRAINT FK_9798E732BB6C6D96 FOREIGN KEY (order_shop_id) REFERENCES order_shop (id)');
  120. $this->addSql('ALTER TABLE order_reduction_credit ADD CONSTRAINT FK_9798E7326103B276 FOREIGN KEY (reduction_credit_id) REFERENCES reduction_credit (id)');
  121. $this->addSql('ALTER TABLE order_refund ADD CONSTRAINT FK_98A3048DC33F7837 FOREIGN KEY (document_id) REFERENCES document (id)');
  122. $this->addSql('ALTER TABLE order_refund ADD CONSTRAINT FK_98A3048DB03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
  123. $this->addSql('ALTER TABLE order_refund ADD CONSTRAINT FK_98A3048D896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
  124. $this->addSql('ALTER TABLE order_refund ADD CONSTRAINT FK_98A3048DBB6C6D96 FOREIGN KEY (order_shop_id) REFERENCES order_shop (id)');
  125. $this->addSql('ALTER TABLE order_shop ADD CONSTRAINT FK_E19B76B56796D554 FOREIGN KEY (merchant_id) REFERENCES merchant (id)');
  126. $this->addSql('ALTER TABLE order_shop ADD CONSTRAINT FK_E19B76B5A76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
  127. $this->addSql('ALTER TABLE order_shop ADD CONSTRAINT FK_E19B76B570BEE6D FOREIGN KEY (visitor_id) REFERENCES visitor (id)');
  128. $this->addSql('ALTER TABLE order_shop ADD CONSTRAINT FK_E19B76B5C6BDFEB FOREIGN KEY (invoice_address_id) REFERENCES address (id)');
  129. $this->addSql('ALTER TABLE order_shop ADD CONSTRAINT FK_E19B76B5D7707B45 FOREIGN KEY (order_status_id) REFERENCES order_status (id)');
  130. $this->addSql('ALTER TABLE order_shop ADD CONSTRAINT FK_E19B76B5B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
  131. $this->addSql('ALTER TABLE order_shop ADD CONSTRAINT FK_E19B76B5896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
  132. $this->addSql('ALTER TABLE order_shop ADD CONSTRAINT FK_E19B76B5D823E37A FOREIGN KEY (section_id) REFERENCES section (id)');
  133. $this->addSql('ALTER TABLE order_shop_document_interface ADD CONSTRAINT FK_3C004E6BB6C6D96 FOREIGN KEY (order_shop_id) REFERENCES order_shop (id) ON DELETE CASCADE');
  134. $this->addSql('ALTER TABLE order_shop_document_interface ADD CONSTRAINT FK_3C004E66EEC8F3 FOREIGN KEY (document_interface_id) REFERENCES document (id) ON DELETE CASCADE');
  135. $this->addSql('ALTER TABLE order_status_order_status_interface ADD CONSTRAINT FK_31CB58CAD7707B45 FOREIGN KEY (order_status_id) REFERENCES order_status (id) ON DELETE CASCADE');
  136. $this->addSql('ALTER TABLE order_status_order_status_interface ADD CONSTRAINT FK_31CB58CAAEF3C90F FOREIGN KEY (order_status_interface_id) REFERENCES order_status (id) ON DELETE CASCADE');
  137. $this->addSql('ALTER TABLE order_status_history ADD CONSTRAINT FK_471AD77EBB6C6D96 FOREIGN KEY (order_shop_id) REFERENCES order_shop (id)');
  138. $this->addSql('ALTER TABLE order_status_history ADD CONSTRAINT FK_471AD77ED7707B45 FOREIGN KEY (order_status_id) REFERENCES order_status (id)');
  139. $this->addSql('ALTER TABLE order_status_history ADD CONSTRAINT FK_471AD77EB03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
  140. $this->addSql('ALTER TABLE order_status_history ADD CONSTRAINT FK_471AD77E896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
  141. $this->addSql('ALTER TABLE page ADD CONSTRAINT FK_140AB6203DA5256D FOREIGN KEY (image_id) REFERENCES file (id)');
  142. $this->addSql('ALTER TABLE page ADD CONSTRAINT FK_140AB6206796D554 FOREIGN KEY (merchant_id) REFERENCES merchant (id)');
  143. $this->addSql('ALTER TABLE page ADD CONSTRAINT FK_140AB620D823E37A FOREIGN KEY (section_id) REFERENCES section (id)');
  144. $this->addSql('ALTER TABLE page ADD CONSTRAINT FK_140AB620B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
  145. $this->addSql('ALTER TABLE page ADD CONSTRAINT FK_140AB620896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
  146. $this->addSql('ALTER TABLE page_file ADD CONSTRAINT FK_B5B2ACAC4663E4 FOREIGN KEY (page_id) REFERENCES page (id) ON DELETE CASCADE');
  147. $this->addSql('ALTER TABLE page_file ADD CONSTRAINT FK_B5B2ACA93CB796C FOREIGN KEY (file_id) REFERENCES file (id) ON DELETE CASCADE');
  148. $this->addSql('ALTER TABLE point_sale ADD CONSTRAINT FK_6CCB2767F5B7AF75 FOREIGN KEY (address_id) REFERENCES address (id)');
  149. $this->addSql('ALTER TABLE point_sale ADD CONSTRAINT FK_6CCB2767B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
  150. $this->addSql('ALTER TABLE point_sale ADD CONSTRAINT FK_6CCB2767896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
  151. $this->addSql('ALTER TABLE point_sale_merchant_interface ADD CONSTRAINT FK_7711E325FDAAB1A4 FOREIGN KEY (point_sale_id) REFERENCES point_sale (id) ON DELETE CASCADE');
  152. $this->addSql('ALTER TABLE point_sale_merchant_interface ADD CONSTRAINT FK_7711E3252F3319E1 FOREIGN KEY (merchant_interface_id) REFERENCES merchant (id) ON DELETE CASCADE');
  153. $this->addSql('ALTER TABLE point_sale_day_info ADD CONSTRAINT FK_34BC1A33FDAAB1A4 FOREIGN KEY (point_sale_id) REFERENCES point_sale (id)');
  154. $this->addSql('ALTER TABLE point_sale_day_info ADD CONSTRAINT FK_34BC1A33B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
  155. $this->addSql('ALTER TABLE point_sale_day_info ADD CONSTRAINT FK_34BC1A33896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
  156. $this->addSql('ALTER TABLE product ADD CONSTRAINT FK_D34A04ADB03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
  157. $this->addSql('ALTER TABLE product ADD CONSTRAINT FK_D34A04AD896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
  158. $this->addSql('ALTER TABLE product ADD CONSTRAINT FK_D34A04ADADFEE0E7 FOREIGN KEY (product_family_id) REFERENCES product_family (id)');
  159. $this->addSql('ALTER TABLE product ADD CONSTRAINT FK_D34A04ADF8BD700D FOREIGN KEY (unit_id) REFERENCES unit (id)');
  160. $this->addSql('ALTER TABLE product ADD CONSTRAINT FK_D34A04ADFDD13F95 FOREIGN KEY (tax_rate_id) REFERENCES tax_rate (id)');
  161. $this->addSql('ALTER TABLE product_category ADD CONSTRAINT FK_CDFC73566796D554 FOREIGN KEY (merchant_id) REFERENCES merchant (id)');
  162. $this->addSql('ALTER TABLE product_category ADD CONSTRAINT FK_CDFC7356727ACA70 FOREIGN KEY (parent_id) REFERENCES product_category (id)');
  163. $this->addSql('ALTER TABLE product_category ADD CONSTRAINT FK_CDFC7356D823E37A FOREIGN KEY (section_id) REFERENCES section (id)');
  164. $this->addSql('ALTER TABLE product_category ADD CONSTRAINT FK_CDFC7356B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
  165. $this->addSql('ALTER TABLE product_category ADD CONSTRAINT FK_CDFC7356896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
  166. $this->addSql('ALTER TABLE product_family ADD CONSTRAINT FK_C79A60FFB03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
  167. $this->addSql('ALTER TABLE product_family ADD CONSTRAINT FK_C79A60FF896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
  168. $this->addSql('ALTER TABLE product_family ADD CONSTRAINT FK_C79A60FF6796D554 FOREIGN KEY (merchant_id) REFERENCES merchant (id)');
  169. $this->addSql('ALTER TABLE product_family ADD CONSTRAINT FK_C79A60FFF8BD700D FOREIGN KEY (unit_id) REFERENCES unit (id)');
  170. $this->addSql('ALTER TABLE product_family ADD CONSTRAINT FK_C79A60FFFDD13F95 FOREIGN KEY (tax_rate_id) REFERENCES tax_rate (id)');
  171. $this->addSql('ALTER TABLE product_family_product_category_interface ADD CONSTRAINT FK_CE291DDCADFEE0E7 FOREIGN KEY (product_family_id) REFERENCES product_family (id) ON DELETE CASCADE');
  172. $this->addSql('ALTER TABLE product_family_product_category_interface ADD CONSTRAINT FK_CE291DDC5734039 FOREIGN KEY (product_category_interface_id) REFERENCES product_category (id) ON DELETE CASCADE');
  173. $this->addSql('ALTER TABLE product_family_section_interface ADD CONSTRAINT FK_2991468DADFEE0E7 FOREIGN KEY (product_family_id) REFERENCES product_family (id) ON DELETE CASCADE');
  174. $this->addSql('ALTER TABLE product_family_section_interface ADD CONSTRAINT FK_2991468D6BA77450 FOREIGN KEY (section_interface_id) REFERENCES section (id) ON DELETE CASCADE');
  175. $this->addSql('ALTER TABLE reduction_cart ADD CONSTRAINT FK_EAD805096796D554 FOREIGN KEY (merchant_id) REFERENCES merchant (id)');
  176. $this->addSql('ALTER TABLE reduction_cart ADD CONSTRAINT FK_EAD80509B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
  177. $this->addSql('ALTER TABLE reduction_cart ADD CONSTRAINT FK_EAD80509896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
  178. $this->addSql('ALTER TABLE reduction_cart_point_sale_interface ADD CONSTRAINT FK_7DA5ED389CEF50F6 FOREIGN KEY (reduction_cart_id) REFERENCES reduction_cart (id) ON DELETE CASCADE');
  179. $this->addSql('ALTER TABLE reduction_cart_point_sale_interface ADD CONSTRAINT FK_7DA5ED38A72A2A90 FOREIGN KEY (point_sale_interface_id) REFERENCES point_sale (id) ON DELETE CASCADE');
  180. $this->addSql('ALTER TABLE reduction_cart_reduction_cart_interface ADD CONSTRAINT FK_2B4A9229CEF50F6 FOREIGN KEY (reduction_cart_id) REFERENCES reduction_cart (id) ON DELETE CASCADE');
  181. $this->addSql('ALTER TABLE reduction_cart_reduction_cart_interface ADD CONSTRAINT FK_2B4A9227B3A6295 FOREIGN KEY (reduction_cart_interface_id) REFERENCES reduction_cart (id) ON DELETE CASCADE');
  182. $this->addSql('ALTER TABLE reduction_cart_user_interface ADD CONSTRAINT FK_4BFD6F369CEF50F6 FOREIGN KEY (reduction_cart_id) REFERENCES reduction_cart (id) ON DELETE CASCADE');
  183. $this->addSql('ALTER TABLE reduction_cart_user_interface ADD CONSTRAINT FK_4BFD6F362BC79580 FOREIGN KEY (user_interface_id) REFERENCES user (id) ON DELETE CASCADE');
  184. $this->addSql('ALTER TABLE reduction_cart_group_user_interface ADD CONSTRAINT FK_162585209CEF50F6 FOREIGN KEY (reduction_cart_id) REFERENCES reduction_cart (id) ON DELETE CASCADE');
  185. $this->addSql('ALTER TABLE reduction_cart_group_user_interface ADD CONSTRAINT FK_16258520F583BABC FOREIGN KEY (group_user_interface_id) REFERENCES group_user (id) ON DELETE CASCADE');
  186. $this->addSql('ALTER TABLE reduction_catalog ADD CONSTRAINT FK_9D16AF0E6796D554 FOREIGN KEY (merchant_id) REFERENCES merchant (id)');
  187. $this->addSql('ALTER TABLE reduction_catalog ADD CONSTRAINT FK_9D16AF0EADFEE0E7 FOREIGN KEY (product_family_id) REFERENCES product_family (id)');
  188. $this->addSql('ALTER TABLE reduction_catalog ADD CONSTRAINT FK_9D16AF0EB03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
  189. $this->addSql('ALTER TABLE reduction_catalog ADD CONSTRAINT FK_9D16AF0E896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
  190. $this->addSql('ALTER TABLE reduction_catalog_product_family_interface ADD CONSTRAINT FK_D71BD4DBB194FDD0 FOREIGN KEY (reduction_catalog_id) REFERENCES reduction_catalog (id) ON DELETE CASCADE');
  191. $this->addSql('ALTER TABLE reduction_catalog_product_family_interface ADD CONSTRAINT FK_D71BD4DB4537D78D FOREIGN KEY (product_family_interface_id) REFERENCES product_family (id) ON DELETE CASCADE');
  192. $this->addSql('ALTER TABLE reduction_catalog_product_category_interface ADD CONSTRAINT FK_4D456464B194FDD0 FOREIGN KEY (reduction_catalog_id) REFERENCES reduction_catalog (id) ON DELETE CASCADE');
  193. $this->addSql('ALTER TABLE reduction_catalog_product_category_interface ADD CONSTRAINT FK_4D4564645734039 FOREIGN KEY (product_category_interface_id) REFERENCES product_category (id) ON DELETE CASCADE');
  194. $this->addSql('ALTER TABLE reduction_catalog_user_interface ADD CONSTRAINT FK_FB0FFDFAB194FDD0 FOREIGN KEY (reduction_catalog_id) REFERENCES reduction_catalog (id) ON DELETE CASCADE');
  195. $this->addSql('ALTER TABLE reduction_catalog_user_interface ADD CONSTRAINT FK_FB0FFDFA2BC79580 FOREIGN KEY (user_interface_id) REFERENCES user (id) ON DELETE CASCADE');
  196. $this->addSql('ALTER TABLE reduction_catalog_group_user_interface ADD CONSTRAINT FK_32F80FA3B194FDD0 FOREIGN KEY (reduction_catalog_id) REFERENCES reduction_catalog (id) ON DELETE CASCADE');
  197. $this->addSql('ALTER TABLE reduction_catalog_group_user_interface ADD CONSTRAINT FK_32F80FA3F583BABC FOREIGN KEY (group_user_interface_id) REFERENCES group_user (id) ON DELETE CASCADE');
  198. $this->addSql('ALTER TABLE reduction_credit ADD CONSTRAINT FK_F58EF32E6796D554 FOREIGN KEY (merchant_id) REFERENCES merchant (id)');
  199. $this->addSql('ALTER TABLE reduction_credit ADD CONSTRAINT FK_F58EF32E7E3C61F9 FOREIGN KEY (owner_id) REFERENCES user (id)');
  200. $this->addSql('ALTER TABLE reduction_credit ADD CONSTRAINT FK_F58EF32EB03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
  201. $this->addSql('ALTER TABLE reduction_credit ADD CONSTRAINT FK_F58EF32E896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
  202. $this->addSql('ALTER TABLE reduction_credit_user_interface ADD CONSTRAINT FK_1E04D3826103B276 FOREIGN KEY (reduction_credit_id) REFERENCES reduction_credit (id) ON DELETE CASCADE');
  203. $this->addSql('ALTER TABLE reduction_credit_user_interface ADD CONSTRAINT FK_1E04D3822BC79580 FOREIGN KEY (user_interface_id) REFERENCES user (id) ON DELETE CASCADE');
  204. $this->addSql('ALTER TABLE reminder ADD CONSTRAINT FK_40374F406796D554 FOREIGN KEY (merchant_id) REFERENCES merchant (id)');
  205. $this->addSql('ALTER TABLE reminder ADD CONSTRAINT FK_40374F40B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
  206. $this->addSql('ALTER TABLE reminder ADD CONSTRAINT FK_40374F40896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
  207. $this->addSql('ALTER TABLE reminder_user_interface ADD CONSTRAINT FK_7FD2584BD987BE75 FOREIGN KEY (reminder_id) REFERENCES reminder (id) ON DELETE CASCADE');
  208. $this->addSql('ALTER TABLE reminder_user_interface ADD CONSTRAINT FK_7FD2584B2BC79580 FOREIGN KEY (user_interface_id) REFERENCES user (id) ON DELETE CASCADE');
  209. $this->addSql('ALTER TABLE section ADD CONSTRAINT FK_2D737AEF6796D554 FOREIGN KEY (merchant_id) REFERENCES merchant (id)');
  210. $this->addSql('ALTER TABLE section ADD CONSTRAINT FK_2D737AEFB03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
  211. $this->addSql('ALTER TABLE section ADD CONSTRAINT FK_2D737AEF896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
  212. $this->addSql('ALTER TABLE section_setting ADD CONSTRAINT FK_4D337597D823E37A FOREIGN KEY (section_id) REFERENCES section (id)');
  213. $this->addSql('ALTER TABLE section_setting ADD CONSTRAINT FK_4D33759793CB796C FOREIGN KEY (file_id) REFERENCES file (id)');
  214. $this->addSql('ALTER TABLE tax_rate ADD CONSTRAINT FK_C36330C1B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
  215. $this->addSql('ALTER TABLE tax_rate ADD CONSTRAINT FK_C36330C1896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
  216. $this->addSql('ALTER TABLE ticket ADD CONSTRAINT FK_97A0ADA3B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
  217. $this->addSql('ALTER TABLE ticket ADD CONSTRAINT FK_97A0ADA3896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
  218. $this->addSql('ALTER TABLE ticket ADD CONSTRAINT FK_97A0ADA36796D554 FOREIGN KEY (merchant_id) REFERENCES merchant (id)');
  219. $this->addSql('ALTER TABLE ticket ADD CONSTRAINT FK_97A0ADA3BB6C6D96 FOREIGN KEY (order_shop_id) REFERENCES order_shop (id)');
  220. $this->addSql('ALTER TABLE ticket ADD CONSTRAINT FK_97A0ADA3A76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
  221. $this->addSql('ALTER TABLE ticket_message ADD CONSTRAINT FK_BA71692DB03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
  222. $this->addSql('ALTER TABLE ticket_message ADD CONSTRAINT FK_BA71692D896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
  223. $this->addSql('ALTER TABLE ticket_message ADD CONSTRAINT FK_BA71692D700047D2 FOREIGN KEY (ticket_id) REFERENCES ticket (id)');
  224. $this->addSql('ALTER TABLE unit ADD CONSTRAINT FK_DCBB0C53C4D33C3E FOREIGN KEY (unit_reference_id) REFERENCES unit (id)');
  225. $this->addSql('ALTER TABLE unit ADD CONSTRAINT FK_DCBB0C53B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
  226. $this->addSql('ALTER TABLE unit ADD CONSTRAINT FK_DCBB0C53896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
  227. $this->addSql('ALTER TABLE user ADD CONSTRAINT FK_8D93D649A4849017 FOREIGN KEY (favorite_merchant_id) REFERENCES merchant (id)');
  228. $this->addSql('ALTER TABLE user_newsletter_interface ADD CONSTRAINT FK_276FB522A76ED395 FOREIGN KEY (user_id) REFERENCES user (id) ON DELETE CASCADE');
  229. $this->addSql('ALTER TABLE user_newsletter_interface ADD CONSTRAINT FK_276FB522A0E6D8FC FOREIGN KEY (newsletter_interface_id) REFERENCES newsletter (id) ON DELETE CASCADE');
  230. $this->addSql('ALTER TABLE user_group_user_interface ADD CONSTRAINT FK_12B87B34A76ED395 FOREIGN KEY (user_id) REFERENCES user (id) ON DELETE CASCADE');
  231. $this->addSql('ALTER TABLE user_group_user_interface ADD CONSTRAINT FK_12B87B34F583BABC FOREIGN KEY (group_user_interface_id) REFERENCES group_user (id) ON DELETE CASCADE');
  232. $this->addSql('ALTER TABLE user_product_family_interface ADD CONSTRAINT FK_6F63A287A76ED395 FOREIGN KEY (user_id) REFERENCES user (id) ON DELETE CASCADE');
  233. $this->addSql('ALTER TABLE user_product_family_interface ADD CONSTRAINT FK_6F63A2874537D78D FOREIGN KEY (product_family_interface_id) REFERENCES product_family (id) ON DELETE CASCADE');
  234. $this->addSql('ALTER TABLE user_merchant ADD CONSTRAINT FK_9426C1E1A76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
  235. $this->addSql('ALTER TABLE user_merchant ADD CONSTRAINT FK_9426C1E16796D554 FOREIGN KEY (merchant_id) REFERENCES merchant (id)');
  236. $this->addSql('ALTER TABLE user_merchant ADD CONSTRAINT FK_9426C1E1FE54D809 FOREIGN KEY (current_admin_section_id) REFERENCES section (id)');
  237. $this->addSql('ALTER TABLE user_point_sale ADD CONSTRAINT FK_CBACE18BA76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
  238. $this->addSql('ALTER TABLE user_point_sale ADD CONSTRAINT FK_CBACE18BFDAAB1A4 FOREIGN KEY (point_sale_id) REFERENCES point_sale (id)');
  239. }
  240. public function down(Schema $schema): void
  241. {
  242. // this down() migration is auto-generated, please modify it to your needs
  243. $this->addSql('ALTER TABLE document DROP FOREIGN KEY FK_D8698A7697D868A5');
  244. $this->addSql('ALTER TABLE document DROP FOREIGN KEY FK_D8698A7656E5354');
  245. $this->addSql('ALTER TABLE merchant DROP FOREIGN KEY FK_74AB25E1F5B7AF75');
  246. $this->addSql('ALTER TABLE order_shop DROP FOREIGN KEY FK_E19B76B5C6BDFEB');
  247. $this->addSql('ALTER TABLE point_sale DROP FOREIGN KEY FK_6CCB2767F5B7AF75');
  248. $this->addSql('ALTER TABLE merchant DROP FOREIGN KEY FK_74AB25E1E511F091');
  249. $this->addSql('ALTER TABLE order_refund DROP FOREIGN KEY FK_98A3048DC33F7837');
  250. $this->addSql('ALTER TABLE order_shop_document_interface DROP FOREIGN KEY FK_3C004E66EEC8F3');
  251. $this->addSql('ALTER TABLE merchant_setting DROP FOREIGN KEY FK_464ACD0393CB796C');
  252. $this->addSql('ALTER TABLE page DROP FOREIGN KEY FK_140AB6203DA5256D');
  253. $this->addSql('ALTER TABLE page_file DROP FOREIGN KEY FK_B5B2ACA93CB796C');
  254. $this->addSql('ALTER TABLE section_setting DROP FOREIGN KEY FK_4D33759793CB796C');
  255. $this->addSql('ALTER TABLE reduction_cart_group_user_interface DROP FOREIGN KEY FK_16258520F583BABC');
  256. $this->addSql('ALTER TABLE reduction_catalog_group_user_interface DROP FOREIGN KEY FK_32F80FA3F583BABC');
  257. $this->addSql('ALTER TABLE user_group_user_interface DROP FOREIGN KEY FK_12B87B34F583BABC');
  258. $this->addSql('ALTER TABLE document DROP FOREIGN KEY FK_D8698A766796D554');
  259. $this->addSql('ALTER TABLE group_user DROP FOREIGN KEY FK_A4C98D396796D554');
  260. $this->addSql('ALTER TABLE merchant_setting DROP FOREIGN KEY FK_464ACD036796D554');
  261. $this->addSql('ALTER TABLE news DROP FOREIGN KEY FK_1DD399506796D554');
  262. $this->addSql('ALTER TABLE newsletter DROP FOREIGN KEY FK_7E8585C86796D554');
  263. $this->addSql('ALTER TABLE order_shop DROP FOREIGN KEY FK_E19B76B56796D554');
  264. $this->addSql('ALTER TABLE page DROP FOREIGN KEY FK_140AB6206796D554');
  265. $this->addSql('ALTER TABLE point_sale_merchant_interface DROP FOREIGN KEY FK_7711E3252F3319E1');
  266. $this->addSql('ALTER TABLE product_category DROP FOREIGN KEY FK_CDFC73566796D554');
  267. $this->addSql('ALTER TABLE product_family DROP FOREIGN KEY FK_C79A60FF6796D554');
  268. $this->addSql('ALTER TABLE reduction_cart DROP FOREIGN KEY FK_EAD805096796D554');
  269. $this->addSql('ALTER TABLE reduction_catalog DROP FOREIGN KEY FK_9D16AF0E6796D554');
  270. $this->addSql('ALTER TABLE reduction_credit DROP FOREIGN KEY FK_F58EF32E6796D554');
  271. $this->addSql('ALTER TABLE reminder DROP FOREIGN KEY FK_40374F406796D554');
  272. $this->addSql('ALTER TABLE section DROP FOREIGN KEY FK_2D737AEF6796D554');
  273. $this->addSql('ALTER TABLE ticket DROP FOREIGN KEY FK_97A0ADA36796D554');
  274. $this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D649A4849017');
  275. $this->addSql('ALTER TABLE user_merchant DROP FOREIGN KEY FK_9426C1E16796D554');
  276. $this->addSql('ALTER TABLE user_newsletter_interface DROP FOREIGN KEY FK_276FB522A0E6D8FC');
  277. $this->addSql('ALTER TABLE credit_history DROP FOREIGN KEY FK_1D3E1764B7195EEE');
  278. $this->addSql('ALTER TABLE order_product_refund DROP FOREIGN KEY FK_5120854CF65E9B0F');
  279. $this->addSql('ALTER TABLE order_product DROP FOREIGN KEY FK_2530ADE6E0D401EA');
  280. $this->addSql('ALTER TABLE credit_history DROP FOREIGN KEY FK_1D3E1764A41F7A2D');
  281. $this->addSql('ALTER TABLE order_payment DROP FOREIGN KEY FK_9B522D46BB6C6D96');
  282. $this->addSql('ALTER TABLE order_product DROP FOREIGN KEY FK_2530ADE6BB6C6D96');
  283. $this->addSql('ALTER TABLE order_reduction_cart DROP FOREIGN KEY FK_82A8D5B9BB6C6D96');
  284. $this->addSql('ALTER TABLE order_reduction_credit DROP FOREIGN KEY FK_9798E732BB6C6D96');
  285. $this->addSql('ALTER TABLE order_refund DROP FOREIGN KEY FK_98A3048DBB6C6D96');
  286. $this->addSql('ALTER TABLE order_shop_document_interface DROP FOREIGN KEY FK_3C004E6BB6C6D96');
  287. $this->addSql('ALTER TABLE order_status_history DROP FOREIGN KEY FK_471AD77EBB6C6D96');
  288. $this->addSql('ALTER TABLE ticket DROP FOREIGN KEY FK_97A0ADA3BB6C6D96');
  289. $this->addSql('ALTER TABLE order_shop DROP FOREIGN KEY FK_E19B76B5D7707B45');
  290. $this->addSql('ALTER TABLE order_status_order_status_interface DROP FOREIGN KEY FK_31CB58CAD7707B45');
  291. $this->addSql('ALTER TABLE order_status_order_status_interface DROP FOREIGN KEY FK_31CB58CAAEF3C90F');
  292. $this->addSql('ALTER TABLE order_status_history DROP FOREIGN KEY FK_471AD77ED7707B45');
  293. $this->addSql('ALTER TABLE page_file DROP FOREIGN KEY FK_B5B2ACAC4663E4');
  294. $this->addSql('ALTER TABLE point_sale_merchant_interface DROP FOREIGN KEY FK_7711E325FDAAB1A4');
  295. $this->addSql('ALTER TABLE point_sale_day_info DROP FOREIGN KEY FK_34BC1A33FDAAB1A4');
  296. $this->addSql('ALTER TABLE reduction_cart_point_sale_interface DROP FOREIGN KEY FK_7DA5ED38A72A2A90');
  297. $this->addSql('ALTER TABLE user_point_sale DROP FOREIGN KEY FK_CBACE18BFDAAB1A4');
  298. $this->addSql('ALTER TABLE order_product DROP FOREIGN KEY FK_2530ADE64584665A');
  299. $this->addSql('ALTER TABLE product_category DROP FOREIGN KEY FK_CDFC7356727ACA70');
  300. $this->addSql('ALTER TABLE product_family_product_category_interface DROP FOREIGN KEY FK_CE291DDC5734039');
  301. $this->addSql('ALTER TABLE reduction_catalog_product_category_interface DROP FOREIGN KEY FK_4D4564645734039');
  302. $this->addSql('ALTER TABLE product DROP FOREIGN KEY FK_D34A04ADADFEE0E7');
  303. $this->addSql('ALTER TABLE product_family_product_category_interface DROP FOREIGN KEY FK_CE291DDCADFEE0E7');
  304. $this->addSql('ALTER TABLE product_family_section_interface DROP FOREIGN KEY FK_2991468DADFEE0E7');
  305. $this->addSql('ALTER TABLE reduction_catalog DROP FOREIGN KEY FK_9D16AF0EADFEE0E7');
  306. $this->addSql('ALTER TABLE reduction_catalog_product_family_interface DROP FOREIGN KEY FK_D71BD4DB4537D78D');
  307. $this->addSql('ALTER TABLE user_product_family_interface DROP FOREIGN KEY FK_6F63A2874537D78D');
  308. $this->addSql('ALTER TABLE order_reduction_cart DROP FOREIGN KEY FK_82A8D5B99CEF50F6');
  309. $this->addSql('ALTER TABLE reduction_cart_point_sale_interface DROP FOREIGN KEY FK_7DA5ED389CEF50F6');
  310. $this->addSql('ALTER TABLE reduction_cart_reduction_cart_interface DROP FOREIGN KEY FK_2B4A9229CEF50F6');
  311. $this->addSql('ALTER TABLE reduction_cart_reduction_cart_interface DROP FOREIGN KEY FK_2B4A9227B3A6295');
  312. $this->addSql('ALTER TABLE reduction_cart_user_interface DROP FOREIGN KEY FK_4BFD6F369CEF50F6');
  313. $this->addSql('ALTER TABLE reduction_cart_group_user_interface DROP FOREIGN KEY FK_162585209CEF50F6');
  314. $this->addSql('ALTER TABLE reduction_catalog_product_family_interface DROP FOREIGN KEY FK_D71BD4DBB194FDD0');
  315. $this->addSql('ALTER TABLE reduction_catalog_product_category_interface DROP FOREIGN KEY FK_4D456464B194FDD0');
  316. $this->addSql('ALTER TABLE reduction_catalog_user_interface DROP FOREIGN KEY FK_FB0FFDFAB194FDD0');
  317. $this->addSql('ALTER TABLE reduction_catalog_group_user_interface DROP FOREIGN KEY FK_32F80FA3B194FDD0');
  318. $this->addSql('ALTER TABLE order_reduction_credit DROP FOREIGN KEY FK_9798E7326103B276');
  319. $this->addSql('ALTER TABLE reduction_credit_user_interface DROP FOREIGN KEY FK_1E04D3826103B276');
  320. $this->addSql('ALTER TABLE reminder_user_interface DROP FOREIGN KEY FK_7FD2584BD987BE75');
  321. $this->addSql('ALTER TABLE order_shop DROP FOREIGN KEY FK_E19B76B5D823E37A');
  322. $this->addSql('ALTER TABLE page DROP FOREIGN KEY FK_140AB620D823E37A');
  323. $this->addSql('ALTER TABLE product_category DROP FOREIGN KEY FK_CDFC7356D823E37A');
  324. $this->addSql('ALTER TABLE product_family_section_interface DROP FOREIGN KEY FK_2991468D6BA77450');
  325. $this->addSql('ALTER TABLE section_setting DROP FOREIGN KEY FK_4D337597D823E37A');
  326. $this->addSql('ALTER TABLE user_merchant DROP FOREIGN KEY FK_9426C1E1FE54D809');
  327. $this->addSql('ALTER TABLE merchant DROP FOREIGN KEY FK_74AB25E1FDD13F95');
  328. $this->addSql('ALTER TABLE order_product DROP FOREIGN KEY FK_2530ADE6FDD13F95');
  329. $this->addSql('ALTER TABLE product DROP FOREIGN KEY FK_D34A04ADFDD13F95');
  330. $this->addSql('ALTER TABLE product_family DROP FOREIGN KEY FK_C79A60FFFDD13F95');
  331. $this->addSql('ALTER TABLE ticket_message DROP FOREIGN KEY FK_BA71692D700047D2');
  332. $this->addSql('ALTER TABLE order_product DROP FOREIGN KEY FK_2530ADE6F8BD700D');
  333. $this->addSql('ALTER TABLE product DROP FOREIGN KEY FK_D34A04ADF8BD700D');
  334. $this->addSql('ALTER TABLE product_family DROP FOREIGN KEY FK_C79A60FFF8BD700D');
  335. $this->addSql('ALTER TABLE unit DROP FOREIGN KEY FK_DCBB0C53C4D33C3E');
  336. $this->addSql('ALTER TABLE address DROP FOREIGN KEY FK_D4E6F81A76ED395');
  337. $this->addSql('ALTER TABLE address DROP FOREIGN KEY FK_D4E6F81B03A8386');
  338. $this->addSql('ALTER TABLE address DROP FOREIGN KEY FK_D4E6F81896DBBDE');
  339. $this->addSql('ALTER TABLE credit_history DROP FOREIGN KEY FK_1D3E1764B03A8386');
  340. $this->addSql('ALTER TABLE credit_history DROP FOREIGN KEY FK_1D3E1764896DBBDE');
  341. $this->addSql('ALTER TABLE document DROP FOREIGN KEY FK_D8698A76B03A8386');
  342. $this->addSql('ALTER TABLE document DROP FOREIGN KEY FK_D8698A76896DBBDE');
  343. $this->addSql('ALTER TABLE file DROP FOREIGN KEY FK_8C9F3610B03A8386');
  344. $this->addSql('ALTER TABLE file DROP FOREIGN KEY FK_8C9F3610896DBBDE');
  345. $this->addSql('ALTER TABLE group_user DROP FOREIGN KEY FK_A4C98D39B03A8386');
  346. $this->addSql('ALTER TABLE group_user DROP FOREIGN KEY FK_A4C98D39896DBBDE');
  347. $this->addSql('ALTER TABLE merchant DROP FOREIGN KEY FK_74AB25E1B03A8386');
  348. $this->addSql('ALTER TABLE merchant DROP FOREIGN KEY FK_74AB25E1896DBBDE');
  349. $this->addSql('ALTER TABLE news DROP FOREIGN KEY FK_1DD39950B03A8386');
  350. $this->addSql('ALTER TABLE news DROP FOREIGN KEY FK_1DD39950896DBBDE');
  351. $this->addSql('ALTER TABLE newsletter DROP FOREIGN KEY FK_7E8585C8B03A8386');
  352. $this->addSql('ALTER TABLE newsletter DROP FOREIGN KEY FK_7E8585C8896DBBDE');
  353. $this->addSql('ALTER TABLE order_payment DROP FOREIGN KEY FK_9B522D46B03A8386');
  354. $this->addSql('ALTER TABLE order_payment DROP FOREIGN KEY FK_9B522D46896DBBDE');
  355. $this->addSql('ALTER TABLE order_refund DROP FOREIGN KEY FK_98A3048DB03A8386');
  356. $this->addSql('ALTER TABLE order_refund DROP FOREIGN KEY FK_98A3048D896DBBDE');
  357. $this->addSql('ALTER TABLE order_shop DROP FOREIGN KEY FK_E19B76B5A76ED395');
  358. $this->addSql('ALTER TABLE order_shop DROP FOREIGN KEY FK_E19B76B5B03A8386');
  359. $this->addSql('ALTER TABLE order_shop DROP FOREIGN KEY FK_E19B76B5896DBBDE');
  360. $this->addSql('ALTER TABLE order_status_history DROP FOREIGN KEY FK_471AD77EB03A8386');
  361. $this->addSql('ALTER TABLE order_status_history DROP FOREIGN KEY FK_471AD77E896DBBDE');
  362. $this->addSql('ALTER TABLE page DROP FOREIGN KEY FK_140AB620B03A8386');
  363. $this->addSql('ALTER TABLE page DROP FOREIGN KEY FK_140AB620896DBBDE');
  364. $this->addSql('ALTER TABLE point_sale DROP FOREIGN KEY FK_6CCB2767B03A8386');
  365. $this->addSql('ALTER TABLE point_sale DROP FOREIGN KEY FK_6CCB2767896DBBDE');
  366. $this->addSql('ALTER TABLE point_sale_day_info DROP FOREIGN KEY FK_34BC1A33B03A8386');
  367. $this->addSql('ALTER TABLE point_sale_day_info DROP FOREIGN KEY FK_34BC1A33896DBBDE');
  368. $this->addSql('ALTER TABLE product DROP FOREIGN KEY FK_D34A04ADB03A8386');
  369. $this->addSql('ALTER TABLE product DROP FOREIGN KEY FK_D34A04AD896DBBDE');
  370. $this->addSql('ALTER TABLE product_category DROP FOREIGN KEY FK_CDFC7356B03A8386');
  371. $this->addSql('ALTER TABLE product_category DROP FOREIGN KEY FK_CDFC7356896DBBDE');
  372. $this->addSql('ALTER TABLE product_family DROP FOREIGN KEY FK_C79A60FFB03A8386');
  373. $this->addSql('ALTER TABLE product_family DROP FOREIGN KEY FK_C79A60FF896DBBDE');
  374. $this->addSql('ALTER TABLE reduction_cart DROP FOREIGN KEY FK_EAD80509B03A8386');
  375. $this->addSql('ALTER TABLE reduction_cart DROP FOREIGN KEY FK_EAD80509896DBBDE');
  376. $this->addSql('ALTER TABLE reduction_cart_user_interface DROP FOREIGN KEY FK_4BFD6F362BC79580');
  377. $this->addSql('ALTER TABLE reduction_catalog DROP FOREIGN KEY FK_9D16AF0EB03A8386');
  378. $this->addSql('ALTER TABLE reduction_catalog DROP FOREIGN KEY FK_9D16AF0E896DBBDE');
  379. $this->addSql('ALTER TABLE reduction_catalog_user_interface DROP FOREIGN KEY FK_FB0FFDFA2BC79580');
  380. $this->addSql('ALTER TABLE reduction_credit DROP FOREIGN KEY FK_F58EF32E7E3C61F9');
  381. $this->addSql('ALTER TABLE reduction_credit DROP FOREIGN KEY FK_F58EF32EB03A8386');
  382. $this->addSql('ALTER TABLE reduction_credit DROP FOREIGN KEY FK_F58EF32E896DBBDE');
  383. $this->addSql('ALTER TABLE reduction_credit_user_interface DROP FOREIGN KEY FK_1E04D3822BC79580');
  384. $this->addSql('ALTER TABLE reminder DROP FOREIGN KEY FK_40374F40B03A8386');
  385. $this->addSql('ALTER TABLE reminder DROP FOREIGN KEY FK_40374F40896DBBDE');
  386. $this->addSql('ALTER TABLE reminder_user_interface DROP FOREIGN KEY FK_7FD2584B2BC79580');
  387. $this->addSql('ALTER TABLE section DROP FOREIGN KEY FK_2D737AEFB03A8386');
  388. $this->addSql('ALTER TABLE section DROP FOREIGN KEY FK_2D737AEF896DBBDE');
  389. $this->addSql('ALTER TABLE tax_rate DROP FOREIGN KEY FK_C36330C1B03A8386');
  390. $this->addSql('ALTER TABLE tax_rate DROP FOREIGN KEY FK_C36330C1896DBBDE');
  391. $this->addSql('ALTER TABLE ticket DROP FOREIGN KEY FK_97A0ADA3B03A8386');
  392. $this->addSql('ALTER TABLE ticket DROP FOREIGN KEY FK_97A0ADA3896DBBDE');
  393. $this->addSql('ALTER TABLE ticket DROP FOREIGN KEY FK_97A0ADA3A76ED395');
  394. $this->addSql('ALTER TABLE ticket_message DROP FOREIGN KEY FK_BA71692DB03A8386');
  395. $this->addSql('ALTER TABLE ticket_message DROP FOREIGN KEY FK_BA71692D896DBBDE');
  396. $this->addSql('ALTER TABLE unit DROP FOREIGN KEY FK_DCBB0C53B03A8386');
  397. $this->addSql('ALTER TABLE unit DROP FOREIGN KEY FK_DCBB0C53896DBBDE');
  398. $this->addSql('ALTER TABLE user_newsletter_interface DROP FOREIGN KEY FK_276FB522A76ED395');
  399. $this->addSql('ALTER TABLE user_group_user_interface DROP FOREIGN KEY FK_12B87B34A76ED395');
  400. $this->addSql('ALTER TABLE user_product_family_interface DROP FOREIGN KEY FK_6F63A287A76ED395');
  401. $this->addSql('ALTER TABLE user_merchant DROP FOREIGN KEY FK_9426C1E1A76ED395');
  402. $this->addSql('ALTER TABLE user_point_sale DROP FOREIGN KEY FK_CBACE18BA76ED395');
  403. $this->addSql('ALTER TABLE credit_history DROP FOREIGN KEY FK_1D3E1764CE8D1CC1');
  404. $this->addSql('ALTER TABLE order_shop DROP FOREIGN KEY FK_E19B76B570BEE6D');
  405. $this->addSql('DROP TABLE address');
  406. $this->addSql('DROP TABLE credit_config');
  407. $this->addSql('DROP TABLE credit_history');
  408. $this->addSql('DROP TABLE document');
  409. $this->addSql('DROP TABLE file');
  410. $this->addSql('DROP TABLE group_user');
  411. $this->addSql('DROP TABLE merchant');
  412. $this->addSql('DROP TABLE merchant_setting');
  413. $this->addSql('DROP TABLE news');
  414. $this->addSql('DROP TABLE newsletter');
  415. $this->addSql('DROP TABLE order_payment');
  416. $this->addSql('DROP TABLE order_product');
  417. $this->addSql('DROP TABLE order_product_reduction_catalog');
  418. $this->addSql('DROP TABLE order_product_refund');
  419. $this->addSql('DROP TABLE order_reduction_cart');
  420. $this->addSql('DROP TABLE order_reduction_credit');
  421. $this->addSql('DROP TABLE order_refund');
  422. $this->addSql('DROP TABLE order_shop');
  423. $this->addSql('DROP TABLE order_shop_document_interface');
  424. $this->addSql('DROP TABLE order_status');
  425. $this->addSql('DROP TABLE order_status_order_status_interface');
  426. $this->addSql('DROP TABLE order_status_history');
  427. $this->addSql('DROP TABLE page');
  428. $this->addSql('DROP TABLE page_file');
  429. $this->addSql('DROP TABLE point_sale');
  430. $this->addSql('DROP TABLE point_sale_merchant_interface');
  431. $this->addSql('DROP TABLE point_sale_day_info');
  432. $this->addSql('DROP TABLE product');
  433. $this->addSql('DROP TABLE product_category');
  434. $this->addSql('DROP TABLE product_family');
  435. $this->addSql('DROP TABLE product_family_product_category_interface');
  436. $this->addSql('DROP TABLE product_family_section_interface');
  437. $this->addSql('DROP TABLE reduction_cart');
  438. $this->addSql('DROP TABLE reduction_cart_point_sale_interface');
  439. $this->addSql('DROP TABLE reduction_cart_reduction_cart_interface');
  440. $this->addSql('DROP TABLE reduction_cart_user_interface');
  441. $this->addSql('DROP TABLE reduction_cart_group_user_interface');
  442. $this->addSql('DROP TABLE reduction_catalog');
  443. $this->addSql('DROP TABLE reduction_catalog_product_family_interface');
  444. $this->addSql('DROP TABLE reduction_catalog_product_category_interface');
  445. $this->addSql('DROP TABLE reduction_catalog_user_interface');
  446. $this->addSql('DROP TABLE reduction_catalog_group_user_interface');
  447. $this->addSql('DROP TABLE reduction_credit');
  448. $this->addSql('DROP TABLE reduction_credit_user_interface');
  449. $this->addSql('DROP TABLE reminder');
  450. $this->addSql('DROP TABLE reminder_user_interface');
  451. $this->addSql('DROP TABLE section');
  452. $this->addSql('DROP TABLE section_setting');
  453. $this->addSql('DROP TABLE tax_rate');
  454. $this->addSql('DROP TABLE ticket');
  455. $this->addSql('DROP TABLE ticket_message');
  456. $this->addSql('DROP TABLE unit');
  457. $this->addSql('DROP TABLE user');
  458. $this->addSql('DROP TABLE user_newsletter_interface');
  459. $this->addSql('DROP TABLE user_group_user_interface');
  460. $this->addSql('DROP TABLE user_product_family_interface');
  461. $this->addSql('DROP TABLE user_merchant');
  462. $this->addSql('DROP TABLE user_point_sale');
  463. $this->addSql('DROP TABLE visitor');
  464. }
  465. }