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

database name as option, som small improvements #21

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

elgaard
Copy link

@elgaard elgaard commented Mar 22, 2019

We need this for testing scripts that copy and create databases on the fly, so that we do not have to create environment files each time.

elgaard added 2 commits March 22, 2019 14:56
ignore missing SQL migration files
--database option, so that similar databases can be migrated with generic env file. For e.g., testing scripts
use environment editor
@alwex
Copy link
Owner

alwex commented Mar 22, 2019

Hi Elgaard, thank you for contributing.

Can you please make sure that your code follow the PSR2 standard, I have updated the master branch fo comes with some dev utilities such as docker and phpcs to help contributors, a well as a guideline for contributors.

Please merge back master to your code and make sure:

  • the code strictly follow PSR2 coding standards, you can run bin/phpcs --standard=PSR2 Migrate/ to verify.
  • any feature/option addition is covered by a unit test.

Thank you.

@elgaard
Copy link
Author

elgaard commented Apr 2, 2019

It now follows PSR2 and have unit tests.
I added a check for the sqlite driver in the test script, because i spent some time on it before I realized that phpunit failed because of a missing driver.

@alwex
Copy link
Owner

alwex commented Apr 3, 2019

Just a few formatting issues remains :)

@elgaard
Copy link
Author

elgaard commented Apr 3, 2019

Can you give me a hint about the formatting.

@alwex
Copy link
Owner

alwex commented Apr 4, 2019

I have commented on your code, but globally, it is about adding space around operators and removing extra blank lines, eg:

$dbname=$input->getOption('driver'); should be $dbname = $input->getOption('driver');
$currentDate = date('Y-m-d H:i:s',$time0); should be $currentDate = date('Y-m-d H:i:s', $time0);

which are formatting rules not covered by PSR2: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md#7-conclusion

@elgaard
Copy link
Author

elgaard commented Apr 8, 2019

I tried to to fix formatting issues

@elgaard
Copy link
Author

elgaard commented Jul 5, 2019

Are there still issues?

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