Please review this at http://codereview.appspot.com/194048/show
Affected files:
M tax.py
Index: tax.py
===================================================================
--- a/tax.py
+++ b/tax.py
@@ -18,11 +18,12 @@
name = fields.Char('Name', size=None, required=True, translate=True)
code = fields.Char('Code', size=None, required=True)
- def __init__(self):
- super(Group, self).__init__()
- self._sql_constraints += [
- ('code_uniq', 'UNIQUE(code)', 'The code must be unique!'),
- ]
+ def init(self, cursor, module_name):
+ super(Group, self).init(cursor, module_name)
+ table = TableHandler(cursor, self, module_name)
+
+ # Migration from 1.4 drop code_uniq constraint
+ table.drop_constraint('code_uniq')
Group()
--
Cédric Krier
B2CK SPRL
Rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
Email: [email protected]
Jabber: [email protected]
Website: http://www.b2ck.com/
twitter: http://twitter.com/cedrickrier
identi.ca: http://identi.ca/cedrickrier
pgpBjwFdlRael.pgp
Description: PGP signature
