From e5f739ad5d0f1feda2ff80b555d4904a8c570cb5 Mon Sep 17 00:00:00 2001 From: ced <> Date: Tue, 13 Mar 2007 12:51:56 +0000 Subject: [PATCH] MIGRATION: fix migration of account_uos to product_uos bzr revid: ced-f20de95479823b3df5d1ebc0a10ecb8995efb2d7 --- doc/migrate/3.4.0-4.0.0/post.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/migrate/3.4.0-4.0.0/post.py b/doc/migrate/3.4.0-4.0.0/post.py index 3a84d3de4ab..9630393508d 100644 --- a/doc/migrate/3.4.0-4.0.0/post.py +++ b/doc/migrate/3.4.0-4.0.0/post.py @@ -97,5 +97,14 @@ cr.commit() cr.execute("update account_invoice_line set discount=0.0 where discount is null;") cr.commit() + +# -------------------------------------------------------------------------- # +# update constraint account_invoice_line_uos_id_fkey on account_invoice_line # +# -------------------------------------------------------------------------- # + +cr.execute("ALTER TABLE account_invoice_line DROP CONSTRAINT account_invoice_line_uos_id_fkey") +cr.execute("ALTER TABLE account_invoice_line ADD FOREIGN KEY (uos_id) REFERENCES product_uom(id) ON DELETE SET NULL") +cr.commit() + cr.close()