-
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
500 error if a table has only primary keys #51
Comments
Relevant code: datasette-edit-schema/datasette_edit_schema/utils.py Lines 54 to 76 in d6a7099
Called from here: datasette-edit-schema/datasette_edit_schema/__init__.py Lines 477 to 483 in d6a7099
|
Created a manual test DB like this: echo '{"one": 1, "two": 2}' | sqlite-utils insert two_pks.db two_pks --pk one --pk two - And this so I can test foreign key creation: echo '{"one": 1, "two": 2}' | sqlite-utils insert two_pks.db other --pk one - |
Fixed this problem but found you cannot set a primary key as a foreign key reference, which prevents you from using this plugin to create a m2m table with foreign key references. I'll fix that in a separate issue. |
I have a m2m table that has a primary key across both columns.
When I tried to edit the schema I got a 500 error. Sentry says:
The text was updated successfully, but these errors were encountered: