Improve constraints on user_node table to enforce unique on (user_id, node_id)

XMLWordPrintable

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major
    • Component/s: DB
    • None

      The primary key of the user_node table is actually just node_id. That means the database would allow the same node ID to be assigned to multiple user IDs, which is obviously not desired.

      Also, currently it is impossible to define a foreign key constraint on the solaruser.user_node table's combination of (user_id, node_id), because that is not a unique constraint on the table. This would be helpful to do, because it would allow easy enforcement of (user,node) combinations.

       

      Add a unique constraint on (user_id, node_id) to solve these issues.

            Assignee:
            Matt Magoffin
            Reporter:
            Matt Magoffin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: