microsoft / azuredatastudio

Azure Data Studio is a data management and development tool with connectivity to popular cloud and on-premises databases. Azure Data Studio supports Windows, macOS, and Linux, with immediate capability to connect to Azure SQL and SQL Server. Browse the extension library for more database support options including MySQL, PostgreSQL, and MongoDB.
https://learn.microsoft.com/sql/azure-data-studio
MIT License
7.51k stars 883 forks source link

Dacpac created from SQL Project with DML Triggers has different annotations than expected #10777

Open kisantia opened 4 years ago

kisantia commented 4 years ago

When importing a sql project from AdventureWorks in ADS, then comparing it to the database, it is expected that there would be no differences found. The differences being found in #10612 are due to the IgnoreWhitespace option being set to false in ADS instead of defaulting to true like in SSDT. The quick fix is set the default for IgnoreWhitepace to true, but there's still the additional problem that the dacpac created in ADS is different than the one created in SSDT if there are DML Triggers. The annotation values of offset, header contents, etc have different values, which are the whitespace differences being found.

Steps to Reproduce:

  1. in ADS, right click on an AdventureWorks database and "Import New Database Project"
  2. Right click on the project and select "Schema Compare"
  3. Choose the AdventureWorks database as the target and compare
  4. In the schema compare options, uncheck IgnoreWhitespace
  5. Compare and see that there are differences when there shouldn't be
  6. Follow same steps in SSDT and create dacpac and compare the model.xml with the one created in ADS

Comparison in SSDT of ADS dacpac with database when IgnoreWhitespace=false: image

Comparing the model.xmls with the one from ADS on the left and the SSDT one on the right: image

udeeshagautam commented 4 years ago

@kisantia Is this something due to options or something on DacFx side - if latter, let me know if you want me to take a look (I will need bit more context from you :) )

kisantia commented 4 years ago

@udeeshagautam I think this is coming from DacFx? I thought that ADS was building the sqlproj the same as SSDT, but the dacpacs being built are slightly different. Do you know if there's anything different in how the dacpacs are getting built for ADS vs SSDT?

kisantia commented 1 year ago

closing as won't fix as there haven't been any other complaints about this

Frankkkkk commented 6 months ago

BTW, I have the same complaint :-)

kisantia commented 6 months ago

@ssreerama fyi, reopening this since a user is also running into this