[Sqlalchemy-tickets] Issue #4219: autoload existing mysql table throws Unknown schema content (zzze
Brought to you by:
zzzeek
From: LiQuan <iss...@bi...> - 2018-03-20 07:19:59
|
New issue 4219: autoload existing mysql table throws Unknown schema content https://bitbucket.org/zzzeek/sqlalchemy/issues/4219/autoload-existing-mysql-table-throws LiQuan: My existing table created with following sql ``` CREATE TABLE `fx_orders_items` ( ..... FULLTEXT KEY `ix_fulltext_oi_g_name` (`oi_g_name`) /*!50100 WITH PARSER `ngram` */ ) ENGINE=InnoDB AUTO_INCREMENT=100018857 DEFAULT CHARSET=utf8 COMMENT='' ``` when I use autoload like this ``` Table("fx_orders_items", metadata, autoload=True) ``` it throws error ``` C:\Python27\lib\site-packages\sqlalchemy\dialects\mysql\reflection.py:57: SAWarning: Unknown schema content: u' FULLTEXT KEY `ix_fulltext_oi_g_name` (`oi_g_name`) /*!50100 WITH PARSER `ngram` */ ' util.warn("Unknown schema content: %r" % line) ``` I just debug it and found the line ``` FULLTEXT KEY `ix_fulltext_oi_g_name` (`oi_g_name`) /*!50100 WITH PARSER `ngram` */ ``` didn't go into any of this and return None ``` def _parse_constraints(self, line): """Parse a KEY or CONSTRAINT line. :param line: A line of SHOW CREATE TABLE output """ m = self._re_key.match(line) m = self._re_fk_constraint.match(line) m = self._re_ck_constraint.match(line) m = self._re_partition.match(line) # No match. return (None, line) ``` |