Bug: System-versioned history tables in wrong schema
a.higgins
Posts: 90 Bronze 2
in SQL Compare
I've got a project that's comparing a pair of databases. One database has the relevant data in the 'dbo' schema; the other puts it into the 'X' schema.
I've used the Owner Mapping section of the Project Options dialog box to map Schema X to Schema Y.
Both database contain a table, SomeTable, with system versioning on. History is being stored in a temporal table named "SomeTable_TemporalHistory".
When I run SQL Compare, it correctly maps dbo.SomeTable over to X.SomeTable. However, it incorrectly maps dbo.SomeTable_TemporalHistory over to a new table, dbo.SomeTable_TemporalHistory.
If I try to run the script, it then tries to create the history table on the 'dbo' schema, rather than correctly interpreting it as the 'X' schema.
I believe this is a bug, and not a configuration error, since it's putting the main table in the right schema but the history table in the wrong schema (not respecting the 'Owner Mapping' choices I've made).
I've used the Owner Mapping section of the Project Options dialog box to map Schema X to Schema Y.
Both database contain a table, SomeTable, with system versioning on. History is being stored in a temporal table named "SomeTable_TemporalHistory".
When I run SQL Compare, it correctly maps dbo.SomeTable over to X.SomeTable. However, it incorrectly maps dbo.SomeTable_TemporalHistory over to a new table, dbo.SomeTable_TemporalHistory.
If I try to run the script, it then tries to create the history table on the 'dbo' schema, rather than correctly interpreting it as the 'X' schema.
I believe this is a bug, and not a configuration error, since it's putting the main table in the right schema but the history table in the wrong schema (not respecting the 'Owner Mapping' choices I've made).
Tagged:
Comments
Am I understanding you correctly in saying that you would regard creating both the base and history tables in a non-default schema to be a customization? I'm not clear on whether the problem is caused by the fact that the tables aren't in the 'dbo' schema, or by the fact that I used Owner Mapping to put the tables in a different target schema than the source.
I think you're probably right in that this case it's more likely to be a problem with mappings than a problem with customisation as such, but if we have the history table as its own thing in the code then we're more likely to be able to apply mapping to it properly.
Either way, I'll try and make sure we do something to improve this situation
Redgate Software