Created
April 6, 2013 05:40
-
-
Save robmorgan/5325000 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Phinx\Migration\AbstractMigration; | |
class ExampleMigration extends AbstractMigration | |
{ | |
/** | |
* Change Method. | |
* | |
* More information on this method is available here: | |
* http://docs.phinx.org/en/latest/migrations.html#the-change-method | |
* | |
* Uncomment this method if you would like to use it. | |
*/ | |
public function change() | |
{ | |
$table = $this->table('posts'); | |
$table->addColumn('title', 'string', array('limit' => 30)) | |
->addColumn('body', 'text') | |
->addColumn('created', 'datetime') | |
->addColumn('updated', 'datetime', array('default' => null)) | |
->create(); | |
} | |
/** | |
* Migrate Up. | |
*/ | |
public function up() | |
{ | |
} | |
/** | |
* Migrate Down. | |
*/ | |
public function down() | |
{ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment