|
@@ 16-23 (lines=8) @@
|
| 13 |
|
/** |
| 14 |
|
* @param Schema $schema |
| 15 |
|
*/ |
| 16 |
|
public function up(Schema $schema) |
| 17 |
|
{ |
| 18 |
|
// this up() migration is auto-generated, please modify it to your needs |
| 19 |
|
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.'); |
| 20 |
|
$this->skipIf(!empty($this->connection->fetchAll('SHOW TABLES LIKE "vic_view_translations"')), 'Migration can only be executed safely on \'mysql\'.'); |
| 21 |
|
|
| 22 |
|
$this->addSql('RENAME TABLE `vic_view_translations` TO `vic_view_translations_legacy`'); |
| 23 |
|
} |
| 24 |
|
|
| 25 |
|
/** |
| 26 |
|
* @param Schema $schema |
|
@@ 28-35 (lines=8) @@
|
| 25 |
|
/** |
| 26 |
|
* @param Schema $schema |
| 27 |
|
*/ |
| 28 |
|
public function down(Schema $schema) |
| 29 |
|
{ |
| 30 |
|
// this down() migration is auto-generated, please modify it to your needs |
| 31 |
|
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.'); |
| 32 |
|
$this->skipIf(!empty($this->connection->fetchAll('SHOW TABLES LIKE "vic_view_translations_legacy"')), 'Migration can only be executed safely on \'mysql\'.'); |
| 33 |
|
|
| 34 |
|
$this->addSql('RENAME TABLE `vic_view_translations_legacy` TO `vic_view_translations`'); |
| 35 |
|
} |
| 36 |
|
} |
| 37 |
|
|