From dfdc9fde76a03c32bdca80b2b30cf6d30086629f Mon Sep 17 00:00:00 2001 From: jordi fita mas Date: Sun, 12 Mar 2023 15:57:36 +0100 Subject: [PATCH] Restart tag sequence in edit_invoice test Sometimes, depending on the order the tests are run, the edit_function would try to insert a tag with a duplicate primary key, because the sequence starts with 1 on an empty database. So, make sure the next sequence value is after the primary keys i have manually set. --- test/edit_invoice.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/edit_invoice.sql b/test/edit_invoice.sql index f3efa5c..4f35157 100644 --- a/test/edit_invoice.sql +++ b/test/edit_invoice.sql @@ -67,6 +67,8 @@ insert into tag (tag_id, company_id, name) values (10, 1, 'tag1') , (11, 1, 'tag2') ; +-- edit_invoice uses the sequence and sometimes it would confict +alter sequence tag_tag_id_seq restart with 15; insert into contact (contact_id, company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, country_code) values (12, 1, 'Contact 2.1', 'XX555', '', '777-777-777', 'c@c', '', '', '', '', '', 'ES')