Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Mar 21st, 2010 | Syntax: None | Size: 0.61 KB | Hits: 70 | Expires: Never
Copy text to clipboard
  1. <?php
  2.  
  3. namespace DoctrineMigrations;
  4.  
  5. use DoctrineExtensions\Migrations\AbstractMigration,
  6.     Doctrine\DBAL\Schema\Schema;
  7.  
  8. class Migration1 extends AbstractMigration
  9. {
  10.     public function up(Schema $schema)
  11.     {
  12.         $table = $schema->createTable('testing1');
  13.         $table->addColumn('test', 'string');
  14.  
  15.         $table = $schema->createTable('testing3');
  16.         $table->addColumn('test1', 'string');
  17.         $table->addColumn('test2', 'string');
  18.     }
  19.  
  20.     public function down(Schema $schema)
  21.     {
  22.         $schema->dropTable('testing1');
  23.         $schema->dropTable('testing3');
  24.     }
  25. }