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

Publishing Command Doesn't Publish the Migration Files #14

Closed
ahmadyousefdev opened this issue Mar 5, 2022 · 2 comments
Closed

Publishing Command Doesn't Publish the Migration Files #14

ahmadyousefdev opened this issue Mar 5, 2022 · 2 comments
Labels
question Further information is requested

Comments

@ahmadyousefdev
Copy link

Describe the bug
When I executed the command php artisan vendor:publish --tag=world I got this message

Copied File [/vendor/nnjeim/world/config/world.php] To [/config/world.php]
Copied File [/vendor/nnjeim/world/src/Database/Seeders/WorldSeeder.php] To [/database/seeders/WorldSeeder.php]
Copied Directory [/vendor/nnjeim/world/resources/lang] To [/resources/lang/vendor/world]
Publishing complete.

As you can see, no migration files have been published. I don't know if it's a bug or do you store the data in a json file or do they generate when you execute the seed file, can you please explain? because what I found in the readme is that there are tables, but I can't find any when publishing the files.

Expected behavior
publishing the migration files?

Screenshots
Screen Shot 2022-03-05 at 13 33 35

Thank you 😄

@nnjeim nnjeim added the question Further information is requested label Mar 6, 2022
@nnjeim
Copy link
Owner

nnjeim commented Mar 6, 2022

@ahmadyousefdev hi Ahmed, as you clearly mentioned the migrations are never published but only called when you run php artisan db:seed in the console. please look at Nnjeim\World\WorldServiceProvider.
The installation of the package starts by running php artisan migrate.
The seeding is calling the data from the json files.
The lang files, the config file (world.php) and the WorldSeeder are only published.
At this stage i don't see a reason why would we publish the migrations if they are called only once.
In the upcoming release we will consider a dynamic migrations structure where the user can choose which fields he wants to include from the the json source.

@ahmadyousefdev
Copy link
Author

Thank you for the clarification, it's all clear now.
I will look forward for the upcoming releases, it's better imo to have dynamic migrations. :)

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

No branches or pull requests

2 participants