0.1.0 • Published 2 years ago

@zero-version/mssql-migrate v0.1.0

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

mssql-migrate

A simple migration tool for Microsoft Sql Server

Install

npm install @zero-version/mssql-migrate --save-dev

Usage

Under the hood, mssql-migrate uses mssql with the default tedious driver. For commands that connect to a database, the arguments map to the options in these packages.

create-database

# Basic Example

npx migrate create-database MyDatabase -s MY_SERVER_NAME -u admin -pw p@$$w0rd

# With a windows account (via NTLM)

npx migrate create-database MyDatabase -s MY_SERVER_NAME -at ntlm -dm MY_DOMAIN -u windows_user -pw p@$$w0rd

Run npx migrate help create-database for more options.

create-login

# Basic Example

npx migrate create-login new_user_name new_password -s MY_SERVER_NAME -d MyDatabase -u windows_user -pw p@$$w0rd

# With a windows account (via NTLM)

npx migrate create-login new_user_name new_password -s MY_SERVER_NAME -d MyDatabase -at ntlm -dm MY_DOMAIN -u windows_user -pw p@$$w0rd

Run npx migrate help create-login for more options.

create-migration

# Basic Example

npx migrate create-migration

Run npx migrate help create-migration for more options.

run-migrations

# Basic Example

npx migrate run-migrations /path/to/migrations -s MY_SERVER_NAME -d MyDatabase -u windows_user -pw p@$$w0rd

# With a windows account (via NTLM)

npx migrate run-migrations /path/to/migrations -s MY_SERVER_NAME -d MyDatabase -at ntlm -dm MY_DOMAIN -u windows_user -pw p@$$w0rd

Run npx migrate help run-migrations for more options.

drop-database

# Basic Example

npx migrate drop-database MyDatabase -s MY_SERVER_NAME -u admin -pw p@$$w0rd

# With a windows account (via NTLM)

npx migrate drop-database MyDatabase -s MY_SERVER_NAME -at ntlm -dm MY_DOMAIN -u windows_user -pw p@$$w0rd

Run npx migrate help drop-database for more options.

0.1.0

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago