mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-16 09:35:36 -05:00
Add reference to another sql project (#12186)
* add projects to add database reference dialog * able to add project references * check for circular dependency * only allow adding reference to project in the same workspace * fix location dropdown when project reference is enabled * add tests * more tests * cleanup * fix flakey test * addressing comments
This commit is contained in:
@@ -518,7 +518,7 @@ export class PublishDatabaseDialog {
|
||||
canSelectFiles: true,
|
||||
canSelectFolders: false,
|
||||
canSelectMany: false,
|
||||
defaultUri: vscode.workspace.workspaceFolders ? (vscode.workspace.workspaceFolders as vscode.WorkspaceFolder[])[0].uri : undefined,
|
||||
defaultUri: vscode.Uri.file(this.project.projectFolderPath),
|
||||
filters: {
|
||||
[constants.publishSettingsFiles]: ['publish.xml']
|
||||
}
|
||||
@@ -533,11 +533,14 @@ export class PublishDatabaseDialog {
|
||||
const result = await this.readPublishProfile(fileUris[0]);
|
||||
// clear out old database dropdown values. They'll get populated later if there was a connection specified in the profile
|
||||
(<azdata.DropDownComponent>this.targetDatabaseDropDown).values = [];
|
||||
(<azdata.DropDownComponent>this.targetDatabaseDropDown).value = result.databaseName;
|
||||
|
||||
this.connectionId = result.connectionId;
|
||||
await this.updateConnectionComponents(result.connection, <string>this.connectionId);
|
||||
|
||||
if (result.databaseName) {
|
||||
(<azdata.DropDownComponent>this.targetDatabaseDropDown).value = result.databaseName;
|
||||
}
|
||||
|
||||
for (let key in result.sqlCmdVariables) {
|
||||
(<Record<string, string>>this.sqlCmdVars)[key] = result.sqlCmdVariables[key];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user