Commit Graph

49 Commits

Author SHA1 Message Date
Sakshi Sharma
21c8609eb7 Changes to add pre/post deploy script to sqlproj (#11864)
* Initial changes for adding pre/post deploy script in project

* Right click > Add pre/post deploy script

* Print script files in tree

* Add new pre-post deploy items with their own tags and additional ones with None

* Add tests

* Fix error due to merge conflicts

* Addressed comments and fixed tests.

* Fix code scan error

* Addressed comments
2020-08-27 10:50:02 -07:00
anjalia
f7279cb1f5 Auto increment new db project name (#11882)
* auto increment db proj name

* auto increment on import project from db

* adding separate message if workspace setting is invalid

* updating based on feedback

* adding do not ask again functionality

* moving constants

* making newprojecttool only top level functions

* adding tests

* updating to address merge conflicts

* fixing tests

* fixing tests
2020-08-26 12:14:51 -07:00
Kim Santiago
f3a48da3fa Initial project references changes (#11648)
* first changes for showing project references

* add tests

* fix interface and formatting

* add try so that project still gets loaded even if dependency project loading fails

* use instanceof

* add circular reference error
2020-08-13 16:08:32 -07:00
Kim Santiago
86a019842f Fix importing new project from server dashboard (#11766)
* fix importing new project from server dashboard

* also fix not showing list of dbs if the connection from connection dialog already specified the db
2020-08-11 18:08:13 -07:00
Udeesha Gautam
fbbb9ce529 load publish profile sqlcmd "value" tag and throw error if not loaded correctly (#11615)
* load publish profile sqlcmd "value" tag and throw error if not loaded correctly

* moved the read profile function to utils
2020-08-03 14:16:00 -07:00
Kim Santiago
30845cbd6d update project already exists error message (#11596) 2020-07-31 14:50:31 -07:00
Kim Santiago
9e5bd182bb don't change focus to file explorer viewlet when automatically opening sql projects in the open folder (#11583) 2020-07-30 14:50:42 -07:00
Kim Santiago
c06bd0821b Add deploy options support (#11567)
* add getOptionsFromProfile request

* update deploy and generate script to accept options

* fix tests

* update message

* update message to say what isn't supported

* bump sqltoolsservice version
2020-07-29 17:52:21 -07:00
Udeesha Gautam
196b3752a9 Feature/outer paths for project (#11445)
* allow relative paths in project file outside of project folder

* Adding some tests

* Adding error string to loc strings

* Fixed test

* fix error message

* PR comments and some more fixes
2020-07-22 19:28:03 -07:00
Kim Santiago
0a1c2583cc Load connection from publish profile (#11263)
* initial changes for reading connection from profile

* connection string can now be read from publish.xml

* fix build errors and update test

* move publish profile tests to their own file

* cleanup

* update message

* fix string

* remove apiWrapper
2020-07-15 17:03:25 -07:00
Charles Gagnon
f4a4127471 Remove ApiWrapper from sql-database-projects (#11345)
* Remove ApiWrapper

* fix compile error

* Use .resolves

* Check error messages

* Check for not called

* FIx global beforeEach/afterEach
2020-07-15 14:02:33 -07:00
Benjin Dubishar
dc7e6f59bd Aligns how Import and New project flows work (#11184)
* Slight import refactor

* Test updates

* Adds test, sets script name for File extractType to projectName

* generating correct folder list

* Correctly setting serverId for Imports started from Object Explorer

* Adding regression test

* uncommented test check
2020-07-14 19:31:22 -07:00
Sakshi Sharma
3e860692a2 Add missing await (#11275)
* Add missing await

* Addressed comment
2020-07-10 11:26:18 -07:00
Kim Santiago
7d5ecfe905 Add "Import New Database Project" to dashboard toolbar (#11229)
* add import database project to database and server dashboard home toolbar

* connection profile is getting passed to the extension

* use MenuItemAction instead of creating a new one

* move database picking

* add comment

* add helper function
2020-07-09 16:47: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
Sakshi Sharma
d6768ba12e Add missing await (#11151)
* Add missing await

* Removed async from method publishProject
2020-07-01 13:28:32 -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
Kim Santiago
8e0050f2af Don't ask for db twice if connection was to a db (#11099) 2020-06-25 17:18:41 -07:00
Benjin Dubishar
770848850d Import spot-fix (#11102) 2020-06-25 15:37:05 -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
Benjin Dubishar
cf73cf5003 Focus projects view when New Project is created (#11048)
* Focusing for new project

* Consolidated focus() logic
2020-06-23 21:08:40 -07:00
Kim Santiago
29bf016fb8 don't show error message if cancelling out of import project connection picker (#11050) 2020-06-23 10:29:55 -07:00
Benjin Dubishar
a4a8beb6b4 copying dacpac to temp folder before deploying (#11036) 2020-06-23 02:18:04 -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
Benjin Dubishar
d0b71e116b Create project within folder (#11037) 2020-06-22 21:27:16 -07:00
Sakshi Sharma
340d8d37c9 Add missing await (#10952) 2020-06-18 19:16:02 -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
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
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
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
Kim Santiago
e80aec586b fix sql project generate script (#10697) 2020-06-03 16:43:02 -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
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
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
9b296c9f42 Organizes context menus for database projects tree (#10266)
* reoranizing existing context menu commands

* adding build/deploy/import stubs

* Update error message

* adding for schemaCompare
2020-05-06 11:31:17 -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