so I have looked around and found several suggestions of how this can be fixed but I still can't get it to work.
so I have created a file called social.php inside my migrations folder.
and added this code inside it. but when I execute the command
php artisan migrate
I get Nothing to migrate as a return.
Note that I executed this command to created Auth (users table
and password reset
migrated successfully), then after I finished with them, I backed them up and removed them from migration folder.
I created social.php
and then all of this happened.
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateSocialTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('social', function (Blueprint $table) {
$table->increments('id');
$table->string('userid');
$table->string('sname');
$table->string('sud');
$table->string('surl');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('social');
}
}
Have you created the migration file via php artisan make:migration
or you've created it manually?
If you did it through the command the just drop the respected table from your database and also delete your migration file then run php artisan migrate
Use this Command in Terminal For Make Migration:
php artisan make:migration create_social_table
if your looking for a model with migration just put
php artisan make:migration create_social_table -m