Hello , i have strange problem. When i login in backend i have following error
Base table or view already exists: 1050 Table 'toomeowns_ecommerce_categories' already exists' in /opt/lampp/htdocs/ecommerceApp/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362
my Version file is : `` 1.0.1:
- Initialize plugin.
- create_categories_table.php `` Why every time i try login , cms try to make table and throw this error ? Please tell me what is wrong , what i wrong.
Do you also have this problem? Can you please post your migration files?
I had this issue when the ordering of migrations in my version.yaml were wrong. You might want to take a look at that. Ideally, you would want to run migrations with pivot tables AFTER the original model migrations have run.
As a previous Laravel developer, I can say migrations are a pain. As a last resort to get past these problems, use php comments
/* Schema::function(); */
in the migration files that are giving you problems to get past them.
A migration can fail halfway through executing a migration file, which means half of the database was created/modified and the other half wasn't. But Laravel doesn't mark the migration as complete, so the next time you go to run it it will usually fail, with a message like "table has already been created".
To get past this, look at the migration file and comment out the parts that you know have executed and are having issues.
Not the most elegant solution, but it will stop the road block.
I removed the plugin that contained the offending migrations, cleared the db of related plugin tables, and ran
php artisan october:up. This appeared to reinstall the plugin and run the migrations solving the issue.
1-6 of 6