mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
fix sql project generate script (#10697)
This commit is contained in:
@@ -201,11 +201,11 @@ export class ProjectsController {
|
|||||||
|
|
||||||
const dacFxService = await ProjectsController.getDaxFxService();
|
const dacFxService = await ProjectsController.getDaxFxService();
|
||||||
|
|
||||||
if (profile as IDeploymentProfile) {
|
if ((<IDeploymentProfile>profile).upgradeExisting) {
|
||||||
return await dacFxService.deployDacpac(dacpacPath, profile.databaseName, (<IDeploymentProfile>profile).upgradeExisting, profile.connectionUri, TaskExecutionMode.execute, profile.sqlCmdVariables);
|
return await dacFxService.deployDacpac(dacpacPath, profile.databaseName, (<IDeploymentProfile>profile).upgradeExisting, profile.connectionUri, TaskExecutionMode.execute, profile.sqlCmdVariables);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return await dacFxService.generateDeployScript(dacpacPath, profile.databaseName, profile.connectionUri, TaskExecutionMode.execute, profile.sqlCmdVariables);
|
return await dacFxService.generateDeployScript(dacpacPath, profile.databaseName, profile.connectionUri, TaskExecutionMode.script, profile.sqlCmdVariables);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -161,10 +161,10 @@ export class DeployDatabaseDialog {
|
|||||||
sqlCmdVariables: this.project.sqlCmdVariables
|
sqlCmdVariables: this.project.sqlCmdVariables
|
||||||
};
|
};
|
||||||
|
|
||||||
|
azdata.window.closeDialog(this.dialog);
|
||||||
await this.deploy!(this.project, profile);
|
await this.deploy!(this.project, profile);
|
||||||
|
|
||||||
this.dispose();
|
this.dispose();
|
||||||
azdata.window.closeDialog(this.dialog);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async generateScriptClick(): Promise<void> {
|
public async generateScriptClick(): Promise<void> {
|
||||||
@@ -173,12 +173,13 @@ export class DeployDatabaseDialog {
|
|||||||
connectionUri: await this.getConnectionUri()
|
connectionUri: await this.getConnectionUri()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
azdata.window.closeDialog(this.dialog);
|
||||||
|
|
||||||
if (this.generateScript) {
|
if (this.generateScript) {
|
||||||
await this.generateScript!(this.project, profile);
|
await this.generateScript!(this.project, profile);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.dispose();
|
this.dispose();
|
||||||
azdata.window.closeDialog(this.dialog);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private getTargetDatabaseName(): string {
|
private getTargetDatabaseName(): string {
|
||||||
|
|||||||
Reference in New Issue
Block a user