Completed
Pull Request — development (#546)
by Nick
07:44 queued 58s
created

Version20170830005500::up()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 5
rs 9.4285
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