Completed
Push — master ( 0eab77...b2f729 )
by Paul
05:35
created

Version20160510154806::up()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 8
Ratio 100 %

Importance

Changes 0
Metric Value
dl 8
loc 8
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 1
1
<?php
2
3
namespace Victoire\Migrations;
4
5
use Doctrine\DBAL\Migrations\AbstractMigration;
6
use Doctrine\DBAL\Schema\Schema;
7
8
/**
9
 * Auto-generated Migration: Please modify to your needs!
10
 */
11
class Version20160510154806 extends AbstractMigration
12
{
13
    /**
14
     * @param Schema $schema
15
     */
16 View Code Duplication
    public function up(Schema $schema)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
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
27
     */
28 View Code Duplication
    public function down(Schema $schema)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
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