| @@ 11-34 (lines=24) @@ | ||
| 8 | /** |
|
| 9 | * Auto-generated Migration: Please modify to your needs! |
|
| 10 | */ |
|
| 11 | class Version20141031164140 extends AbstractMigration |
|
| 12 | { |
|
| 13 | public function up(Schema $schema) |
|
| 14 | { |
|
| 15 | // this up() migration is auto-generated, please modify it to your needs |
|
| 16 | $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.'); |
|
| 17 | ||
| 18 | $this->addSql("ALTER TABLE event_stream CHANGE type type varchar(255)"); |
|
| 19 | $this->addSql("ALTER TABLE event_stream DROP INDEX unique_playhead"); |
|
| 20 | $this->addSql("ALTER TABLE event_stream ADD INDEX type (type)"); |
|
| 21 | $this->addSql("ALTER TABLE event_stream ADD UNIQUE INDEX unique_uuid_playhead (uuid, playhead)"); |
|
| 22 | } |
|
| 23 | ||
| 24 | public function down(Schema $schema) |
|
| 25 | { |
|
| 26 | // this down() migration is auto-generated, please modify it to your needs |
|
| 27 | $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.'); |
|
| 28 | ||
| 29 | $this->addSql("ALTER TABLE event_stream CHANGE type type varchar(150)"); |
|
| 30 | $this->addSql("ALTER TABLE event_stream DROP INDEX type"); |
|
| 31 | $this->addSql("ALTER TABLE event_stream DROP INDEX unique_uuid_playhead"); |
|
| 32 | $this->addSql("ALTER TABLE event_stream ADD INDEX unique_playhead (playhead)"); |
|
| 33 | } |
|
| 34 | } |
|
| 35 | ||
| @@ 11-34 (lines=24) @@ | ||
| 8 | /** |
|
| 9 | * Auto-generated Migration: Please modify to your needs! |
|
| 10 | */ |
|
| 11 | class Version20150305114932 extends AbstractMigration |
|
| 12 | { |
|
| 13 | public function up(Schema $schema) |
|
| 14 | { |
|
| 15 | // this up() migration is auto-generated, please modify it to your needs |
|
| 16 | $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.'); |
|
| 17 | ||
| 18 | $this->addSql('DROP INDEX idx_ra_second_factor_type ON ra_second_factor'); |
|
| 19 | $this->addSql('DROP INDEX idx_ra_second_factor_status ON ra_second_factor'); |
|
| 20 | $this->addSql('DROP INDEX idx_ra_second_factor_name ON ra_second_factor'); |
|
| 21 | $this->addSql('DROP INDEX idx_ra_second_factor_email ON ra_second_factor'); |
|
| 22 | } |
|
| 23 | ||
| 24 | public function down(Schema $schema) |
|
| 25 | { |
|
| 26 | // this down() migration is auto-generated, please modify it to your needs |
|
| 27 | $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.'); |
|
| 28 | ||
| 29 | $this->addSql('CREATE INDEX idx_ra_second_factor_type ON ra_second_factor (type)'); |
|
| 30 | $this->addSql('CREATE INDEX idx_ra_second_factor_status ON ra_second_factor (status)'); |
|
| 31 | $this->addSql('CREATE INDEX idx_ra_second_factor_name ON ra_second_factor (name)'); |
|
| 32 | $this->addSql('CREATE INDEX idx_ra_second_factor_email ON ra_second_factor (email)'); |
|
| 33 | } |
|
| 34 | } |
|
| 35 | ||
| @@ 11-34 (lines=24) @@ | ||
| 8 | /** |
|
| 9 | * Auto-generated Migration: Please modify to your needs! |
|
| 10 | */ |
|
| 11 | class Version20150312134629 extends AbstractMigration |
|
| 12 | { |
|
| 13 | public function up(Schema $schema) |
|
| 14 | { |
|
| 15 | // this up() migration is auto-generated, please modify it to your needs |
|
| 16 | $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.'); |
|
| 17 | ||
| 18 | $this->addSql('ALTER TABLE ra_second_factor CHANGE second_factor_id second_factor_id VARCHAR(255) NOT NULL'); |
|
| 19 | $this->addSql('ALTER TABLE verified_second_factor CHANGE second_factor_identifier second_factor_identifier VARCHAR(255) NOT NULL'); |
|
| 20 | $this->addSql('ALTER TABLE unverified_second_factor CHANGE second_factor_identifier second_factor_identifier VARCHAR(255) NOT NULL'); |
|
| 21 | $this->addSql('ALTER TABLE vetted_second_factor CHANGE second_factor_identifier second_factor_identifier VARCHAR(255) NOT NULL'); |
|
| 22 | } |
|
| 23 | ||
| 24 | public function down(Schema $schema) |
|
| 25 | { |
|
| 26 | // this down() migration is auto-generated, please modify it to your needs |
|
| 27 | $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.'); |
|
| 28 | ||
| 29 | $this->addSql('ALTER TABLE ra_second_factor CHANGE second_factor_id second_factor_id VARCHAR(36) NOT NULL COLLATE utf8_unicode_ci'); |
|
| 30 | $this->addSql('ALTER TABLE unverified_second_factor CHANGE second_factor_identifier second_factor_identifier VARCHAR(32) NOT NULL COLLATE utf8_unicode_ci'); |
|
| 31 | $this->addSql('ALTER TABLE verified_second_factor CHANGE second_factor_identifier second_factor_identifier VARCHAR(32) NOT NULL COLLATE utf8_unicode_ci'); |
|
| 32 | $this->addSql('ALTER TABLE vetted_second_factor CHANGE second_factor_identifier second_factor_identifier VARCHAR(32) NOT NULL COLLATE utf8_unicode_ci'); |
|
| 33 | } |
|
| 34 | } |
|
| 35 | ||