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

introduce migrate/create-all to generate migrations for all tables in… #3

Merged
merged 3 commits into from Mar 29, 2017

Conversation

thyseus
Copy link
Contributor

@thyseus thyseus commented Mar 29, 2017

…side the database

@bizley
Copy link
Owner

bizley commented Mar 29, 2017

This is great idea but the sure parameter is redundant. Please refactor this to use prompt() method.

@bizley
Copy link
Owner

bizley commented Mar 29, 2017

Oh, you did :)


if ($this->prompt("Are you sure you want to generate " . count($tables) . " migrations? [yes/no]") === 'yes') {
foreach ($tables as $table) {
$this->actionCreate($table);
Copy link
Owner

Choose a reason for hiding this comment

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

Instead of iterating over the tables you can call this action once and pass the imploded list of names - thanks to this the same mass decision can be used for each table if user would like to change the default one in case of file to be generated already exists.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah ok ! Good to know. Will adjust.

@bizley bizley merged commit 4f3d313 into bizley:master Mar 29, 2017
@bizley
Copy link
Owner

bizley commented Mar 29, 2017

Cheers!

@bizley bizley self-assigned this Mar 29, 2017
@bizley bizley added this to the 2.1 milestone Mar 29, 2017
@mryndin mryndin mentioned this pull request Mar 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants