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
This commit is contained in:
Sakshi Sharma
2020-05-26 16:08:24 -07:00
committed by GitHub
parent f0d86f8acb
commit 9a55b0275d
21 changed files with 604 additions and 50 deletions

View File

@@ -3,6 +3,7 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as azdata from 'azdata';
import * as templates from '../templates/templates';
import * as constants from '../common/constants';
import * as path from 'path';
@@ -61,6 +62,8 @@ export default class MainController implements Disposable {
this.apiWrapper.registerCommand('sqlDatabaseProjects.newItem', async (node: BaseProjectTreeItem) => { await this.projectsController.addItemPromptFromNode(node); });
this.apiWrapper.registerCommand('sqlDatabaseProjects.newFolder', async (node: BaseProjectTreeItem) => { await this.projectsController.addFolderPrompt(node); });
this.apiWrapper.registerCommand('sqlDatabaseProjects.importDatabase', async (profile: azdata.IConnectionProfile) => { await this.projectsController.importNewDatabaseProject(profile); });
// init view
this.extensionContext.subscriptions.push(this.apiWrapper.registerTreeDataProvider(SQL_DATABASE_PROJECTS_VIEW_ID, this.dbProjectTreeViewProvider));