Replies: 1 comment
-
Thank you for identifying this @obulat! Unfortunately, I think that the third option you suggest could lead us to issues we've experienced previously where differences between the API and catalog databases are only surfaced several hours into a data refresh when data is copied or indices are applied for example. I think our best option would be to set these columns to not nullable everywhere it makes sense to. We can test how long these operations would occur on a copy of the catalog, similar to how we've done some other performance testing in the past. Then we can use that to judge how best to apply the migration, IMO. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
While working on #2205, I've compiled a list of media properties that are set
nullable
in the catalog database, while in reality we do not saveNULL
values in them. Moreover, we either do not want to ever haveNULL
in them, or actively enforce null checks in the code to prevent saving items that haveNULL
values.Here's the list of these columns, from a comment in the linked PR:
Setting the columns as
non-nullable
in the catalog will probably be an expensive operation. However, not setting the columns nullable causes some problems down the line. One such problems is the API documentation, where many of these properties are shown to return "string or null", while in reality they only return "string". We could manually set that, for example,source
is a non-nullable property. But it would be much safer if the database column was actually non-nullable.What is the best course of action around nullability?
Beta Was this translation helpful? Give feedback.
All reactions