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

phalcon/db/dialect/mysql.zep in method createTable not using referencedSchema when creating related references #14378

Closed
Hameloid opened this issue Sep 11, 2019 · 1 comment
Assignees
Labels
Projects

Comments

@Hameloid
Copy link

@Hameloid Hameloid commented Sep 11, 2019

When i'm create table with foreign key to table in other database reference 'referencedSchema' not using
for example
use database1;
reference to database2 on table users

'references' => [
                    new Reference(
                        'fk_id_user',
                        [
                            'referencedTable' => 'users',
                            'referencedSchema' => 'database2',
                            'columns' => ['id_user'],
                            'referencedColumns' => ['id'],
                            'onUpdate' => 'CASCADE',
                            'onDelete' => 'SET NULL'
                        ]
                    )
                ],

expect:

CONSTRAINT `fk_id_user` FOREIGN KEY (`id_user`) REFERENCES `database2`.`users`(`id`) ON DELETE SET NULL ON UPDATE 

happens:

CONSTRAINT `fk_id_user` FOREIGN KEY (`id_user`) REFERENCES `users`(`id`) ON DELETE SET NULL ON UPDATE 

Phalcon version: all

@ruudboon ruudboon added this to To do in 4.0 Release via automation Sep 13, 2019
@ruudboon ruudboon self-assigned this Sep 17, 2019
@ruudboon ruudboon moved this from To do to In progress in 4.0 Release Sep 17, 2019
@ruudboon ruudboon referenced this issue Sep 17, 2019
4 of 5 tasks complete
@ruudboon

This comment has been minimized.

Copy link
Member

@ruudboon ruudboon commented Sep 17, 2019

Resolved in 4.0.x branch.

@ruudboon ruudboon closed this Sep 17, 2019
4.0 Release automation moved this from In progress to Done Sep 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
4.0 Release
  
Done
2 participants
You can’t perform that action at this time.