I am working on my first Laravel project. I'm trying to create database migrations and run them with artisan migrate
. The migrations aren't running and the command returns no output.
Key facts:
- I used
artisan make:migration
to create the migration file with the proper filepath. - The first time I ran the command, it created the migration table in the database. So I know that it is hitting the database and at least doing something right.
- When I have no files in the
database/migrations
folder, I get theNothing to migrate
command. - Beyond these two messages, I have received no output at all from the command. No errors, nothing. Furthermore, there are no records in the migration table in the database.
artisan migrate --verbose
also returns no output.- The permissions on
storage/logs
isdrwxrwxrwx.
I am the owner of the directory. storage/logs/laravel.log
doesn't contain anything pertaining to the migrations.
I've included the code for my first migration below.
This question is different from this question in that the previous user didn't use the proper naming convention. That question contains a detailed answer about the migration process. It's not helpful because I'm not getting any output. I also reviewed the questions suggested by SO as I entered this question.
Perhaps I have something configured incorrectly? What do I need to do to get these migrations running?
2017_01_17_151638_user.php
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
// Create the classes associated with user management.
class UserMigration extends Migration
{
public function up()
{
Schema::create('tblUser', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('email')->unique();
$table->string('password');
$table->rememberToken();
$table->timestamps();
});
Schema::create('tblUserPasswordReset', function (Blueprint $table) {
$table->string('email')->index();
$table->string('token')->index();
$table->timestamp('create_date')->nullable();
});
}
public function down()
{
Schema::dropIfExists('tblUserPasswordReset');
Schema::dropIfExists('tblUser');
}
}