Schema::create(‘jobs’, function (Blueprint $table) {
$table->id();
$table->string('title');
$table->text('description');
$table->unsignedInteger('salary');
$table->string('location');
$table->string('category');
$table->enum('experience', ['entry', 'intermediate', 'senior']);
$table->timestamps();
});
I’ve tried to seed the database with a factory using php artisan migrate:refresh –seed but i get this error:
SQLSTATE[42S01]: Base table or view already exists: 1050 Table ‘jobs’ already exists (Connection: mysql, SQL: create table jobs
(id
bigint unsigned not null auto_increment primary key, title
varchar(255) not null, description
text not null, salary
int unsigned not null, location
varchar(255) not null, category
varchar(255) not null, experience
enum(‘entry’, ‘intermediate’, ‘senior’) not null, created_at
timestamp null, updated_at
timestamp null) default character set utf8mb4 collate ‘utf8mb4_unicode_ci’)