phinx icon indicating copy to clipboard operation
phinx copied to clipboard

Add schema creation to migration API

Open Bilge opened this issue 5 years ago • 1 comments

Migrations can create databases and tables but not schemas. It is also not valid to create a schema implicitly using the create table API, e.g. $this->table('foo.bar')->create().

PDOException: SQLSTATE[3F000]: Invalid schema name: 7 ERROR: schema "foo" does not exist

Bilge avatar Aug 23 '20 10:08 Bilge

Similar to createDatabase, it should be as easy here as just adding a function in AbstractMigration.php called createSchema($schemaName) that then calls $this->adapter->createSchema($schemaName).

MasterOdin avatar Aug 23 '20 10:08 MasterOdin