Skip to content

Instantly share code, notes, and snippets.

@ruckus
Created September 25, 2012 22:38
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 ruckus/3784893 to your computer and use it in GitHub Desktop.
Save ruckus/3784893 to your computer and use it in GitHub Desktop.
Sample SQL migration file
// Generate the timestamp for the filename from the command line like:
// php -r "echo date('YmdHis', time());"
UP
--
CREATE TABLE foo (
id int(11) PRIMARY KEY AUTO_INCREMENT,
first_name varchar(64)
);
DOWN
----
DROP TABLE foo;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment