Change constraint on stock_production_lot

- used name, ref
- improve check in the wizard
- add migration script
- add sequence

bzr revid: ced-43b6788fd2f2525e153d7b5bdfaee28b8889e230
This commit is contained in:
ced 2007-09-12 13:21:07 +00:00
parent 0c568d1f74
commit b7e0c8b78d
1 changed files with 10 additions and 0 deletions

View File

@ -183,4 +183,14 @@ if cr.fetchall():
cr.execute('ALTER TABLE product_uom SET factor NOT NULL')
cr.execute('ALTER TABLE product_uom DROP COLUMN temp_column')
# ------------------------------------------------- #
# Drop name_uniq constraint on stock_production_lot #
# ------------------------------------------------- #
cr.execute('SELECT conname FROM pg_constraint where conname = \'stock_production_lot_name_uniq\'')
if cr.fetchall():
cr.execute('ALTER TABLE stock_production_lot DROP CONSTRAINT \'stock_production_lot_name_uniq\'')
cr.commit()
cr.close