Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • W Waarp Gateway
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 48
    • Issues 48
    • List
    • Boards
    • Service Desk
    • Milestones
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Applications
  • Waarp Gateway
  • Waarp Gateway
  • Issues
  • #274
Closed
Open
Issue created Sep 06, 2021 by Paolo Pantellini@paolo.pantelliniMaintainer

Change how the migration engine handles UNIQUE constraints

Currently, when adding a UNIQUE constraint via the migration engine, the engine simply adds a constraint to the column. While it is the simplest way to do it in the engine, it is not the most practical. Instead of adding a unique constraint, the engine should instead add a unique index.

In effect, both are the same, but the index has the advantage that it is much more flexible to use in migration scripts. Adding/removing a UNIQUE constraint become only a matter of creating/dropping an index, while removing/adding a constraint might be more complicated (or downright impossible on SQLite).

All in all, using indexes should be much more practical to use than constraints, because it makes the migration scripts easier to write.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking