Home

Mapping tables not appearing.

When running my EF Core migration against a PostgreSQL 14 database, .NET automatically created a many-to-many link table. When I tell LinqPAD 8.0.11 to refresh that connection, the link tables don't appear. Everything else does. This is what Postgres says for the table creation DDL. Why would this not show up?

CREATE TABLE one_bom.kit_quality_software_component_version_link (
    qualities_id int4 NOT NULL,
    software_component_versions_id int4 NOT NULL,
    CONSTRAINT "PK_kit_quality_software_component_version_link" PRIMARY KEY (qualities_id, software_component_versions_id)
);
CREATE INDEX "IX_kit_quality_software_component_version_link_software_compon~" ON one_bom.kit_quality_software_component_version_link USING btree (software_component_versions_id);

ALTER TABLE one_bom.kit_quality_software_component_version_link ADD CONSTRAINT "FK_kit_quality_software_component_version_link_kit_quality_qua~" FOREIGN KEY (qualities_id) REFERENCES one_bom.kit_quality(id) ON DELETE CASCADE;
ALTER TABLE one_bom.kit_quality_software_component_version_link ADD CONSTRAINT "FK_kit_quality_software_component_version_link_software_compon~" FOREIGN KEY (software_component_versions_id) REFERENCES one_bom.software_component_version(id) ON DELETE CASCADE;
Sign In or Register to comment.