Skip to content

Instantly share code, notes, and snippets.

@robmorgan
Created April 22, 2013 12:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robmorgan/5434587 to your computer and use it in GitHub Desktop.
Save robmorgan/5434587 to your computer and use it in GitHub Desktop.
<?php
use Phinx\Migration\AbstractMigration;
class CreatePostsTable extends AbstractMigration
{
/**
* Migrate Up.
*/
public function up()
{
$this->execute('CREATE TABLE `post` (
`title` VARCHAR(255),
`time_created` DATETIME,
`content` MEDIUMTEXT
);');
}
/**
* Migrate Down.
*/
public function down()
{
$this->execute('DROP TABLE `post`');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment