partkeepr

fork of partkeepr
git clone https://git.e1e0.net/partkeepr.git
Log | Files | Refs | Submodules | README | LICENSE

Version20160103145302.php (846B)


      1 <?php
      2 
      3 namespace PartKeepr\CoreBundle\DoctrineMigrations;
      4 
      5 use Doctrine\DBAL\Migrations\AbstractMigration;
      6 use Doctrine\DBAL\Schema\Schema;
      7 
      8 /**
      9  * Drops legacy tables.
     10  */
     11 class Version20160103145302 extends AbstractMigration
     12 {
     13     /**
     14      * @param Schema $schema
     15      */
     16     public function up(Schema $schema)
     17     {
     18         $tablesToDrop = [
     19             'LastNotification',
     20             'Event',
     21             'Session',
     22             'PrintingJobConfiguration',
     23             'PrintingJob',
     24         ];
     25         foreach ($tablesToDrop as $table) {
     26             if ($schema->hasTable($table)) {
     27                 $schema->dropTable($table);
     28             }
     29         }
     30     }
     31 
     32     /**
     33      * @param Schema $schema
     34      */
     35     public function down(Schema $schema)
     36     {
     37         // this down() migration is auto-generated, please modify it to your needs
     38     }
     39 }