Skip to content

Instantly share code, notes, and snippets.

@mbfisher
Created January 28, 2014 14:31
Show Gist options
  • Save mbfisher/8668695 to your computer and use it in GitHub Desktop.
Save mbfisher/8668695 to your computer and use it in GitHub Desktop.

Tables

Work on a table:

$table = $this->table('table_name');

To commit changes in an up or down method:

$table->save();

To commite change in a change method:

$table->create();
# OR
$table->update();

Add

Add a column:

$table->addColumn('column_name', type);

PDO types:

primary_key
string
text
integer
biginteger
float
decimal
datetime
timestamp
time
date
binary
boolean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment