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

Allow specifying template style for create command #2013

Merged
merged 7 commits into from
Oct 12, 2021

Conversation

MasterOdin
Copy link
Member

This PR adds a new config option and runtime flag for allowing to specify the template style you want to use, either change or up_down, with the former being the default value. This can be used by people who want the older style of up and down functions over the change function.

This PR is against 0.next due to breaking changes of:

  • Renaming const in Create console class.
  • Renaming the filename for the migration template.

Closes #2009.

@MasterOdin
Copy link
Member Author

Codecov failing seems like a bug on their end as all lines in this changeset are covered by tests.

@dereuromark dereuromark merged commit a106926 into 0.next Oct 12, 2021
@dereuromark dereuromark deleted the feature-template-style branch October 12, 2021 09:18
@Bilge
Copy link
Contributor

Bilge commented Oct 12, 2021

Any news on when this will have a release tag?

@dereuromark
Copy link
Member

Any other breaking changes we want to include and ship?
Maybe in the next few weeks.

@Bilge
Copy link
Contributor

Bilge commented Jan 8, 2022

Is this documented? I can't find any reference to template in the documentation.

If I run vendor/bin/phinx create -t up_down Foo it gives me:

In Create.php line 220:
The alternative template file "up_down" does not exist

@@ -57,6 +58,8 @@ protected function configure(): void

// Allow the migration path to be chosen non-interactively.
$this->addOption('path', null, InputOption::VALUE_REQUIRED, 'Specify the path in which to create this migration');

$this->addOption('style', null, InputOption::VALUE_REQUIRED, 'Specify the style of migration to create');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This creates a BC issue for https://github.com/cakephp/migrations/actions/runs/3583067226/jobs/6028049748 it seems for new release of supporting 0.13

Could we just default to one somewhere maybe? Not having it required?

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.

3 participants