You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this particular case, showing the database and then the resource as the foreign key label would make sense - both of those are strings and they are unique together, which makes them a valid label.
I poked around with Claude and came up with this query:
selectm.nameas table_name,
json_group_array(ii.name) as unique_column_names
from
sqlite_master as m,
pragma_index_list(m.name) AS il,
pragma_index_info(il.name) AS ii
wherem.type='table'andil.origin='u'group byil.name;
Which returns this for that schema:
This could be a useful alternative way to determine default foreign key labels.
The text was updated successfully, but these errors were encountered:
While hacking around with https://github.com/datasette/datasette-acl I noticed this table:
Those
resource_id
integers link to this table:In this particular case, showing the database and then the resource as the foreign key label would make sense - both of those are strings and they are unique together, which makes them a valid label.
I poked around with Claude and came up with this query:
Which returns this for that schema:
This could be a useful alternative way to determine default foreign key labels.
The text was updated successfully, but these errors were encountered: