I have a postgre table with "id" as SERIAL(auto-increment column), "name" and "instruction" columns.
I'm trying to insert into it as:
(ql/conj! recipe-table {:id nil :name "a" :instructions "b"})
*Evaluation aborted
(ql/conj! recipe-table {:id :default :name "a" :instructions "b"})
*Evaluation aborted
(ql/conj! recipe-table {:name "a" :instructions "b"})
*Evaluation aborted
But:
(ql/conj! recipe-table {:id 1 :name "a" :instructions "b"})
works, it just inserts the 1 into id, but it doesn't do the auto-increment part.
So I have access to the table, I have rights to write into it as proven by the last conj!, I just can't write it with a default value.
I see that you have opened a ticket on Github and I'll follow up there. I will however let you know, that the correct way to insert is simply by omitting the keys which have default values, ie:
(ql/conj! recipe-table {:name "a" :instructions "b"})
If you would be so kind as to post the SQL code which generates the exact table you're working with, I'll be happy to try and reproduce the issue and correct any mistakes I might uncover. This is a tested scenario so we're either looking at a regression which has slipped past our unit tests or an issue with your database.