1

I have a project on which I need to run php artisan migrate. It should be easy but I am getting an error:

php artisan migrate

Illuminate\Database\QueryException

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'skz.master_courses' doesn't exist (SQL: select * from master_courses where date_from > 2021-06-01 and master_courses.deleted_at is null order by date_from asc limit 1)

I don't understand where the select command comes from. Does anybody know where is it from?

5
  • check do you skz database created in mysql Commented Jun 1, 2021 at 13:05
  • Skz database is empty. Dont understand why migrate script call select. Commented Jun 1, 2021 at 13:07
  • 1
    check for capital S or s .if its perfect then check any query executing in service provider etc.. this is just my guessing Commented Jun 1, 2021 at 13:08
  • YES you are right. AppSeviceProvider.php contains select in boot() method. Create an answer I can accept. Commented Jun 1, 2021 at 13:17
  • okay. i will .... Commented Jun 1, 2021 at 13:26

1 Answer 1

1

The error usually throw when database doesn't exist in mysql.

But in your case, database exists in mysql server.So you it look like your application executing select query in any one of the service provider boot() method

public function boot()
{
          
}

So you might need to stop query execution till migration completes.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.