I have been using sqlite for development since I started my project and attempted to change everything to mysql with no avail. I am trying to build database in sqlite to continue dev but when running the php artisan migrate command I get:
[Illuminate\Database\QueryException]
SQLSTATE[HY000]: General error: 1 no such table: accounts (SQL: select * fr
om "accounts" limit 1)
[Doctrine\DBAL\Driver\PDOException]
SQLSTATE[HY000]: General error: 1 no such table: accounts
[PDOException]
SQLSTATE[HY000]: General error: 1 no such table: accounts
Ive changed my database config file to default = sqlite and did not change anything in the sqlite array. Ive tried deleteing the sqlite database and recreating and migrating I get the same issue.
I get the same above two errors when running just php artisan
I was unaware of this and makes sense why I experienced some weird activity. I do not have an existing row. I made sure to delete the mysql database on my vagrant machine. I also deleted the database.sqlite file in my database directory and used touch database/database.sqlite to recreate one
well.. just for quick debugging purpose, you can move all of the migration files except
create_accounts_table
// and
create_users_table
and see if the command runs successfully, and track done the rest using this approach, it might take a little longer if your have lots of table on your database, but will save you from being depressed.
I have about 45 tables so it'll take me some time. I already banged my head on the wall for a couple hours on this one so I will do the above tomorrow morning (very late here). Thank you.
I attempted this but still receive the same error. I want to reiterate, just to help come to a conclusion, even running just php artisan throws this same error.
Strange, you are still getting the same error. can you please check your database configuration( .env file or config/database.php ), and do you know if some event occurs and it runs some background program to seed some data on your application( it's a strong possibility now)when the migration runs.........
you can just try by using a simple migration file to see if the command runs successfully, a really too simple table migration file may be only with 2 columns.
I actually moved the database to mysql. I was having issues with foreign keys in mysql so I created a new migration files and placed all foreign keys in that file. Thank you above for the efforts.