- marked as task
- changed component to mysql
- marked as minor
- changed milestone to 1.2.x
- changed title to add "PARTITION BY" and "STATS SAMPLE PAGES" to mysql reflected options
add "PARTITION BY" and "STATS SAMPLE PAGES" to mysql reflected options
Issue #4038
new
Some keyword kwargs like 'mysql_partition_by' and 'mysql_stats_sample_pages' are not reflected and stored in kwargs.
import sqlalchemy as sa
m = sa.MetaData()
t = sa.Table('ti', m,
sa.Column('id', sa.Integer),
sa.Column('amount', sa.DECIMAL(7, 2)),
sa.Column('tr_date', sa.Date),
mysql_engine='InnoDB',
mysql_partition_by='HASH( MONTH(tr_date) )',
mysql_partitions='6'
)
engine = ...
t.create(engine)
m2 = sa.Metadata(bind=engine, reflect=True)
assert 'mysql_partition_by' in m2.tables['ti'].kwargs # AssertionError
Comments (2)
-
repo owner -
repo owner -
assigned issue to
-
assigned issue to
- Log in to comment
options would be added to dialects/mysql/reflection.py within the lists inside of "_prep_regexes()", new tests in test/dialect/mysql/test_reflection.py test_reflection_with_table_options() or new methods if special fixtures are needed.