Created
November 17, 2014 16:05
-
-
Save chanmix51/bbf58ae0621d11dc0c00 to your computer and use it in GitHub Desktop.
blog article about CLI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use \PommProject\Foundation\Pomm; | |
$loader = require __DIR__.'/vendor/autoload.php'; | |
return new Pomm(['my_db' => | |
[ | |
'dsn' => 'pgsql://user:pass@host:port/db_name' | |
] | |
]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"minimum-stability": "dev", | |
"require": { | |
"pomm-project/cli": "dev-master" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ php vendor/bin/pomm.php inspect:database my_db | |
Found 5 schemas in database. | |
+-----------+--------+-----------+------------------------+ | |
| name | oid | relations | comment | | |
+-----------+--------+-----------+------------------------+ | |
| elcaro | 123773 | 2 | | | |
| phparchi | 82738 | 1 | | | |
| pika | 116120 | 1 | | | |
| public | 2200 | 9 | standard public schema | | |
| templates | 116119 | 1 | | | |
+-----------+--------+-----------+------------------------+ | |
$ php vendor/bin/pomm.php generate:schema-all my_db elcaro | |
✓ Creating file './MyDb/ElcaroSchema/AutoStructure/Department.php'. | |
✓ Creating file './MyDb/ElcaroSchema/DepartmentModel.php'. | |
✓ Creating file './MyDb/ElcaroSchema/Department.php'. | |
✓ Creating file './MyDb/ElcaroSchema/AutoStructure/Employee.php'. | |
✓ Creating file './MyDb/ElcaroSchema/EmployeeModel.php'. | |
✓ Creating file './MyDb/ElcaroSchema/Employee.php'. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment