mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -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,9 +128,15 @@ 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) {
|
||||
this.model.database = values[0].name;
|
||||
this.model.filePath = this.generateFilePathFromDatabaseAndTimestamp();
|
||||
this.fileTextBox.value = this.model.filePath;
|
||||
// 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({
|
||||
|
||||
Reference in New Issue
Block a user