04 March 2016

Visual Studio Database Projects (basics / refactoring log file)

Visual Studio Database Projects 

Basics / refactoring log file


I am new to the Database projects in Visual Studio and still learning a lot of the basics.

I imported some tables from a database to my project, fiddled a little with the fields not really changing anything but saving the file... i also copied one table and renamed the fields in the file ...

When publishing i got
(50,1): SQL72014: .Net SqlClient Data Provider: Msg 50000, Level 16, State 127, Line 8 Rows were detected. The schema update is terminating because data loss might occur.
(43,0): SQL72045: Script execution error.  The executed script:
IF EXISTS (SELECT TOP 1 1
  FROM   [DSA].[Fact_Sellout_brick_totals_stg])
  RAISERROR (N'Rows were detected. The schema update is terminating because data loss might occur.', 16, 127)
    WITH NOWAIT;

The table schema Compare shows one field as changed, yet it is changed to the same value... if it was normal code it would not be marked as changed...
Looking for a Refactorlog i found .refactorlog in the root of the project and it contains the problem...



Removing the fiddling from the refactorlog solved my publishing issues.
I have yet to find the visual studio tool way to the refactorlog...

No comments: