Mysql backend does not have an INTERVAL type
While initializing the database with MySQL, I found one bug in table creation while creating ir_cache table. The id has to be set to primary key otherwise the script will not proceed.
After resolving that, the scrip kept populating the database with tables until i received the error below. After the process reached ir.module.activate_upgrade, one of the either ir.cache, ir.date, or ir.trigger has a syntax error in the SQL. I couldn't find it. Please help.
Thanks
==============================================================================================
3794 140060523427584 [2017-10-11 12:38:55,019] INFO trytond.modules ir:register ir.module.activate_upgrade.done
3794 140060523427584 [2017-10-11 12:38:55,023] INFO trytond.modules ir:register ir.cache
3794 140060523427584 [2017-10-11 12:38:55,030] INFO trytond.modules ir:register ir.date
3794 140060523427584 [2017-10-11 12:38:55,034] INFO trytond.modules ir:register ir.trigger
Traceback (most recent call last):
File "/home/erp/ENV/bin/trytond-admin", line 21, in <module>
admin.run(options)
File "/home/erp/ENV/lib/python2.7/site-packages/trytond/admin.py", line 53, in run
pool.init(update=options.update, lang=list(lang))
File "/home/erp/ENV/lib/python2.7/site-packages/trytond/pool.py", line 155, in init
lang=lang)
File "/home/erp/ENV/lib/python2.7/site-packages/trytond/modules/__init__.py", line 451, in load_modules
_load_modules()
File "/home/erp/ENV/lib/python2.7/site-packages/trytond/modules/__init__.py", line 421, in _load_modules
load_module_graph(graph, pool, update, lang)
File "/home/erp/ENV/lib/python2.7/site-packages/trytond/modules/__init__.py", line 244, in load_module_graph
cls.__register__(module)
File "/home/erp/ENV/lib/python2.7/site-packages/trytond/ir/trigger.py", line 81, in __register__
super(Trigger, cls).__register__(module_name)
File "/home/erp/ENV/lib/python2.7/site-packages/trytond/model/modelsql.py", line 161, in __register__
table.add_column(field_name, field._sql_type, default=default)
File "/home/erp/ENV/lib/python2.7/site-packages/trytond/backend/mysql/table.py", line 236, in add_column
(self.table_name, column_name, column_type))
File "/home/erp/ENV/lib/python2.7/site-packages/MySQLdb/cursors.py", line 250, in execute
self.errorhandler(self, exc, value)
File "/home/erp/ENV/lib/python2.7/site-packages/MySQLdb/connections.py", line 50, in defaulterrorhandler
raise errorvalue
_mysql_exceptions.ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTERVAL' at line 1")
Files
Download | Creator | Timestamp | Type |
---|---|---|---|
unnamed | @a3arar | 2017-10-11 14:39:54.184000 UTC | text/plain |
unnamed | @a3arar | 2017-10-11 16:51:50.348000 UTC | text/plain |