B
B
BonBon Slick2016-12-13 14:10:20
Laravel
BonBon Slick, 2016-12-13 14:10:20

php artisan error, need laravel 5.3 table to use it?

I was sitting creating migrations
php artisan make:migration create_mytable_table
. Suddenly, it gives an error, in order to create a table, a table is needed o_O
Error:

[Illuminate\Database\QueryException]
  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'lara53.messages' doesn't
   exist (SQL: select * from `messages` where `status` = 0)

  [PDOException]
  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'lara53.messages' doesn't
   exist

I try:
> php artisan dumpautoload
> php artisan dump-autoload

Same error. I'm trying to migrate the messages table , I'm getting the same error....
Deleted all migrations, rebooted the server. Can't do migrations now. DB recreated and cleaned. -_-

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Aksentiev, 2016-12-13
@BonBonSlick

Where is your migration? Psychics on vacation as always.
Most likely you wrote Schema::table
instead of Schema::create
The first option is modification
The second is creation.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question