PropelMigration_1475699554   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 76
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 6
c 0
b 0
f 0
lcom 0
cbo 0
dl 0
loc 76
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A preUp() 0 4 1
A postUp() 0 4 1
A preDown() 0 4 1
A postDown() 0 4 1
A getUpSQL() 0 22 1
A getDownSQL() 0 15 1
1
<?php
2
3
/**
4
 * Data object containing the SQL and PHP code to migrate the database
5
 * up to version 1475699554.
6
 * Generated on 2016-10-05 23:32:34 
7
 */
8
class PropelMigration_1475699554
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
9
{
10
    public $comment = '';
11
12
    public function preUp($manager)
0 ignored issues
show
Unused Code introduced by
The parameter $manager is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
13
    {
14
        // add the pre-migration code here
15
    }
16
17
    public function postUp($manager)
0 ignored issues
show
Unused Code introduced by
The parameter $manager is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
18
    {
19
        // add the post-migration code here
20
    }
21
22
    public function preDown($manager)
0 ignored issues
show
Unused Code introduced by
The parameter $manager is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
23
    {
24
        // add the pre-migration code here
25
    }
26
27
    public function postDown($manager)
0 ignored issues
show
Unused Code introduced by
The parameter $manager is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
28
    {
29
        // add the post-migration code here
30
    }
31
32
    /**
33
     * Get the SQL statements for the Up migration
34
     *
35
     * @return array list of the SQL strings to execute for the Up migration
36
     *               the keys being the datasources
37
     */
38
    public function getUpSQL()
39
    {
40
        return array (
41
  'default' => '
42
# This is a fix for InnoDB in MySQL >= 4.1.x
43
# It "suspends judgement" for fkey relationships until are tables are set.
44
SET FOREIGN_KEY_CHECKS = 0;
45
46
CREATE TABLE `selfprice`
47
(
48
    `id` INTEGER NOT NULL AUTO_INCREMENT,
49
    `name` VARCHAR(50),
50
    `datecreate` DATETIME,
51
    `desc` VARCHAR(255),
52
    PRIMARY KEY (`id`)
53
) ENGINE=InnoDB;
54
55
# This restores the fkey checks, after having unset them earlier
56
SET FOREIGN_KEY_CHECKS = 1;
57
',
58
);
59
    }
60
61
    /**
62
     * Get the SQL statements for the Down migration
63
     *
64
     * @return array list of the SQL strings to execute for the Down migration
65
     *               the keys being the datasources
66
     */
67
    public function getDownSQL()
68
    {
69
        return array (
70
  'default' => '
71
# This is a fix for InnoDB in MySQL >= 4.1.x
72
# It "suspends judgement" for fkey relationships until are tables are set.
73
SET FOREIGN_KEY_CHECKS = 0;
74
75
DROP TABLE IF EXISTS `selfprice`;
76
77
# This restores the fkey checks, after having unset them earlier
78
SET FOREIGN_KEY_CHECKS = 1;
79
',
80
);
81
    }
82
83
}