phalcon migration generate reference onDelete &onUpdate empty in postgresql
Hello, have a problem:
run command for generate migration:
phalcon migration generate
in all table files empty reference on update and on delete.
result example:
new Reference(
'content_resource_id_fkey',
[
'referencedTable' => 'resources',
'columns' => ['resource_id'],
'referencedColumns' => ['id'],
'onUpdate' => '',
'onDelete' => ''
]
)
its really onUpdate -> 'NO ACTION' onDelete -> 'CASCADE'
i in manual set in all files correct reference, after "phalcon migration run" - all reference set in correctly, but if generate new migration, reference reset again. (file has empty action for update and delete)
Details
- DB: Postgresql 9.6
- Phalcon DevTools Version: 3.0.5
- Phalcon Version: 3.0.3
- AdminLTE Version: 2.3.6
- OS: Darwin mactosic 16.4.0 Darwin Kernel Version 16.4.0: Thu Dec 22 22:53:21 PST 2016; root:xnu-3789.41.3~3/RELEASE_X86_64 x86_64
- PHP Version: 7.0.13
- PHP SAPI: cli
- PHP Bin: /Applications/MAMP/bin/php/php7.0.13/bin/php
- PHP Extension Dir: /Applications/MAMP/bin/php/php7.0.13/lib/php/extensions/no-debug-non-zts-20151012
- PHP Bin Dir: /Applications/MAMP/bin/php/php7.0.13/bin
- Loaded PHP config: /Applications/MAMP/bin/php/php7.0.13/conf/php.ini
@AnatolyAstapov It has been fix earlier. Could you try latest stable version? Added foreign key and after generating migration I had this
'references' => [
new Reference(
'test_key',
[
'referencedTable' => 'foreign_key_parent',
'referencedSchema' => 'public',
'columns' => ['child_int'],
'referencedColumns' => ['refer_int'],
'onUpdate' => 'NO ACTION',
'onDelete' => 'CASCADE'
]
)
],
I propose close this issue, because problem was fixed.
Phalcon DevTools Version: 3.2.3 Phalcon Version: 3.2.1
Closing, this is fixed. If there are bugs, we can follow up in separate issues.