Open IzzyBeraja opened 1 year ago
Since I'd like the name for flags and flows to be unique across both tables, I need to create an intermediary table to store them and write a uniqueness constraint. That will then ensure that these names are unique.
I would like for clients to be able to query flags and flows via their name. The issue is that if there are name collisions, then I'd need to find a way to avoid them like adding flow
So to accomplish this, I need to find a way to ensure that the names are unique across both tables. There isn't a constraint that works like this, but I can create a table that stores those names given the relevant flag or flow id. On that table, I can then establish a uniqueness constraint by name. This also works if in the future I add things like NUX values or other things that I'd like the client to be able to query by name.
All that being said, I need to add this table before I can confidently support this feature.
Currently I use UUIDs for all of my ids, but this will make the url difficult to read. Instead, I should use the name of the switch since it is unique for each of the switches owned by the currently logged in user.