Completed
Pull Request — development (#546)
by Nick
07:54 queued 01:05
created

Version20170830005500   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 21
rs 10
wmc 2
lcom 0
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 0 5 1
A down() 0 4 1
1
<?php
2
3
namespace Application\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 Version20170830005500 extends AbstractMigration
12
{
13
    /**
14
     * @param Schema $schema
15
     * @return void
16
     */
17
    public function up(Schema $schema)
18
    {
19
        $this->addSql('ALTER TABLE languages ADD is_translated TINYINT DEFAULT 0 NOT NULL;');
20
        $this->addSql('UPDATE languages SET is_translated = 1 WHERE short IN (\'DE\', \'EN\', \'FR\', \'IT\', \'ES\');');
21
    }
22
23
    /**
24
     * @param Schema $schema
25
     * @return void
26
     */
27
    public function down(Schema $schema)
28
    {
29
        // this down() migration is auto-generated, please modify it to your needs
30
    }
31
}
32