-
-
Notifications
You must be signed in to change notification settings - Fork 553
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
[5.x] Add install:eloquent-driver
command
#9669
Conversation
It supports both paths - importing existing entries with the UUID stuff & fresh entries database without importing anything.
Goes alongside statamic/eloquent-driver#250 This commit also adds a check around tree migration publishing so the migration is only published if a `tree` table doesn't already exist.
Once statamic/eloquent-driver#253 has been merged, it won't be possible for the same migration to be published multiple times so this will no longer be an issue.
When running the test suite on Laravel 10.0.0, Prompts would show me the interactive prompt, meaning the assertions wouldn't take place. Related: laravel/framework#48468
…iver-command # Conflicts: # composer.json
…iver-command # Conflicts: # composer.json
Form submissions now have a dedicated driver in the config. See statamic/eloquent-driver#177
See statamic/eloquent-driver#268. Now, the Eloquent Driver has all the drivers set to `file` by default so we don't need to swap anything around here.
Making this a draft for now until I'm done with my current round of tweaks. |
I've opened a PR on the Eloquent Driver to make changes to the importers, which should be reviewed/merged before reviewing this PR: statamic/eloquent-driver#269 Otherwise, this pull request is ready for review once more! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good if you could test that there's a DB set up and configured correctly at the start of the command. Otherwise when you try to perform the migration step it'll crap itself and leave you in a weird state.
This pull request introduces a new
install:eloquent-driver
command which will simplify the process of installing & configuring the Eloquent Driver package.This command will install the
eloquent-driver
package, then prompt the user to select which repositories they wish to migrate over and if they want to migrate existing content into the database or start fresh.Testing
For now, until v4 of the Eloquent Driver has been tagged, you'll need to tweak the package's version constraint in your
composer.json
in order for everything to work:To Do
'driver' => 'eloquent'
string replacement codeThe navigation migrations are published when migrating both collections & navigations. Fix duplicate migrations.Publish tree migrations under their own tag eloquent-driver#250README.md
to mention this command, rather than the various other commands.asset_containers
andassets
global_sets
andglobal_set_variables
collections
andcollection_trees
navigations
andnavigation_trees
forms
andform_submissions