mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-16 09:35:36 -05:00
Required changes to make sql projects extension work with vscode (#22847)
* Update CreateProject api * More updates * Fix a few comments * Address comments * Remove package.json changes * Fix error * Fix testUtil
This commit is contained in:
@@ -15,8 +15,8 @@ import { IconPathHelper } from '../common/iconHelper';
|
||||
import { ISystemDatabaseReferenceSettings, IDacpacReferenceSettings, IProjectReferenceSettings, INugetPackageReferenceSettings } from '../models/IDatabaseReferenceSettings';
|
||||
import { Deferred } from '../common/promise';
|
||||
import { TelemetryActions, TelemetryReporter, TelemetryViews } from '../common/telemetry';
|
||||
import { ProjectType, SystemDatabase } from 'mssql';
|
||||
import { DbServerValues, ensureSetOrDefined, populateResultWithVars } from './utils';
|
||||
import { ProjectType } from 'mssql';
|
||||
|
||||
export enum ReferenceType {
|
||||
project,
|
||||
@@ -160,7 +160,7 @@ export class AddDatabaseReferenceDialog {
|
||||
if (this.currentReferenceType === ReferenceType.systemDb) {
|
||||
const systemDbRef: ISystemDatabaseReferenceSettings = {
|
||||
databaseVariableLiteralValue: <string>this.databaseNameTextbox?.value,
|
||||
systemDb: getSystemDatabase(<string>this.systemDatabaseDropdown?.value),
|
||||
systemDb: utils.getSystemDatabase(<string>this.systemDatabaseDropdown?.value),
|
||||
suppressMissingDependenciesErrors: <boolean>this.suppressMissingDependenciesErrorsCheckbox?.checked
|
||||
};
|
||||
|
||||
@@ -734,10 +734,6 @@ export function getSystemDbOptions(project: Project): string[] {
|
||||
return [constants.master, constants.msdb];
|
||||
}
|
||||
|
||||
export function getSystemDatabase(name: string): SystemDatabase {
|
||||
return name === constants.master ? SystemDatabase.Master : SystemDatabase.MSDB;
|
||||
}
|
||||
|
||||
export async function promptDacpacLocation(): Promise<vscode.Uri[] | undefined> {
|
||||
return await vscode.window.showOpenDialog(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user