LEFT | RIGHT |
1 # This file is part of trytond_backend_gis. The COPYRIGHT file at the top | 1 # This file is part of trytond_gis. The COPYRIGHT file at the top level of |
2 # level of this repository contains the full copyright notices and license | 2 # this repository contains the full copyright notices and license terms. |
3 # terms. | |
4 import logging | 3 import logging |
5 | 4 |
6 from trytond.config import config | 5 from trytond.config import config |
7 from trytond.transaction import Transaction | 6 from trytond.transaction import Transaction |
8 from trytond.backend.postgresql.table import TableHandler as PGTableHandler | 7 from trytond.backend.postgresql.table import TableHandler as PGTableHandler |
9 | 8 |
10 from trytond_gis.const import GIS_SQL_TYPE_RE, WGS_84 | 9 from trytond_gis.const import GIS_SQL_TYPE_RE, WGS_84 |
11 | 10 |
12 __all__ = ['TableHandler'] | 11 __all__ = ['TableHandler'] |
13 logger = logging.getLogger(__name__) | 12 logger = logging.getLogger(__name__) |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 logger.warning( | 63 logger.warning( |
65 'Unable to migrate column %s on table %s ' | 64 'Unable to migrate column %s on table %s ' |
66 'from dimension %s to %s.', | 65 'from dimension %s to %s.', |
67 column_name, self.table_name, | 66 column_name, self.table_name, |
68 prev_dimension, dimension) | 67 prev_dimension, dimension) |
69 return | 68 return |
70 | 69 |
71 cursor.execute('SELECT AddGeometryColumn(%s, %s, %s, %s, %s)', | 70 cursor.execute('SELECT AddGeometryColumn(%s, %s, %s, %s, %s)', |
72 (self.table_name, column_name, srid, type_, dimension)) | 71 (self.table_name, column_name, srid, type_, dimension)) |
73 self._update_definitions(columns=True) | 72 self._update_definitions(columns=True) |
LEFT | RIGHT |