Note: this might apply to other databases, I only tested it with postgres
Installing drupal using an alternate schema on a database which does not contain the default "public" schema results in the following error after giving it the database information:
Failed to CREATE a test table on your PostgreSQL database server with the command CREATE TABLE drupal_install_test (id int NULL). PostgreSQL reports the following message: SQLSTATE[3F000]: Invalid schema name: 7 ERROR: no schema has been selected to create in.
Restoring the default public schema allows the install to run without this error.
Recommended practice when using schemas is to remove the default public schema, so this test really should run against the schema provided if the user gives one in the database advanced options rather than counting on the existence of the public one.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 882934-schema-improvements.patch | 1.51 KB | josh waihi |
Comments
Comment #1
damien tournoud commentedYes, the drupal_install_test table is created directly, skipping all the rest of the database handler (including management of schemas). We should fix that.
Comment #2
josh waihi commentedHave altered drupal_install_test to use db_create_table. All seems fine. Haven't tested if is works without a public schema but I assume it will. NOTE: if you use a non-standard schema, you should specify it as a prefix like "myschema." ensuring the period at the end.
Comment #3
josh waihi commented