Commit Graph

49 Commits

Author SHA1 Message Date
Kim Santiago
95a094438e Fix for schema compare dropping constraints (#2120)
* fix for scripts that are displayed in schema compare drop constraints bug

* update DacFx version

* add more comments
2023-06-26 14:01:28 -10:00
Sakshi Sharma
3e0135b907 Update STS changes to be backward compatible with scmpOpen (#2031)
* Update STS changes to be backward compatible with scmpOpen

* Update cleanup code

* Fix test.
2023-04-24 16:58:06 -07:00
Sakshi Sharma
098cf3be35 Update openScmp to read file structure (#1952)
* Update openScmp to read file structure (and dsp) information from the scmp file.

* Address comments
2023-04-04 11:05:36 -07:00
Chris LaFreniere
cccdbf0bef Address CA1829 (Avoiding Count LINQ method calls when equivalent + more efficient properties exist) (#1961)
* Address CA1829 (Avoid Count LINQ Method Calls)

* Remove other change

* CA1829 removal

* CA1829 (remove whitespace)
2023-03-23 21:06:49 -07:00
Sakshi Sharma
b44f0d561f Save file structure in scmp file (#1878)
* Save file structure in scmp files

* Update DacFx version and add test

* Address comments

* Fix test

* try to fix tests

---------

Co-authored-by: Kim Santiago <kisantia@microsoft.com>
2023-02-24 14:24:25 -08:00
Karl Burtram
f288bee294 Make nullable warnings a per file opt-in (#1842)
* Make nullable warnings a per file opt-in

* Remove unneeded compiler directives

* Remove compiler directive for User Data
2023-02-03 18:10:07 -08:00
Kim Santiago
acf3e92e83 Fix schema compare project test cleanup (#1746)
* cleanup .sqlproj in finally

* unique folder per test run

* fix path
2022-11-04 10:33:25 -07:00
Alan Ren
dea18a59e0 new dacfx version (#1745)
* new dacfx version

* fix failing schema compare tests

Co-authored-by: Kim Santiago <kisantia@microsoft.com>
2022-11-02 20:52:20 -07:00
Kim Santiago
85228c5da0 Remove testing cancel from VerifySchemaCompareServiceCalls (#1731) 2022-10-26 09:11:47 -07:00
Kim Santiago
6f198e9e5a fix schema comparing empty project showing more differences than expected (#1727) 2022-10-21 14:04:31 -07:00
Kim Santiago
c7c012dbe1 remove problematic assert in schema compare scmp test (#1718) 2022-10-06 08:37:23 -07:00
Sai Avishkar Sreerama
1342a8a085 Object Types are getting from DacFx ObjectTypes (#1574)
* Include Object Types are getting from DacFx

* All tests are passing now with excludObjectType casting

* Test fix with new ExccvludeObjectType change

* Added test case for the include objects types

* Updated  name to objectTypesDictionary and objectType getName from Display attribute

* code Review updates

* Removing Exclude word logic here as the options were updated on DacFx

* updating the null check

* DacFx vBump

* code updates according to review comments
2022-08-05 15:28:39 -05:00
Sai Avishkar Sreerama
5663ddba68 OptionsMapTable preparing from DacFx description,value,displayname at… (#1550)
* OptionsMapTable preparing from DacFx description,value,displayname attributes

* Review Comments addressed for options map table changes

* OptionsMapTable final changes

* Code review comments updated code changes

* Test fix: Adding missing change while splitting the PR

* DacFx vBump

* Reverted to displayName and code updates

* final:prop name changed, references updated, tests fixed, comments addressed

* Code review comments updated for name,exception etc

* updates method names

* property name changes to BooleanOptionsDictionary and comment updates

* Removed the unused properties, null cases handeled, hardcoded values are replaced
2022-07-07 16:56:16 -05:00
Sai Avishkar Sreerama
989137ddb7 DacFx default options test validation fixes (#1509) 2022-05-31 14:03:44 -05:00
Sai Avishkar Sreerama
62d3cdc99a Revert "Revert "Adding new Dac Deployment Options and getting descriptions fr…" (#1507)
* Adding missing Deploy options

* SQL DB Project database genScript/Publish working but tests

* Test cases fixed for the changes for DacFx and SC services

* Refactored the model name and tested the changes with ADS extensions.

* updated DeploymentOptionProperty model and corresponding updates.

* Adding DisplayNames to the deploymentOptionProperty to maintain names in STS for all extensions.

* MapTabe intialization in constructor

* Updated comment with more meaning

* Porperty strong type update with actual type

* Creating model with generic type getting using Activator.CreateInstance

* Rebase to main and resolved merge conflicts

* Xml comments added and code updated

* Deployment options update

* Deployoptions typo and comments updates a

* updated deployment options comments

* removed unnecessary using statement

* code refactor

* Revert "Revert "Adding new Dac Deployment Options and getting descriptions from DacFx API (#1357)" (#1493)"

This reverts commit 2b48331115.

* removing duplicated default empty string value
2022-05-23 16:19:15 -05:00
Udeesha Gautam
2b48331115 Revert "Adding new Dac Deployment Options and getting descriptions from DacFx API (#1357)" (#1493)
This reverts commit a3a66137b8.
2022-05-12 13:30:04 -07:00
Sai Avishkar Sreerama
a3a66137b8 Adding new Dac Deployment Options and getting descriptions from DacFx API (#1357)
* Adding missing Deploy options

* SQL DB Project database genScript/Publish working but tests

* Test cases fixed for the changes for DacFx and SC services

* Refactored the model name and tested the changes with ADS extensions.

* updated DeploymentOptionProperty model and corresponding updates.

* Adding DisplayNames to the deploymentOptionProperty to maintain names in STS for all extensions.

* MapTabe intialization in constructor

* Updated comment with more meaning

* Porperty strong type update with actual type

* Creating model with generic type getting using Activator.CreateInstance

* Rebase to main and resolved merge conflicts

* Xml comments added and code updated

* Deployment options update

* Deployoptions typo and comments updates a

* updated deployment options comments

* removed unnecessary using statement

* code refactor
2022-05-10 22:59:26 +05:30
Charles Gagnon
40c5d48c5e Fail build on unneeded usings (#1417) 2022-03-04 16:38:01 -08:00
Benjin Dubishar
a74b55c6a8 Applying Changes to SQL Database Projects and Using Projects in Comparison (#1296)
* passing initial testing

* update local project from database

* update local project

* update project from database

* update project from database

* update project from database

* update project from database

* update project from database

* update project from database

* update project from database

* update project from database

* update project from database

* update project from database

* Bump .net version

* PR feedback

* Adding temporary compat shim

* reverting some formatting changes; fixing strings

* PR feedback

Co-authored-by: Noureldine Yehia <t-nyehia@microsoft.com>
2021-11-12 12:51:35 -08:00
Benjin Dubishar
8234dcf215 Revert "Applying Changes to SQL Database Projects and Using Projects in Comparison (#1282)" (#1284)
This reverts commit 6acda6e1e6.

committedcda6e1e6ed5ff4fddb65b954951ff987fa01c06acda6e1e6ed5ff4fddb65b954951ff987fa01c0:
2021-11-05 17:25:09 -07:00
Benjin Dubishar
6acda6e1e6 Applying Changes to SQL Database Projects and Using Projects in Comparison (#1282)
* passing initial testing

* update local project from database

* update local project

* update project from database

* update project from database

* update project from database

* update project from database

* update project from database

* update project from database

* update project from database

* update project from database

* update project from database

* update project from database

* Bump .net version

* PR feedback

Co-authored-by: Noureldine Yehia <t-nyehia@microsoft.com>
2021-11-04 18:36:59 -07:00
Sai Avishkar Sreerama
37b2b26edf Filtering Schema Compare error from warnings (#1212)
* Filtering Schema Compare error from warnings

* SchemaCompare added comparison result error message validations to existing tests

* Extra semi-colon noticed and removed from the code

* Added new test case to validate warning message exclusions from SC result

* SC test asserions comment added

* Edge case scenario fixed and tests are 100% passed
2021-05-21 11:25:25 +05:30
Kim Santiago
e123c24210 fix failing schema compare options tests" (#1204) 2021-05-05 13:31:45 -07:00
Udeesha Gautam
86a4e3f514 Add build fix changes (#1143)
adding a missing namespace that was causing a build failure in test code
2020-12-31 12:23:01 -08:00
David Shiflet
839acf67cd Convert most tools service tests to nunit (#1037)
* Remove xunit dependency from testdriver

* swap expected/actual as needed

* Convert Test.Common to nunit

* port hosting unit tests to nunit

* port batchparser integration tests to nunit

* port testdriver.tests to nunit

* fix target to copy dependency

* port servicelayer unittests to nunit

* more unit test fixes

* port integration tests to nunit

* fix test method type

* try using latest windows build for PRs

* reduce test memory use
2020-08-05 13:43:14 -04:00
Kim Santiago
836687a41d update schema compare default option (#967) 2020-06-08 11:26:00 -07:00
Leila Lali
73fc70fbbc Adding service operations for external languages (#918)
* Added service operations for external languages
2020-02-21 08:52:58 -08:00
Karl Burtram
427f0c11e8 Bump SMO and SqlClient to pickup Microsoft.Data.SqlClient fixes (#894)
* Revert "Revert to SMO with older SQLClient driver (#889)"

This reverts commit b763abae47.

* Bump SMO and SqlClient
2019-11-22 17:17:21 -08:00
Karl Burtram
b763abae47 Revert to SMO with older SQLClient driver (#889)
* Revert "Update SMO (#875)"

This reverts commit 96593d66e3.

* Revert "Switch Tools Service to new SMO and Microsoft.Data.SqlClient driver (#865)"

This reverts commit 9d140b53f3.

* Bump SMO to 160.1910315.0-preview
2019-11-04 13:00:45 -08:00
Kim Santiago
b9faabb704 Fix schema compare exclude behaviour (#884)
* Send back dependencies causing the exclude to fail instead of blocking the call

* Separate AffectedDependences and BlockingDependencies into separate properties

* add named parameters

* separate out include/exclude success cases for clarity
2019-10-25 18:01:33 -07:00
Kim Santiago
e60fc1a16c Schema compare include/exclude changes (#881)
* send back success of include/exclude request

* update dacfx nuget package and use new api to get affected dependencies of include/exclude request

* addressing comments

* rename test

* Addressing comments
2019-10-24 17:11:30 -07:00
Charles Gagnon
6f17c15d2c Test fixes (#877)
* Test fixes

* Delete unneeded using
2019-10-16 10:43:12 -07:00
David Shiflet
9d140b53f3 Switch Tools Service to new SMO and Microsoft.Data.SqlClient driver (#865)
* switch to ambient props and targets files

* build against Microsoft.Data.SqlClient

* build tests

* fix test bug

* temporarily add SMO nuget to the repo

* update to released Microsoft.Data package
2019-09-17 17:51:19 -04:00
Udeesha Gautam
4fe02a6885 Update dacfx to latest preview (#845)
* updating dacfx with private nuget for testing

* Updating to real dacfx-preview version

* Removing additional refs added by nuget package manager (these were not there previously)
2019-08-08 20:55:06 -07:00
Udeesha Gautam
a6450eb180 Bug/schemacompare publish and script tasks to send back results (#830)
* Fix Schema compare Publish and Script generation task to return back error messages correctly.

* Elaborating test a bit more to cover tasks

* Validate one task at a time for better clarity

* send back only errors not whole messages since task view doesnt have a good way (other than hover text) to show long messages

* Fixing the negative test cases
2019-06-27 15:55:26 -07:00
Udeesha Gautam
347d233e95 Change to pass Schema compare Operation id from ADS (#828)
* Changing that SC Operation id be passed from ADS and some test addition

* Fixing typos
2019-06-19 09:49:50 -07:00
udeeshagautam
3e1f186891 Schema compare cancel operation (#826)
* First cut of schema compare cancel (private nuget)

* Update Dacfx nuget to a published version
2019-06-14 18:19:36 -07:00
udeeshagautam
432e054d55 Feature/schemacompare scmp save (#824)
* First cut of scmp Save related changes and some test refactoring

* Adding Exclude/Include objects in saving

* Add diff entry validation as part of test

* Adding PR comments - major change is change to nameparts in place of name hence preserving any "."/"[" in name and avoiding any string operations

* One more UT scenario addition for create excluded object
2019-06-13 17:28:59 -07:00
Kim Santiago
b451670222 Schema Compare open SCMP file (#825)
* initial open scmp changes

* more open scmp changes and adding tests

* moving some common test code

* simplify endpoint info parsing

* addressing comments and moving more common test code

* addressing comments
2019-06-13 14:24:19 -07:00
Kim Santiago
3566471c6c removing unused request context from dacfx and schema compare tests (#823) 2019-06-10 16:58:31 -07:00
Kim Santiago
f7c86a80ca Open dacfx deploy script instead of saving to file path (#822)
* open dacfx deploy script

* moving test db cleanups into finally blocks
2019-06-10 09:26:42 -07:00
udeeshagautam
b30926b273 Adding some default values to match SSDT and other tools (#818)
* Adding some default values to match DacFx deploy Extension and other tools. This help the default behavior but doesn't fix the issue.

* Fixing a test for default values and adding comment
2019-05-24 10:51:21 -07:00
kisantia
e68b6d62aa Open schema compare generated script (#813) 2019-05-20 14:14:50 -07:00
udeeshagautam
f8cd355e61 Feature/schemacompare Exclude-Include and Options enhancement (#799)
* Initial code for Including/Excluding individual changes (no tests added yet)

* Adding Exclude include tests. Default options call and additional options tests.

* Taking PR comments

* Retry in test for reliability
2019-04-25 22:07:00 -07:00
udeeshagautam
9e14336293 Feature/schemacompare options (#798)
* Initial working code for schema compare options

* Removing the unnecessary default value attribute

* Cleaning up tests

* Taking PR comments

* Taking name change for Schema Compare Options --> Deployment Options

* Remove parent to avoid circular reference (to avoid issues with serialization)
2019-04-18 12:52:10 -07:00
kisantia
213fe4ab37 Add schema compare publish changes operation (#795)
* add schema compare publish changes operation
2019-04-09 15:04:59 -07:00
kisantia
dc5ab60df5 Fix invalid dacpac version crashing sqltoolsservice (#789)
* fix invalid dacpac version crashing sqltoolsservice
2019-04-03 17:30:10 -07:00
kisantia
0c46c5bfdb Add schema compare generate script operation (#787)
* add generate script operation
2019-03-29 14:12:37 -07:00
kisantia
01bcfd8df9 Add Schema Compare (#777)
* successfully sends list of differences to ADS

* bumping dacfx nuget package version

* add second schema compare try for case when first db to db comparison fails but works on second try

* move schemacompare out of dacfx folders

* capitalizing

* more capitalizing

* addressing comments
2019-03-05 11:43:06 -08:00