https://github.com/infinitaslearning/marv-mssql-driver
MS SQL Driver for https://github.com/guidesmiths/marv
https://github.com/infinitaslearning/marv-mssql-driver
Last synced: about 1 year ago
JSON representation
MS SQL Driver for https://github.com/guidesmiths/marv
- Host: GitHub
- URL: https://github.com/infinitaslearning/marv-mssql-driver
- Owner: infinitaslearning
- Created: 2019-08-01T09:53:38.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-10-02T20:23:46.000Z (over 2 years ago)
- Last Synced: 2025-05-04T21:01:51.910Z (about 1 year ago)
- Language: JavaScript
- Size: 217 KB
- Stars: 0
- Watchers: 2
- Forks: 2
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://travis-ci.org/infinitaslearning/marv-mssql-driver)
[](https://github.com/guidesmiths/eslint-config-imperative)
# marv-mssql-driver
A SQL Server driver for [marv](https://www.npmjs.com/package/marv)
"If @cressie176 can do it, anyone can." Anon, 2019
## Usage
```
migrations/
|- 001.create-table.sql
|- 002.create-another-table.sql
```
```js
const marv = require('marv')
const mssqlDriver = require('marv-mssql-driver')
const directory = path.join(process.cwd(), 'migrations' )
const driver = mssqlDriver({
table: 'db_migrations', // defaults to 'migrations'
connection: { // the connection sub document is passed directly to mssql
host: 'localhost',
port: 1433,
database: 'dbo',
user: 'sa',
password: 'Marv@234!',
options: {
encrypt: true // Use this if you're on Windows Azure
}
}
})
marv.scan(directory, (err, migrations) => {
if (err) throw err
marv.migrate(migrations, driver, (err) => {
if (err) throw err
})
})
```
## SQL Server locally for testing
The password is: `Marv@234!`
## Testing
```bash
npm install # or yarn
npm run docker
npm test
```