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

Publish tree migrations under their own tag #250

Closed

Conversation

duncanmcclean
Copy link
Member

@duncanmcclean duncanmcclean commented Mar 6, 2024

This pull request moves the migration for the trees table to its own publish tag, to allow for it to be published independently of the navigations table.

This PR also renames the migration to simply create_trees_table since the table is called trees and not navigation_trees. Feel free to rename this back if you think it'll cause issues.

Builds on the changes introduced in #249.

@ryanmitchell
Copy link
Contributor

The only issue i can think of will be that it would create a migration for collections and then another for navs if you do it later due to how migrationPath() works.

I wonder if we should take the chance to switch to a more conventional migrations approach and have them with fixed dates?

@duncanmcclean
Copy link
Member Author

I wonder if we should take the chance to switch to a more conventional migrations approach and have them with fixed dates?

Yeah, I think that might be a better approach. It's the way Laravel handles it with their first-party packages. I'll close this PR and make that change in a separate PR.

@duncanmcclean duncanmcclean deleted the publish-tree-migration-under-its-own-tag branch March 6, 2024 17:40
duncanmcclean added a commit to statamic/cms that referenced this pull request Mar 6, 2024
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.
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

Successfully merging this pull request may close these issues.

2 participants