mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
fix deploy filename changing when it shouldn't (#6777)
This commit is contained in:
@@ -9,7 +9,7 @@ import * as nls from 'vscode-nls';
|
||||
import * as vscode from 'vscode';
|
||||
import * as os from 'os';
|
||||
import * as path from 'path';
|
||||
import { DataTierApplicationWizard } from '../dataTierApplicationWizard';
|
||||
import { DataTierApplicationWizard, Operation } from '../dataTierApplicationWizard';
|
||||
import { DacFxDataModel } from './models';
|
||||
import { BasePage } from './basePage';
|
||||
import { sanitizeStringForFilename, isValidBasename } from './utils';
|
||||
@@ -128,10 +128,16 @@ export abstract class DacFxConfigPage extends BasePage {
|
||||
|
||||
// only update values and regenerate filepath if this is the first time and database isn't set yet
|
||||
if (this.model.database !== values[0].name) {
|
||||
// db should only get set to the dropdown value if it isn't deploy with create database
|
||||
if (!(this.instance.selectedOperation === Operation.deploy && !this.model.upgradeExisting)) {
|
||||
this.model.database = values[0].name;
|
||||
}
|
||||
// filename shouldn't change for deploy because the file exists and isn't being generated like for extract and export
|
||||
if (this.instance.selectedOperation !== Operation.deploy) {
|
||||
this.model.filePath = this.generateFilePathFromDatabaseAndTimestamp();
|
||||
this.fileTextBox.value = this.model.filePath;
|
||||
}
|
||||
}
|
||||
|
||||
this.databaseDropdown.updateProperties({
|
||||
values: values
|
||||
|
||||
@@ -28,7 +28,7 @@ export class DeployConfigPage extends DacFxConfigPage {
|
||||
|
||||
public constructor(instance: DataTierApplicationWizard, wizardPage: azdata.window.WizardPage, model: DacFxDataModel, view: azdata.ModelView) {
|
||||
super(instance, wizardPage, model, view);
|
||||
this.fileExtension = '.bacpac';
|
||||
this.fileExtension = '.dacpac';
|
||||
}
|
||||
|
||||
async start(): Promise<boolean> {
|
||||
|
||||
Reference in New Issue
Block a user