File tree Expand file tree Collapse file tree 4 files changed +10
-17
lines changed Expand file tree Collapse file tree 4 files changed +10
-17
lines changed Original file line number Diff line number Diff line change 7
7
build :
8
8
docker :
9
9
- image : circleci/node:8@sha256:ff2c2a3fd5105396697de4c20139435fe9f47d62716fa241d225122deb711d50
10
- - image : circleci/mysql:8.0.3 @sha256:ea4c062323a944b9152137a62f5b2c8b3d5e235d98af66675871506a1bf6cc6e
10
+ - image : mongo:3.7.9 @sha256:736eec20a17eafaa988d299902fcaab521cb0ca56af4400f782576afc878d6bc
11
11
environment :
12
12
- NPM_CONFIG_LOGLEVEL : warn
13
- - KNEX_DATABASE : circle_test
14
- - KNEX_USER : root
15
13
working_directory : ~/repo
16
14
steps :
17
15
- checkout
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @js-migrations/mongo" ,
3
- "version" : " 1 .0.0" ,
4
- "description" : " Implementation of the js-migrations RepoFacade using mongo " ,
3
+ "version" : " 0 .0.0-development " ,
4
+ "description" : " Implementation of the js-migrations RepoFacade using Mongo. " ,
5
5
"repository" : {
6
6
"type" : " git" ,
7
7
"url" : " https://github.com/js-migrations/mongo"
Original file line number Diff line number Diff line change 1
1
# mongo
2
- > Implementation of the js-migrations RepoFacade using mongo
2
+ > Implementation of the js-migrations RepoFacade using Mongo.
3
3
4
4
### Usage
5
5
1 . Install it with ` npm i @js-migrations/mongo ` .
@@ -13,23 +13,18 @@ import connectToDb from '@js-migrations/mongo/dist/utils/connectToDb';
13
13
14
14
const migrationsRepoFacade = mongoMigrationsRepoFactory ({
15
15
db: connectToDb ({
16
- client: ' mysql' ,
17
- connection: {
18
- database: ' todoapp' ,
19
- host: ' 127.0.0.1' ,
20
- password: ' pword' ,
21
- user: ' todouser' ,
22
- },
16
+ dbName: ' your_db_name' ,
17
+ url: ' mongodb://127.0.0.1' ,
23
18
}),
24
19
// Optional property.
25
- lockTableName: ' migrationsLock' ,
20
+ collectionName: ' migrations' ,
21
+ // Optional property.
22
+ lockCollectionName: ' migrationsLock' ,
26
23
// Optional property.
27
24
migrations: [{
28
25
down : async () => {},
29
26
key: ' your_migration_name' ,
30
27
up : async () => {},
31
28
}],
32
- // Optional property.
33
- tableName: ' migrations' ,
34
29
});
35
30
```
Original file line number Diff line number Diff line change 1
- import * as sourceMapSupport from 'source-map-support' ;
1
+ import sourceMapSupport from 'source-map-support' ;
2
2
sourceMapSupport . install ( ) ;
3
3
4
4
import serviceFactory from '@js-migrations/core/dist/factory' ;
You can’t perform that action at this time.
0 commit comments