我正在学习Laravel。我正在遵循快速入门文档,但在迁移方面遇到了问题。我已经到了这一步:http://laravel.com/docs/quick#creating-a-migration
当我运行命令
在数据库中,我看到创建了一个名为
有什么想法吗?为什么
php artisan migrate
时,命令行显示如下:c:\wamp\www\laravel>php artisan migrate
Migration table created successfully.
Migrated: 2013_09_21_040037_create_users_table
在数据库中,我看到创建了一个名为
migrations
的表,并且有1条记录。然而,我没有看到一个名为users
的表。因此,我无法继续进行ORM部分的教程。有什么想法吗?为什么
users
表没有被创建?
编辑1(原始迁移文件):
<?php
use Illuminate\Database\Migrations\Migration;
class CreateUsersTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function($table)
{
$table->increments('id');
$table->string('email')->unique();
$table->string('name');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('users');
}
}
Blueprint
来创建迁移架构。请检查更新后的答案。 - Anshad Vattapoyil