Apply changes from remote database to sqlproj - sql-database-projects changes (#17738)

* update project from database

* update project from database

* Leftover merge update

* Slight refactor to add vscode entrypoints

* Re-adding leftover schemacompare bits that reference database project changes

* Removing unnecessary function

* Addiung GetDSP command to package.json

* tests and a race condition fix

* remove custom UUID generation code

* swapping awaits for voids on promises

* PR feedback

* PR feedback

* Hide update project command from vscode

* Swapping cross-extension commands for bound extension contract

* Re-adding schema compare radio buttons for sqlproj

* Adding refresh after project update

* Populating list of project scripts just before comparison to avoid missing script errors of project was separately edited

* Adding missing await for okay button enable check

* Correcting schema compare source when populated from a project

* Rename UpdateDataModel to be more clear

* Fix incorrectly changed type

* Added new runComparison schema compare command, hooked up to sqlproj extension

* Added progress indicator for "apply now" option

* moved string literal to constant

* Added missing await

* Setting missing "saveScmpButton" state to fix test

* Revert "Setting missing "saveScmpButton" state to fix test"

This reverts commit 55612c9def24ac9e3398f5bbd153d21d9d3ca37f.

* Removing preemptive resetWindow() call

* general cleanup

* PR feedback

* property renames

* Reverting rename; requires Tools Service change first

* Adding header to updateProject

* Adding missing header

* PR feedback

* adding missing await

* Handing race condition for UI enable

* Fixing broken okay enable case

* Fixing enum comparison wonk

Co-authored-by: Noureldine Yehia <t-nyehia@microsoft.com>
This commit is contained in:
Benjin Dubishar
2022-01-11 16:52:09 -08:00
committed by GitHub
parent 4fa2b50077
commit 292e60a767
20 changed files with 1103 additions and 53 deletions

View File

@@ -9,6 +9,7 @@ import * as vscode from 'vscode';
import * as mssql from '../../mssql';
import * as os from 'os';
import * as loc from './localizedConstants';
import * as dataworkspace from 'dataworkspace';
import { promises as fs } from 'fs';
export interface IPackageInfo {
@@ -182,3 +183,8 @@ try {
export function getAzdataApi(): typeof azdataType | undefined {
return azdataApi;
}
export function getDataWorkspaceExtensionApi(): dataworkspace.IExtension {
const extension = vscode.extensions.getExtension(dataworkspace.extension.name)!;
return extension.exports;
}