Skip to content

feat(schema): allow custom constraint names #7

@graduenz

Description

@graduenz

Context

Right now, we have a hardcoded constraint format for primary keys:

sb.QuoteIdentifier("PK_" + pTable.Name())

That means, for a said users table, it will always be PK_users, which is fine, but users can't change this pattern if they want, and they might want to go with other formats:

  • users_PK (suffix instead of prefix)
  • pk_users (lowercase)
  • any other format

Requirements

Ideally, we should allow doing both:

  • Set up a custom format for constraint types (for primary keys, for foreign keys, etc.)
  • or, define exact names for constraints (bypassing the format)

Important

Don't work on this issue before this other issue is done, which will introduce more constraint types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions