Skip to content

Make sure foreign key columns are non-null where appropriate #25

Description

@nic-hartley

Description

Currently, some tables allow for null foreign keys (e.g. exhibit in supports). This could cause issues down the line, especially as more people use it and race conditions emerge.

To Reproduce

This is a preemptive bug report, so there are no current steps to reproduce. Even though no actual bug has been discovered, this should still be fixed, to ensure that things don't behave strangely once we deploy.

To fix

This is a simple fix -- find all mentions of REFERENCES, see if a nullable reference makes sense, and if not, replace with NOT NULL REFERENCES. For example, a comment (in #8) might not have a parent; an exhibit should always have a creator.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdiscussion wantedWe need to talk about this

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions