- changed milestone to 0.6.1
cannot copy ForeignKeyConstraint(schema=None) as _get_colspec interprets None as a default
Issue #1673
resolved
This bit me when trying to adapt some SQL Server collections which have a schema to a SQLite database that does not. Here is a workaround which I came up with to allow me to copy a collection of tables.
pjjH
We can't use None as the sentinal value as there are times when we
really do want to zap out the schema part. So use a value that is
unlikely to ever be a valid schema name.
def hacked_get_colspec(element, schema='BOGUS_DEFAULT'): if not schema == 'BOGUS_DEFAULT': if schema is not None: return schema + "." + element.column.table.name + "." + element.column.key else: return element.column.table.name + "." + element.column.key
Comments (5)
-
repo owner -
repo owner test would be in test/engine/test_metadata.py
-
Account Deleted - attached 1673.diff
Original patch plus a test
-
Fixed in e759031b16520a1389cd705c7a6c15cc894b226d. The attached patch is reversed.
-
repo owner - removed milestone
Removing milestone: 0.6.0 (automated comment)
- Log in to comment
this patch should work. needs unit tests in test/engine/test_metadata.