simonw / datasette-edit-schema

Datasette plugin for modifying table schemas
Apache License 2.0
16 stars 0 forks source link

Support setting a primary key as a foreign key reference, for m2m tables #52

Closed simonw closed 7 months ago

simonw commented 7 months ago

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.

Originally posted by @simonw in https://github.com/simonw/datasette-edit-schema/issues/51#issuecomment-1935099677

simonw commented 7 months ago

This currently isn't possible because of this code:

https://github.com/simonw/datasette-edit-schema/blob/92cff8201f3389b54c26b74aef61953856f04fc8/datasette_edit_schema/__init__.py#L436-L449