[Laravel] migrate

// create create_users_table migrate file
$ php artisan migrate:make create_users_table --table="users"  --create

// generated file: app/database/migrations/2014_05_12_023323_create_users_table.php
public function up()
{
  Schema::create('users', function(Blueprint $table)
  {
    //
    $table->increments("id");
    $table->string("username")->unique();
    $table->string("password");
    $table->timestamps();
  });
}
public function down()
{
  Schema::drop("users");
}
// execute up()
$ php artisan migrate
// execute down()
$ php artisan migrate:rollback



// add another migrate file to add new column:email to users table
$ php artisan migrate:make add_email_to_users_table --table="users"

// generated file: app/database/migrations/2014_05_12_025324_add_email_to_users_table.php
public function up()
{
  Schema::table('users', function(Blueprint $table)
  {
    //
    $table->string("email")->unique()->after("username");
  });
}

public function down()
{
  Schema::table('users', function(Blueprint $table)
  {
    //
    $table->dropColumn("email");
  });
}