@memberjunction/skyway-sqlserver
v0.6.1
Published
SQL Server provider for the Skyway migration engine
Readme
@memberjunction/skyway-sqlserver
SQL Server provider for Skyway, the TypeScript-native Flyway-compatible migration engine.
Wraps the mssql (tedious) driver to provide connection management, transactions, history-table operations, and schema cleanup.
Installation
npm install @memberjunction/skyway-core @memberjunction/skyway-sqlserverUsage
import { Skyway } from '@memberjunction/skyway-core';
import { SqlServerProvider } from '@memberjunction/skyway-sqlserver';
const provider = new SqlServerProvider({
Server: 'localhost',
Port: 1433,
Database: 'my_app',
User: 'sa',
Password: 'secret',
});
const skyway = new Skyway({
Provider: provider,
Migrations: {
Locations: ['./migrations'],
DefaultSchema: 'dbo',
BaselineOnMigrate: true,
},
// Database is optional — falls back to provider.Config.
});
const result = await skyway.Migrate();
console.log(`Applied ${result.MigrationsApplied} migrations`);
await skyway.Close();Dialect Details
| | SQL Server |
|---|---|
| Default port | 1433 |
| Default schema | dbo |
| Driver | mssql (tedious) |
| Identifier quoting | [brackets] |
| Batch separator | GO |
| History table DDL | NVARCHAR, DATETIME, BIT, GETDATE(), ISNULL() |
For full documentation, configuration options, and the Skyway class API, see @memberjunction/skyway-core.
