changeset 85f8dc84ef73 in trytond:default
details: https://hg.tryton.org/trytond?cmd=changeset&node=85f8dc84ef73
description:
Support to alter more numeric types
issue10897
review381261002
diffstat:
trytond/backend/postgresql/table.py | 5 +++++
trytond/backend/sqlite/table.py | 2 ++
2 files changed, 7 insertions(+), 0 deletions(-)
diffs (28 lines):
diff -r 6b2b2ba39ff7 -r 85f8dc84ef73 trytond/backend/postgresql/table.py
--- a/trytond/backend/postgresql/table.py Mon Nov 08 19:31:34 2021 +0100
+++ b/trytond/backend/postgresql/table.py Mon Nov 08 19:33:56 2021 +0100
@@ -291,7 +291,12 @@
('varchar', 'text'),
('text', 'varchar'),
('date', 'timestamp'),
+ ('int4', 'int8'),
('int4', 'float8'),
+ ('int4', 'numeric'),
+ ('int8', 'float8'),
+ ('int8', 'numeric'),
+ ('float8', 'numeric'),
]:
self.alter_type(column_name, base_type)
else:
diff -r 6b2b2ba39ff7 -r 85f8dc84ef73 trytond/backend/sqlite/table.py
--- a/trytond/backend/sqlite/table.py Mon Nov 08 19:31:34 2021 +0100
+++ b/trytond/backend/sqlite/table.py Mon Nov 08 19:33:56 2021 +0100
@@ -224,6 +224,8 @@
('TEXT', 'VARCHAR'),
('DATE', 'TIMESTAMP'),
('INTEGER', 'FLOAT'),
+ ('INTEGER', 'NUMERIC'),
+ ('FLOAT', 'NUMERIC'),
]:
self.alter_type(column_name, base_type)
else: