karenjexphd / classification_extraction_tests

Docker images and runtime commands for end-to-end cell classification and table extraction tests
0 stars 0 forks source link

Error creating FK constraint on label #10

Closed karenjexphd closed 11 months ago

karenjexphd commented 11 months ago

Create constraints on label psql:tableModelDDL/03_create_constraints.sql:30: ERROR: there is no unique constraint matching given keys for referenced table "category"

karenjexphd commented 11 months ago

Issue: attempting to create FK from label.category_name to category.category_name whereas PK on category is on (category_name, table_id).

Could add table_id to category, but it's implied via the label_cell_id.

Will just remove the CREATE FK statement. Category is not currently being used in any case, so model may change.

Commented lines 28-30 in 03_create_constraints.sql to test fix

karenjexphd commented 11 months ago

Fixed in commit https://github.com/karenjexphd/classification_extraction_tests/commit/e7cb1c88f74d16740ef4df3f70b3cbb99195f495