Skip to content

Commit

Permalink
while implementing unmerging of merged authors as part of #49, I had …
Browse files Browse the repository at this point in the history
…the following test error:

CDbException: Column name must be either a string or an array.

Which indicates that a database table is missing a primary key. In this case, it was author_rel that didn't have a primary key index set up in postgresql.
  • Loading branch information
Rija Menage committed Apr 1, 2018
1 parent 00ea7d3 commit b9d62ae
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
8 changes: 8 additions & 0 deletions sql/gigadb_tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3336,6 +3336,14 @@ ALTER TABLE ONLY author
ADD CONSTRAINT author_pkey PRIMARY KEY (id);


--
-- TOC entry 2496 (class 2606 OID 18532)
-- Name: author_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: gigadb
--

ALTER TABLE ONLY author_rel
ADD CONSTRAINT author_rel_pkey PRIMARY KEY (id);

--
-- TOC entry 2501 (class 2606 OID 18534)
-- Name: dataset_attributes_pkey; Type: CONSTRAINT; Schema: public; Owner: gigadb
Expand Down
7 changes: 7 additions & 0 deletions sql/gigadb_testdata.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3007,6 +3007,13 @@ ALTER TABLE ONLY attribute
ALTER TABLE ONLY author
ADD CONSTRAINT author_pkey PRIMARY KEY (id);

--
-- TOC entry 2496 (class 2606 OID 18532)
-- Name: author_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: gigadb
--

ALTER TABLE ONLY author_rel
ADD CONSTRAINT author_rel_pkey PRIMARY KEY (id);

--
-- Name: dataset_attributes_pkey; Type: CONSTRAINT; Schema: public; Owner: gigadb; Tablespace:
Expand Down
7 changes: 7 additions & 0 deletions sql/gigadb_testdata_penguin.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2904,6 +2904,13 @@ ALTER TABLE ONLY attribute
ALTER TABLE ONLY author
ADD CONSTRAINT author_pkey PRIMARY KEY (id);

--
-- TOC entry 2496 (class 2606 OID 18532)
-- Name: author_rel_pkey; Type: CONSTRAINT; Schema: public; Owner: gigadb
--

ALTER TABLE ONLY author_rel
ADD CONSTRAINT author_rel_pkey PRIMARY KEY (id);

--
-- Name: dataset_attributes_pkey; Type: CONSTRAINT; Schema: public; Owner: gigadb; Tablespace:
Expand Down

0 comments on commit b9d62ae

Please sign in to comment.