Skip to content

Mixed-case column names causing trouble on postgresql #64

@shmax

Description

@shmax

This is partly my fault, as I accidentally broke the functionality of DatabaseTestCase during one of my recent cleanup blitzkriegs.

To fix the intended test behavior, go into DatabaseTestCase and make this change:

$connection_name ??= $config->get_default_connection();
$config->set_default_connection($connection_name); // <--add this line

and then in RelationTest.php, make this change:

    public function setUp(string $connection_name = null): void
    {
        parent::setUp("pgsql");
    }

Then run the tests on that class.

The result is that any tests involving mixedCaseField break, because once a column name is double-quoted in PostgresQl, you have to continue double-quoting it forever in your sql statements.

I'm going to assign this to @ipundit to figure out, but if I don't hear from him in a week or so I'm going to revert the mixed-case changes from a few weeks ago.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions