10
我想在Laravel 5.创建MySQL表我创建了/project/database/migrations
一个名为users.php
:工匠,在数据库中创建表
[...]
public function up()
{
Schema::create('users', function(Blueprint $table)
{
$table->increments('id');
$table->string('username');
$table->string('fullname');
$table->int('number');
$table->string('email')->unique();
$table->string('password', 60);
$table->rememberToken();
$table->timestamps();
});
}
[...]
然后我试图在project
-folder运行这些命令:
$ php artisan migrate
$ php artisan migrate:install
$ php artisan migrate --pretend
没有一个返回任何输出并且没有创建表。要填充的数据库存在。
请使用此命令'php artisan make:migration CreateUsersTable --create'创建迁移,然后运行'php artisan migrate' – vps