Skip to content

Column default value as function #150

Closed
@CocaColaBear

Description

@CocaColaBear

I have column Id:

@PrimaryColumn({
    name: "id",
    type: "bigint",
    default: new_id() // new_id() is function in DB (postgresql)
  })
  Id: number;

In database i have function: new_id() for generate ids. How i can implement this query?
id bigint NOT NULL DEFAULT new_id()

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions