0.1.7 • Published 3 months ago

@blackglory/better-sqlite3-migrations v0.1.7

Weekly downloads
96
License
MIT
Repository
github
Last release
3 months ago

better-sqlite3-migrations

A utility for database migrations with better-sqlite3.

The module using user_version to record the schema version.

Install

npm install --save @blackglory/better-sqlite3-migrations
# or
yarn add @blackglory/better-sqlite3-migrations

API

interface IMigration {
  version: number
  up: string | ((db: Database) => void)
  down: string | ((db: Database) => void)
}

migrate

function migrate(db: Database, migrations: IMigration[], targetVersion?: number): void

If targetVersion is undefined, then use the maximum version of migrations.

0.1.7

3 months ago

0.1.6

6 months ago

0.1.5

7 months ago

0.1.4

7 months ago

0.1.3

7 months ago

0.1.2

8 months ago

0.1.1

11 months ago

0.1.0

11 months ago