Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
API/GetColumns: fix foreign keys being considered pkeys (#2213)
Foreign keys that were unique columns and not pkeys had their column exclusion disabled in the UI as the current query to fetch column data was counting them as primary keys. This PR fixes this ### QA ```sql -- Create a projects table CREATE TABLE projects ( id SERIAL PRIMARY KEY, application_id INT ); -- Create the applications table CREATE TABLE applications ( id INTEGER UNIQUE ); -- Create foreign key relationship ALTER TABLE projects ADD CONSTRAINT fk_application FOREIGN KEY (application_id) REFERENCES applications (id); ``` Before checking out to this PR, id in the applications table will be disabled in UI, post checkout - will be non-disabled
- Loading branch information