I have created an run the following migration within my brand new Laravel project:
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('users', function(Blueprint $table)
{
$table->increments('id');
$table->string('name', 255);
$table->string('email', 255);
$table->integer('user_level');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('users');
}
}
I would have expected it to create a users
table with name, email, etc., but what I ended up with was a migration
table. What have I done wrong?