Sto cercando di creare tabelle di MySQL in laravel 5. Ho creato un file in /project/database/migrations
chiamato users.php
:Artisan, la creazione di tabelle nel database
[...]
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();
});
}
[...]
Poi ho provato a fare funzionare questi comandi nella project
-cartella:
$ php artisan migrate
$ php artisan migrate:install
$ php artisan migrate --pretend
Nessuno di questi restituisce alcuno output e non vengono create tabelle. Il database da compilare esiste.
Utilizzare questo comando 'php artisan make: migration CreateUsersTable --create' per creare la migrazione e quindi eseguire' php artisan migrate' – vps