Skip to content

persistent-postgresql upsertWhere breaks on MigrationOnly columns #1330

@parsonsmatt

Description

@parsonsmatt

Given a database model like:

User
    name Text
    UniqueUserName name

    createdAt UTCTime MigrationOnly default='now()'
    updatedAt UTCTime MigrationOnly default='now()'

the SQL generated in this function will create something like:

INSERT INTO "user" (name, created_at, updated_at) VALUES (?)

This will fail with an error:

INSERT has more target columns than expressions

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