Skip to content

Allow generation for tables without a Primary Key (ie: Timescale's Hypertables) #1408

Open
@Serjlee

Description

@Serjlee

I know this was already labeled as a "won't do" in #75 (comment), but I recently stumbled upon a proper use case when dealing with Timescale's Hypertables: for those, primary keys degrade performance and have little use, as foreign keys pointing to hypertables are not allowed.

Even without PKs sqlboiler would still be very valuable to provide generated types, constants, where helpers and perform queries in a consistent way.

I found a okay-ish workaround by using a View defined as select * from my_table_without_pk, but this causes all columns of the generated type to be nullable, which is quite annoying,

Is it something you might plan to reconsider? I tried to implement it myself but so far I failed to produce anything useful

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions