After completing the installation process, I try to access the dashboard page and an error occurs: SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘Tailorapp.orders’ doesn’t exist (SQL: select COUNT(*) as total_count, SUM(total) as total_amount from orders
where created_at
between 2020-06-04 00:00:00 and 2020-07-04 23:59:59 and orders
.deleted_at
is null and account_id
= 1 limit 1).
Basically, most of the tables were not updated in the database and when I try to run php artisan migrate, it gives a lot of errors. I would like to get a fix of this that does not involve me having to manually created those missing tables on PhPMyAdmin. I have tried removing all tables and running the migrate command but after creating some, it gives the constraint error between the users and accounts table.
I have tried reinstalling the entire program but it does not let me go past the 2nd phase (accepting terms and conditions).
- MSAnswered
Hello,
Installer should created all the tables. May I know your MySQL version?
Can you please try to install again and if still having issue, let me know the server details in private reply so that I can check the issue for you.
For manual install, you will need to run
php artisan migrate:fresh --force
and then add the account and owner user manually or with seed or these queriesINSERT INTO `accounts` (`id`, `name`, `phone`, `email`, `address`, `header`, `footer`, `state`, `per_page`, `logo_path`, `gateways`, `notifications`, `email_enabled`, `sms_enabled`, `default_tax`, `created_at`, `updated_at`) VALUES ('1', 'Default Tailor Shop', '+3381922520894', '[email protected]', '87721 Trace Isle Apt. 491, Johnsonstad, Missouri', 'Minima voluptatem ut asperiores ducimus veritatis tempora voluptates.', 'Voluptatem qui debitis voluptates error.', 'NC', '10', NULL, 'Cash,Cheque,Other', NULL, NULL, NULL, NULL, '2020-03-10 02:53:02', '2020-03-10 02:53:02'); INSERT INTO "users" ("id", "account_id", "name", "phone", "email", "username", "password", "owner", "salary", "photo_path", "can_sms", "view_all", "edit_all", "remember_token", "created_at", "updated_at", "deleted_at") VALUES ('1', '1', 'Shop Owner', '+5699817134597', '[email protected]', 'admin', '$2y$10$RAxMyfEefkwI8ktzSvhmXu78zyFnXZhvO5Oc0Kw58Y3s/EdWMvCPq', '1', NULL, NULL, '0', '0', '0', 'raErUOEopP', '2020-03-02 14:14:30', '2020-03-02 14:14:30', NULL);
If you use above query to insert user then the username is
admin
and password12345678
. Please try above and let me know if you need assistance.Thank you
- Login to Reply