12345678910111213141516171819202122 |
- <?php
- namespace Application\Migrations;
- use Doctrine\DBAL\Migrations\AbstractMigration;
- use Doctrine\DBAL\Schema\Schema;
- final class Version20191026202258 extends AbstractMigration
- {
- public function up(Schema $schema)
- {
- $this->addSql('CREATE TABLE captive_portal (id INT AUTO_INCREMENT NOT NULL, ip VARCHAR(15) NOT NULL, ip_range INT UNSIGNED DEFAULT 0 NOT NULL, html_page LONGTEXT NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
- $this->addSql('CREATE TABLE captive_portal_audit (id INT NOT NULL, rev INT NOT NULL, ip VARCHAR(15) DEFAULT NULL, ip_range INT UNSIGNED DEFAULT 0, html_page LONGTEXT DEFAULT NULL, revtype VARCHAR(4) NOT NULL, INDEX rev_fd45fb19d647cf3f4fd978037cad8566_idx (rev), PRIMARY KEY(id, rev)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
- }
- public function down(Schema $schema)
- {
- $this->addSql('DROP TABLE captive_portal');
- $this->addSql('DROP TABLE captive_portal_audit');
- }
- }
|