|
- <?php
-
- declare(strict_types=1);
-
- namespace DoctrineMigrations;
-
- use Doctrine\DBAL\Schema\Schema;
- use Doctrine\Migrations\AbstractMigration;
-
- /**
- * Auto-generated Migration: Please modify to your needs!
- */
- final class Version20210605195723 extends AbstractMigration
- {
- public function getDescription(): string
- {
- return '';
- }
-
- public function up(Schema $schema): void
- {
- // this up() migration is auto-generated, please modify it to your needs
- $this->addSql('CREATE TABLE merchant_setting (id INT AUTO_INCREMENT NOT NULL, merchant_id INT NOT NULL, name VARCHAR(63) NOT NULL, value LONGTEXT DEFAULT NULL, INDEX IDX_464ACD036796D554 (merchant_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
- $this->addSql('CREATE TABLE section_setting (id INT AUTO_INCREMENT NOT NULL, section_id INT NOT NULL, name VARCHAR(63) NOT NULL, value LONGTEXT DEFAULT NULL, INDEX IDX_4D337597D823E37A (section_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
- $this->addSql('ALTER TABLE merchant_setting ADD CONSTRAINT FK_464ACD036796D554 FOREIGN KEY (merchant_id) REFERENCES merchant (id)');
- $this->addSql('ALTER TABLE section_setting ADD CONSTRAINT FK_4D337597D823E37A FOREIGN KEY (section_id) REFERENCES section (id)');
- }
-
- public function down(Schema $schema): void
- {
- // this down() migration is auto-generated, please modify it to your needs
- $this->addSql('DROP TABLE merchant_setting');
- $this->addSql('DROP TABLE section_setting');
- }
- }
|