Support the ongoing development of Laravel.io →
Configuration Validation

I want more table create using L4, But when a create a new table called (mail) nothing migrate this , showing before table already exist & with below error, why ?

[Illuminate\Database\QueryException]

SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'lesson_tag' already exists (SQL: create table lesson_tag (id int unsigned not null auto_increment primary key, lesson_id int unsigned not null, tag_id in t unsigned not null, created_at timestamp default 0 not null, updated_at timestamp default 0 not null) default character set utf8 collate utf8_uni code_ci)

migrate [--bench[="..."]] [--database[="..."]] [--force] [--path[="..."]] [--pac kage[="..."]] [--pretend] [--seed]

Last updated 3 years ago.
0

Have you tried checking if the table already exist, you can try migrate:reset or just dropping the database and creating it again.

Last updated 3 years ago.
0

The error is focused on a table named lesson_tag.

Please copy paste the migration thats causing this error we can take a look.

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.