Setting schema key is not supported

Created on 11 October 2024, about 1 month ago

Problem/Motivation

Schema handling is incomplete right now and installation fails.

Steps to reproduce

$databases['default']['default']['schema'] = "drupal";

Proposed resolution

- Properly support setting custom schema (instead of dbo) in settings.php

And yes, the workaround to create a user with a different default schema is also valid.

Core tests should already cover these cases as I fixed a ton of schema related bugs for oracle driver once.

Remaining tasks

- Apply patch

🐛 Bug report
Status

Active

Version

4.4

Component

Schema handling

Created by

🇩🇪Germany Fabianx

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @Fabianx
  • 🇩🇪Germany Fabianx

    Attaching patch for now.

  • 🇩🇪Germany Fabianx

    Now without debug code.

    What this does is:

    - Copy function __construct & setPrefix from pgsql driver
    - Fix schema functions, where the prefixInfo schema is not used

  • 🇨🇭Switzerland stefanos.petrakis@gmail.com Biel, Switzerland

    Good stuff. So far in my/our testing this works and delivers the expected system behavior.

    One thing (not a full review) I noticed so far in the actual codes:

        if (isset($connection_options['schema']) && ($connection_options['schema'] !== 'public')) {
    

    should be

        if (isset($connection_options['schema']) && ($connection_options['schema'] !== 'dbo')) {
    
Production build 0.71.5 2024