Members
Methods
(async, static) up(connection)
- Source:
Call up method on instance.
Parameters:
Name | Type | Description |
---|---|---|
connection |
Knex | The Knex connection instance. |
Returns:
The async process promise.
- Type
- Promise
(async, static) down(connection)
- Source:
Call down method on instance.
Parameters:
Name | Type | Description |
---|---|---|
connection |
Knex | The Knex connection instance. |
Returns:
The async process promise.
- Type
- Promise
(static) getInstance()
- Source:
Get migration instance as a singleton.
Returns:
Migration singleton instance.
- Type
- database.Migration
(static) setDefaultInstance(instance)
- Source:
Set the current migration instance.
Parameters:
Name | Type | Description |
---|---|---|
instance |
database.Migration | Migration instance. |
Throws:
-
Indicates that the default instance was not a migration instance.
- Type
- TypeError
(abstract) up()
- Source:
Run the migrations.
Returns:
The async process promise.
- Type
- Promise
(abstract) down()
- Source:
Reverse the migrations.
Returns:
The async process promise.
- Type
- Promise
setConnection(connection)
- Source:
Set current connection instance.
Parameters:
Name | Type | Description |
---|---|---|
connection |
Knex | The current connection instance. |
Returns:
Current migration instance.
- Type
- database.Migration