SQL Server 2012, 2014, 2016 transactional replication
- Publication is created. (copy Foreign Keys is false, the default)
- Subscription is created.
- Snapshot and sync.
- Turn off synchronization.
- Upgrade the publication database.
- Upgrade the subscriber database for tables affected by modified views.
- Set the snapshot to only gather information for changes.
- Restart sync.
There is now an error at the subscriber because the two new columns exist and the snapshot is trying to create them but with foreign keys.
Typically it hasn't cared but now it seems to because of the FK creation it wants to do. If I manually delete the two new columns the sync will now create them again but with FKs.
The same operation happens for other new fields but we've never run into this issue before.
Looking to understand why FKs are being sent and if there is a workaround or setting.