phalcon / migrations

Generate or migrate database changes via migrations.
https://docs.phalcon.io/latest/en/db-migrations
BSD 3-Clause "New" or "Revised" License
27 stars 23 forks source link

[NFR] Add config option - ignore reference schema #68

Closed Jeckerson closed 4 years ago

Jeckerson commented 4 years ago

During migration generation with foreign keys, it generated with schema name (referencedSchema). The problem is that the name can be different from environment to environment. And migration can not be ran if name is different.

'references' => [
    new Reference(
        'fk_accessToken_client_1',
        [
            'referencedTable' => 'client',
            'referencedSchema' => 'public',
            'columns' => ['clientId'],
            'referencedColumns' => ['id'],
            'onUpdate' => 'NO ACTION',
            'onDelete' => 'NO ACTION',
        ]
    ),
],