Created
May 2, 2013 04:40
-
-
Save bilalq/5500175 to your computer and use it in GitHub Desktop.
Sample migration for L3.
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 | |
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