I am getting error while renaming column name or column datatype for tempoal table in TFS

819 views Asked by At

I am using Visual Studio enterprise 2017 (Version:15.71.1) and SSDT(Version:15.1.61804.210) and also using TFS to keep my code. In my database project all tables are temporal table.

Now when i am changing column type or column name in TFS , i am not able to build my project so not able to generate publish script.

I am getting error : Error SQL71609: System-versioned current and history tables do not have matching schemas. Mismatched column:"XXXXX"

Do we have any solution for this ?

2

There are 2 answers

0
Anunaya Mishra On BEST ANSWER

The solution which worked for me , is to make these changes in SQL Server Object Explorer (You can see it by right clicking on DB project and choosing the “View in Object Explorer” option). You need to do the modification here and just save it and it will work.

0
Andy Li-MSFT On

Generally you can try explicitly defining the history table, then manually keep the schema of the current and history table in sync.

Reference this thread: Avoid schema mismatch in System-Versioned tables


UPDATE:

As you mentioned the solution which worked for you is to make these changes in SQL Server Object Explorer (You can see it by right clicking on DB project and choosing the “View in Object Explorer” option). You need to do the modification here and just save it and it will work.