I did my best to follow the README on this one, but I'm still missing something. Running on master
From my structure.sql:
CREATE TABLE public.items (
id bigint NOT NULL,
jmdict_id bigint
-- etc…
);
ALTER TABLE ONLY public.items
ADD CONSTRAINT items_constraint_on_jmdict_id UNIQUE (jmdict_id);
When I call Upsert.batch:
Upsert.batch(Item.connection.raw_connection, :items) do |upsert|
upsert.row({
jmdict_id: some_id,
}, {
# etc…
})
end
And then I run rake db:structure:dump, I'll get:
CREATE FUNCTION public.upsert3_0_0_items_sel_jmdict_id_set_created_at_a_jmdi2123077596
-- etc…
I did my best to follow the README on this one, but I'm still missing something. Running on master
From my structure.sql:
When I call
Upsert.batch:And then I run
rake db:structure:dump, I'll get: