mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-02 09:35:40 -05:00
SQL Migration Extension Skeleton (#11625)
* Start on skeleton * Finish up skeleton * . * Change up the skeleton a bit, add some states.
This commit is contained in:
39
extensions/sql-migration/src/main.ts
Normal file
39
extensions/sql-migration/src/main.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { ExtensionContext, Disposable, commands, window } from 'vscode';
|
||||
|
||||
class SQLMigration {
|
||||
|
||||
constructor(private readonly context: ExtensionContext) {
|
||||
}
|
||||
|
||||
async start(): Promise<void> {
|
||||
|
||||
}
|
||||
|
||||
async registerCommands(): Promise<void> {
|
||||
const commandDisposables: Disposable[] = [ // Array of disposables returned by registerCommand
|
||||
commands.registerCommand('sqlmigration.start', () => {
|
||||
window.showInformationMessage('Command ran');
|
||||
}),
|
||||
];
|
||||
|
||||
this.context.subscriptions.push(...commandDisposables);
|
||||
}
|
||||
|
||||
stop(): void {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
let sqlMigration: SQLMigration;
|
||||
export async function activate(context: ExtensionContext) {
|
||||
sqlMigration = new SQLMigration(context);
|
||||
}
|
||||
|
||||
export function deactivate(): void {
|
||||
sqlMigration.stop();
|
||||
}
|
||||
22
extensions/sql-migration/src/models/stateMachine.ts
Normal file
22
extensions/sql-migration/src/models/stateMachine.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
export enum State {
|
||||
COLLECTING_SOURCE_INFO,
|
||||
COLLECTION_SOURCE_INFO_ERROR,
|
||||
TARGET_SELECTION,
|
||||
TARGET_SELECTION_ERROR,
|
||||
AZURE_SERVER_SELECTION,
|
||||
AZURE_SERVER_SELECTION_ERROR,
|
||||
AZURE_DB_BACKUP,
|
||||
AZURE_DB_BACKUP_ERROR,
|
||||
MIGRATION_AGENT_CREATION,
|
||||
MIGRATION_AGENT_SELECTION,
|
||||
MIGRATION_AGENT_ERROR,
|
||||
MIGRATION_START,
|
||||
NO_AZURE_SERVER,
|
||||
EXIT,
|
||||
}
|
||||
|
||||
9
extensions/sql-migration/src/typings/ref.d.ts
vendored
Normal file
9
extensions/sql-migration/src/typings/ref.d.ts
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
/// <reference path='../../../../src/vs/vscode.d.ts'/>
|
||||
/// <reference path='../../../../src/sql/azdata.d.ts'/>
|
||||
/// <reference path='../../../../src/sql/azdata.proposed.d.ts'/>
|
||||
/// <reference types='@types/node'/>
|
||||
14
extensions/sql-migration/src/wizard/wizardController.ts
Normal file
14
extensions/sql-migration/src/wizard/wizardController.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
export class WizardController {
|
||||
constructor() {
|
||||
|
||||
}
|
||||
|
||||
public async openWizard(): Promise<void> {
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user