Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install instructions clarification re DB migrations and importing #82

Open
ChrisHardie opened this issue Nov 8, 2021 · 4 comments
Open

Comments

@ChrisHardie
Copy link

The installation instructions currently specify that artisan migrate is to be run before the the DB dump is imported manually. In my case, this led to a migration error:

Cannot declare class CreateSchedulesTable, because the name is already in use

Indeed:

$ grep -r 'CreateSchedulesTable' database/migrations/*
database/migrations/2020_06_13_094604_create_schedules_table.php:class CreateSchedulesTable extends Migration
database/migrations/2020_11_28_061354_create_schedules_table.php:class CreateSchedulesTable extends Migration

But when I imported the database dump first (mysql -u orservices orservices < database/dump/15022021.sql) and then ran the migrations, everything worked okay.

Unless I'm missing something, should the README be updated to reflect this order of operations?

(Related, is it a goal to get all of the initial DB data imported via seeding, or are there good reasons for having it done via a direct SQL file import?)

@ChrisHardie ChrisHardie changed the title Install instructions clarification Install instructions clarification re DB migrations and importing Nov 8, 2021
@devinbalkind
Copy link
Contributor

Great questions.

I'm curious what @d9it and @bmunyoki think about this.

@d9it
Copy link
Collaborator

d9it commented Nov 9, 2021

Hi Chris,

  1. If you import the database manually then no need to use php artisan migrate.
  2. Cannot declare class CreateSchedulesTable, because the name is already in use -: == This issue has been resolved.

@ChrisHardie
Copy link
Author

  1. If you import the database manually then no need to use php artisan migrate.

FWIW I did try just importing manually, but there was brokenness until I ran the migrations.

@d9it
Copy link
Collaborator

d9it commented Nov 9, 2021

Below is the updated SQL dump file.

https://github.com/sarapis/orservices/blob/master/database/dump/09112021.sql

Can you please try again with importing manually?

Let me know if you are still facing any issues. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants