Completed
Push — master ( 33443d...de9a4e )
by Sam
03:47
created

PropelMigration_1455268734::postDown()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 4
rs 10
cc 1
eloc 1
nc 1
nop 1
1
<?php
2
3
/**
4
 * Data object containing the SQL and PHP code to migrate the database
5
 * up to version 1455268734.
6
 * Generated on 2016-02-12 09:18:54 by vagrant
7
 */
8
class PropelMigration_1455268734
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
  'tvheadend_status_manager' => '
42
PRAGMA foreign_keys = OFF;
43
44
DROP TABLE IF EXISTS [input];
45
46
CREATE TABLE [input]
47
(
48
    [uuid] VARCHAR(255) NOT NULL,
49
    [instance_name] VARCHAR(255) NOT NULL,
50
    [started] TIMESTAMP NOT NULL,
51
    [input] VARCHAR(255) NOT NULL,
52
    [network] VARCHAR(255) NOT NULL,
53
    [mux] VARCHAR(255) NOT NULL,
54
    [weight] INTEGER NOT NULL,
55
    PRIMARY KEY ([uuid]),
56
    UNIQUE ([uuid]),
57
    FOREIGN KEY ([instance_name]) REFERENCES [instance] ([name])
58
);
59
60
PRAGMA foreign_keys = ON;
61
',
62
);
63
    }
64
65
    /**
66
     * Get the SQL statements for the Down migration
67
     *
68
     * @return array list of the SQL strings to execute for the Down migration
69
     *               the keys being the datasources
70
     */
71
    public function getDownSQL()
72
    {
73
        return array (
74
  'tvheadend_status_manager' => '
75
PRAGMA foreign_keys = OFF;
76
77
DROP TABLE IF EXISTS [input];
78
79
PRAGMA foreign_keys = ON;
80
',
81
);
82
    }
83
84
}
85