Commit Graph

35 Commits

Author SHA1 Message Date
Kim Santiago
b238819c89 Standardize slashes in sqlproj (#11174)
* standardize slashes that go in sqlproj

* update tests to not have os specific baselines

* fix test

* fix delete tests

* some cleanup
2020-07-06 13:17:55 -07:00
Kim Santiago
ac71c6f06d Add "Open Containing Folder" to project context menu (#11187)
* add command to open the folder the project is in

* move commands to constants
2020-07-06 11:42:25 -07:00
Kim Santiago
1e805a4156 Change deploy to publish in sql project codebase (#11144)
* change deploy to publish

* rename to IPublishSettings

* change a few more profiles to settings
2020-06-30 19:23:03 -07:00
Kim Santiago
41315c6e0a Show error when trying to add file/folder that already exists to project (#11122)
* show error when trying to create file or folder that already exists

* add test for file that already exists

* add folder tests

* fix error messages

* hide Properties folder

* update comment
2020-06-30 13:42:50 -07:00
Kim Santiago
6b8eafbf2e Update import project to have friendly names for the extract file organization options (#11123)
* udpate import to have friendly names for the extract file organization options

* update tests

* update message

* remove camelcase stuff

* use localized constants instead of enum
2020-06-29 15:37:28 -07:00
Benjin Dubishar
00836e1890 Benjin/delete (#11054)
* Adding delete to package.json

* checkpoint

* Delete file working

* Working for nested folders

* Added file/folder deletion test

* addressing feedback

* Swapping QuickPick for modal

* Adding Exclude functionality

* reverting change to package.json
2020-06-24 10:27:58 -07:00
Kim Santiago
74798f7cda Don't allow adding duplicate database references to sql project (#11010)
* don't allow adding duplicate database references

* add test

* addressing comments

* remove XML checking from databaseReferenceExists()

* change to get
2020-06-23 12:24:49 -07:00
Udeesha Gautam
cfbce96fe2 fix for windows path to show in project tree across platforms correctly (#11027)
* fix for windows path to show in project tree across platforms correctly

* allow retrying on project that failed to load

* test for project failed to load case

* Adding platform safe uri for database ref in tree
2020-06-22 22:37:24 -07:00
Kim Santiago
6ad33aa879 Load profile support for sql project deploy (#10948)
* load database name from profile.xml

* load sqlcmd variables from profile

* Add warning text

* add tests

* fix file filter for windows

* add comments

* show SQLCMD variables in a table

* reset dialog before testing readPublishProfile callback
2020-06-18 17:44:28 -07:00
Benjin Dubishar
0f9f9c851e Fixes issue where wrong property was checked for deployment type (#10933)
* Fixes issue where wrong property was checked for deployment type

* improve error message
2020-06-15 19:19:02 -07:00
Kim Santiago
4c82cf0ebb Make database references also work in SSDT (#10864)
* add system database reference for VS

* a few fixes

* update tests

* update tests

* fix tests after merge

* addressing comment to make logic a little more clear

* fix replacing SSDT reference name in tree
2020-06-15 14:58:59 -07:00
Benjin Dubishar
ddb210e971 Final ADS-side hookup for sqlcmd vars (#10815)
* Adding reading SqlCmdVars from project file

* organized apiWrapper, added calls

* Adding test to confirm deployment/script gen profiles with sqlcmd vars
2020-06-12 19:49:28 -07:00
Kim Santiago
c9569d8573 Update system database references from SSDT (#10891)
* convert system database references from SSDT

* remove empty ItemGroup if no other database references

* fix baseline files

* also update sqlproj if system database references were added in SSDT since the sqlproj got updated with ADS imports

* undo change

* move updating system db references out of updateProjectForRoundTrip()

* update test to have an already updated system db ref

* add clean target after merge from master

* add await

* addressing comments
2020-06-12 17:57:11 -07:00
Udeesha Gautam
70f65f45b5 Scoping of project context menu items based on node type (#10902)
* Remove context menu items from files

* More changes for context menu and adding test

* change to initiate build
2020-06-12 17:00:51 -07:00
Udeesha Gautam
60c0ac6bd7 Fix for #10779 to clean build to work in SSDT post ADS build (#10882)
* Add clean target

* include in test baselines

* adding one more test
2020-06-12 12:11:18 -07:00
Kim Santiago
7b00e219ef Show database references in project tree (#10837)
* add database references to same itemgroup

* show database references in tree

* update tests

* refresh project tree after a reference is added

* addressing comments

* add validation

* Add test

* sort imports
2020-06-11 15:32:57 -07:00
Benjin Dubishar
24e6ed5075 Adds welcome message for database projects (#10820)
* Removing duplicate Import command piping

* Adding welcome message + buttons

* Adding welcome button to Import

* Correcting typos
2020-06-09 15:29:01 -07:00
Kim Santiago
1aab8aba34 Add option for msdb reference in sql project (#10810)
* add msdb option

* add msdb dacpacs

* add tests

* fix system dacpac path for windows
2020-06-09 10:12:39 -07:00
Benjin Dubishar
02598621c3 Focus database projects view after open/import (#10760) 2020-06-09 09:42:52 -07:00
Kim Santiago
6e3d960d1d Add support for adding dacpac references in sql database projects (#10684)
* add dacpacs

* able to add reference to appropriate master dacpac

* able to add reference to a dacpac

* Add a few tests

* fix tests

* fix wording

* fix adding reference to same database

* add project tests

* fix test for windows

* addressing comments

* Adding another test

* update tests

* fix build error
2020-06-05 17:53:21 -07:00
Udeesha Gautam
919275dadc Changing the user visible command name for deploy (#10770)
* Changing the user visible command name for deploy

* Change to restart PR build
2020-06-05 15:31:11 -07:00
Sakshi Sharma
c903112451 Tests for round tripping with SSDT projects (#10646)
* Test code for round tripping feature

* Fixed tests. Edited updateImportedTargetsToProjFile method to push newly added import target to the list.

* Added couple more tests

* Addressed comment
2020-06-03 14:02:50 -07:00
Sakshi Sharma
f49bfbc91b Round trip with SSDT (#10563)
* Initial changes

* Round trip feature implementation

* Addressed PR comments

* Addressed comments
2020-05-27 07:23:47 -07:00
Sakshi Sharma
9a55b0275d Import project from database (#10326)
* Initial changes for Import database as new project

* Functionally complete code

* Initial changes for Import database as new project

* Functionally complete code

* Resolved conflicts with latest changes. Also did some code refactoring.

* Addressed comments. Added unit tests.

* Addressed comments

* Moved ExtractTarget enum from azdata to mssql

* Addressed comments

* Fixed indentation in project templates
2020-05-26 16:08:24 -07:00
Benjin Dubishar
f0d86f8acb Database projects deploy (#10417)
* Hooking up deployment of SQL projects to the project build functionality and database selection UI
* Adding ADS-side plumbing for sqlcmdvars
2020-05-26 14:28:09 -07:00
Udeesha Gautam
ea80202cf7 Bug/fix for mssql path (#10522)
* Correcting to right path and making file exist calls async
2020-05-20 17:35:24 -07:00
Kim Santiago
b83279c24c Add sql proj schema compare for dacpac (#10388)
* add support for schema compare to specify source dacpac

* add build and dacpac produced from build

* check if dacpac exists

* add tests

* move exists check code to utils

* fix test run failing
2020-05-15 13:03:08 -07:00
Kim Santiago
abdd9af931 update deploy dialog to not show dropdown when there aren't any data sources (#10404) 2020-05-14 14:31:47 -07:00
Udeesha Gautam
ddb9a806cc Feature/project build (#10332)
* initial build command execution

* adding tests

* Clean up test names

* update SqltoolsService release in ADS for Build

* Updating as per PR comments

* updating yarn lock

* Adding one more test for command run

* Test fixes
2020-05-12 20:17:37 -07:00
Kim Santiago
f3d36c1b86 Initial project deploy dialog (#10288)
* connection picking dialog for deploy

* add data source option

* fix errors

* merge fix

* show connection name instead of connection string if there is one

* remove unnecessary async

* async (#10292)

* Revert "async (#10292)"

This reverts commit c94139aa45d8f1d868ebd251f3016315718b56ae.

* add a few tests

* addressing comments

* remove cancel click handler

* remove text box for generate script file path because it will just open up a new editor with the script

* fix test

Co-authored-by: Amir Omidi <amomidi@microsoft.com>
2020-05-11 18:12:29 -07:00
Benjin Dubishar
80901c9a7b Swapping vscode calls for ApiWrapper for testability (#10267)
* swapping vscode calls for apiwrapper for testability

* Adding mainController tests

* Adding unit tests for input validation

* Adding project controller tests, reorganizing error handling

* Removing commented-out code
2020-05-06 14:16:27 -07:00
Benjin Dubishar
52f33cc587 Fixing bug where templates may get mapped before loaded from their files (#10111)
* Fixing potential bad order of template loading and map construction

* Fixing bug where templates get mapped before loaded from file

* Parallelizing loading templates from file
2020-04-22 17:01:19 -07:00
Benjin Dubishar
b3492e3f57 Creating a new database project, project items
* can create, open, and close sqlproj files
* can add sql objects to projects
2020-04-17 14:09:59 -07:00
Benjin Dubishar
1a639f83c4 .sqlproj and datasources.json file parsing (#8921)
* Checkpoint

* Adding mock contents for tree

* added open sqlproj dialog

* reading files from directory

* Added directory traversal

* Adding tree sorting by folder vs file and label

* Improved auto-unfolding of tree based on node type

* replacing fs with fs.promise alias

* PR feedback

* added activation event for when workspace contains sqlproj files

* Returning after displaying error

* Fixing linter errors

* Reworked tree

* Fixing missing grandchildren

* Correcting tree URI construction

* Refactoring to isolate tree item responsibilities from data model responsibilities

* project file parsing

* constructing tree from project files rather than filesystem

* Fixing double-initialization

* Changing projectEntry to take enum for file type

* Correct node type for project item

* Parsing datasources.json

* Child nodes for sql data source

* Localizing strings

* Checkpoint

* Adding mock contents for tree

* added open sqlproj dialog

* reading files from directory

* Added directory traversal

* Adding tree sorting by folder vs file and label

* Improved auto-unfolding of tree based on node type

* replacing fs with fs.promise alias

* PR feedback

* added activation event for when workspace contains sqlproj files

* Returning after displaying error

* Fixing linter errors

* Reworked tree

* Fixing missing grandchildren

* Correcting tree URI construction

* Refactoring to isolate tree item responsibilities from data model responsibilities

* project file parsing

* constructing tree from project files rather than filesystem

* Fixing double-initialization

* Changing projectEntry to take enum for file type

* Correct node type for project item

* Parsing datasources.json

* Child nodes for sql data source

* Localizing strings

* missed file in merge

* changed extension method to helper

* cleanup

* Adding docstrings
2020-02-24 12:11:41 -08:00
Benjin Dubishar
51ab435e5f Initial SQL Project tree viewlet in Explorer sidebar (#8639)
* Adding mock contents for tree
* added open sqlproj dialog
* reading files from directory
* Added directory traversal
* Adding tree sorting by folder vs file and label
* Improved auto-unfolding of tree based on node type
* replacing fs with fs.promise alias
* added activation event for when workspace contains sqlproj files
* Returning after displaying error
2019-12-27 12:42:23 -08:00