Propel
Propel copied to clipboard
Doen't work command build sql and model with postgresql (broken 1.7.1)
I use PostgreSQL database with Symfony 2.3 and after upgraded propel from 1.7.0 to 1.7.1 database detection doesn't work.
Symfony command: php app/console propel:sql:build --verbose
Output: Execution of target "build-sql" failed for the following reason: /home/rennis/project/certyfikatyssl/vendor/propel/propel1/generator/build-propel.xml:637:1: BLOB and TEXT columns cannot have DEFAULT values. in MySQL. [phing] /home/rennis/project/certyfikatyssl/vendor/propel/propel1/generator/build-propel.xml:637:1: BLOB and TEXT columns cannot have DEFAULT values. in MySQL.
Symfony command: php app/console propel:model:build
Part diff for my one file: src/Domeny/EppBundle/Model/om/TestTableQuery.php protected function findPkSimple($key, $con) {
-
$sql = 'SELECT "id", "created_at" FROM "test_table" WHERE "id" = :p0';
-
$sql = 'SELECT `id`, `created_at` FROM `test_table` WHERE `id` = :p0';
I think that issue "First try to load platform from the user provided build properties" broke this functionality.
Link to issue https://github.com/propelorm/Propel/issues/815
Link to diff: https://github.com/propelorm/Propel/commit/82a7a32fb08f47dba8165e3654bd5985ecbe90ad#diff-a628546bbad50408966b289ef65c9ed0
When I restore the previouse version of file "generator/lib/config/GeneratorConfig.php". Commands work fine.
I came across this issue today, after an update to propel 1.7.1. We are using multiple databases with different adapters in one project and after the rebuild of the model, the adapter setting in the connections configuration got ignored and all was set back to mysql (set by default.properties).
We changed our project propel.ini to restore the old behavior:
propel.platform.class =