Skip to content

Commit

Permalink
Renamed config and command file
Browse files Browse the repository at this point in the history
  • Loading branch information
odan committed Dec 9, 2016
1 parent 5b50196 commit d27502a
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 14 deletions.
14 changes: 3 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,13 @@ THIS IS A DEVELOPMENT PREVIEW - DO NOT USE IT IN PRODUCTION!

# Installation

```
git clone https://github.com/odan/phinx-migrations-generator.git
cd migrations
composer install --no-dev
```

# Integration

```
composer require odan/phinx-migrations-generator
```

# Configuration

* Default configuration file: migrations-config.php
* Default configuration file: phinx-migrations-config.php

Example:

Expand Down Expand Up @@ -82,13 +74,13 @@ migration_path | string | | Output directory for migration files

```
cd bin
php migrations.php migration:generate
php phinx-migrations migration:generate
```

## Load custom config file

```
php migrations.php migration:generate --config=myconfig.php
php phinx-migrationsmigration:generate --config=myconfig.php
```

## Alternative projects
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/Migration/Command/GenerateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ protected function configure()
{
$this->setName('migration:generate')
->setDescription('Generate migration')
//->addArgument('config', InputArgument::OPTIONAL, 'Configuration file.', 'migrations-config.php')
//->addArgument('config', InputArgument::OPTIONAL, 'Configuration file.', 'phinx-migrations-config.php')
// php migrations.php migration:generate --config=myconfig.php
->addOption('config', null, InputOption::VALUE_OPTIONAL, 'Configuration file.', 'migrations-config.php')
->addOption('config', null, InputOption::VALUE_OPTIONAL, 'Configuration file.', 'phinx-migrations-config.php')
;
}

Expand Down
1 change: 0 additions & 1 deletion src/Migration/Generator/MigrationGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,6 @@ public function getPdo($settings)
*/
public function getSettings()
{
//$this->configFile = sprintf('%s/%s', getcwd(), 'migrations-config.php');
if (!file_exists($this->configFile)) {
throw new Exception(sprintf('File not found: %s', $this->configFile));
}
Expand Down

0 comments on commit d27502a

Please sign in to comment.