I have four migrations file and when I run php artisan migrate in the command line it says:
Nothing to migrate
I also tried with php artisan migrate --database=vcp:
Database [vcp] not configured.
I used another database in my .env file and ran php artisan migrate command again:
Migration table created successfully.
Nothing to migrate.
running
php artisan migrate:refresh, php artisan migrate:reset, php artisan migrate:status, php artisan migrate --path="database/migrations/migration_file" whit these messages
Nothing to rollback.
Nothing to migrate.
No migrations found
and
composer dump-autoload or composer update
didn't help.
here is my .env file
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=vcp
DB_USERNAME=root
DB_PASSWORD=secret
my 2017_05_10_201750_add_columns_to_users.php
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddColumnsToUsers extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('users', function (Blueprint $table) {
$table->string('status')->default('online');
$table->string('api_token');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('status');
$table->dropColumn('api_token');
});
}
}
please help!
php artisan make:migration create_name_of_tablephp artisan migrate --path="database/migrations"?