[IMP] orm._auto_init: avoid copying VARCHAR column when increasing size, alter in...
authorOlivier Dony <odo@openerp.com>
Mon, 17 Feb 2014 16:42:39 +0000 (17:42 +0100)
committerOlivier Dony <odo@openerp.com>
Mon, 17 Feb 2014 16:42:39 +0000 (17:42 +0100)
commita5b51c2be7f94b7d818fc4b52f95c5573fcf6507
treeffdb1d8d543f61ad8909cb78f4e464003fb8a6e9
parent122c66725c1c002e570a7ee4580d8e4fe8ffec7a
[IMP] orm._auto_init: avoid copying VARCHAR column when increasing size, alter in-place instead + better temporary names

Historically, we used a copy+rename technique during
table upgrades to alter varchar columns sizes.
This was only necessary to permit downsizing
columns, which we do not want to do anymore (it is
too dangerous, so has to be done explicitly when
required).

Switching to a pure ALTER COLUMN TYPE is simpler
and also much faster for large tables.

Also fixed the inappropriate name used for
temporary columns during column type casting
(which *does* require the copy+rename technique).

bzr revid: odo@openerp.com-20140217164239-0iou3dsiea3foabb
openerp/osv/orm.py