| 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 | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 9 |  |  | { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 10 |  |  |     public $comment = ''; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 11 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 12 |  |  |     public function preUp($manager) | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 13 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 14 |  |  |         // add the pre-migration code here | 
            
                                                                                                            
                            
            
                                    
            
            
                | 15 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 16 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 17 |  |  |     public function postUp($manager) | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 18 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 19 |  |  |         // add the post-migration code here | 
            
                                                                                                            
                            
            
                                    
            
            
                | 20 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 21 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 22 |  |  |     public function preDown($manager) | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 23 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 24 |  |  |         // add the pre-migration code here | 
            
                                                                                                            
                            
            
                                    
            
            
                | 25 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 26 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 27 |  |  |     public function postDown($manager) | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 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 |  |  |  | 
            
                        
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.