I'm trying to use artisan migrate
to create tables in sqlite
.
I have the following in database.php
'sqlite' => [
'driver' => 'sqlite',
'database' => database_path('database.sqlite'),
'prefix' => '',
],
and this is my migrate class up
function
Schema::connection('sqlite')->create('users', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('email')->unique();
$table->string('password');
$table->rememberToken();
$table->timestamps();
});
Note:- I have set DB_CONNECTION to be sqlite via the environment variable.
On the command line I get nothing to migrate
, and no db is created (also no table).
Any ideas how I can get artisan migrate
to create an sqlite
db in laravel 5
?
I have no problem creating mysql
tables via artisan.
Thanks
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire