Skip to content

Instantly share code, notes, and snippets.

@bilalq
Created May 2, 2013 04:40
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 bilalq/5500175 to your computer and use it in GitHub Desktop.
Save bilalq/5500175 to your computer and use it in GitHub Desktop.
Sample migration for L3.
<?php
class Create_Users_Table {
/**
* Make changes to the database.
*
* @return void
*/
public function up() {
Schema::create('users', function($t) {
$t->integer('ruid')->unsigned();
$t->string('netid', 100)->unique();
$t->string('email', 100)->unique();
$t->string('name', 50);
$t->string('password', 100);
$t->timestamps();
$t->primary('ruid');
});
}
/**
* Revert the changes to the database.
*
* @return void
*/
public function down() {
Schema::drop('users');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment