It is possible to set the default schema used by phinx, in php, to create the default_migration_table?

671 Views Asked by At

I'm using phinx in my project and i'm trying to change the schema of default_migration_table, something like this:

environments:
    default_migration_table: mySchema.phinxlog #default schema is public
    default_database: development
...

But it fails:

[PDOException]                                                                             
  SQLSTATE[42P01]: Undefined table: 7 ERROR:  relation "mySchema.phinxlog" does not exist  
  LINE 1: SELECT * FROM mySchema.phinxlog ORDER BY version ASC                             
                        ^                                                                    

If i create the phinxlog table in mySchema it works fine, but it would be desirable that the phinx auto create the table in my schema.
Is there some setting to make it do this?

1

There are 1 best solutions below

1
On

Remove "mySchema." from mysSchema.phinxlog - it should just be phinxlog (or whatever you want to call it).