Completed
Pull Request — development (#495)
by Mirco
10:27 queued 02:38
created

Version20170526212910   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 35
rs 10
wmc 2
lcom 1
cbo 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 0 18 1
A down() 0 5 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 Version20170526212910 extends AbstractMigration
12
{
13
    /**
14
     * @param Schema $schema
15
     * @return void
16
     */
17
    public function up(Schema $schema)
18
    {
19
        $this->abortIf(
20
            $this->connection->getDatabasePlatform()->getName() != 'mysql',
21
            'Migration can only be executed safely on \'mysql\'.'
22
        );
23
24
        $this->addSql("
25
            UPDATE sys_menu SET href = 'page/impressum' WHERE menustring ='MNU_START_IMPRINT';
26
            UPDATE sys_menu SET href = 'page/tos' WHERE menustring ='MNU_START_TOS';
27
            
28
            INSERT INTO page_groups (slug, meta_keywords, meta_description, meta_social, last_changed, active) 
29
                VALUE ('impressum','','','',now(),1);
30
                
31
            INSERT INTO page_groups (slug, meta_keywords, meta_description, meta_social, last_changed, active) 
32
                VALUE ('tos','','','',now(),1);
33
        ");
34
    }
35
36
    /**
37
     * @param Schema $schema
38
     * @return void
39
     */
40
    public function down(Schema $schema)
41
    {
42
        // this down() migration is auto-generated, please modify it to your needs
43
44
    }
45
}
46