Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alincode/node-db-migrate-sandbox
https://github.com/alincode/node-db-migrate-sandbox
Last synced: 11 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/alincode/node-db-migrate-sandbox
- Owner: alincode
- Created: 2016-09-14T19:30:55.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-09-15T06:14:25.000Z (over 8 years ago)
- Last Synced: 2024-11-06T07:27:03.841Z (about 2 months ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# node db migrate sandbox
**init project**
```
npm init -y
npm i db-migrate -S
npm i db-migrate-mysql -S
```**setting up db config**
```
touch database.json
vi database.json
```**create empty db**
`mysql> create schema db_migrate_test default character set utf8mb4;`
Another way
```
db-migrate db:create node_db_migrate
db-migrate db:create node_db_migrate_test
```Sometime this way is not reliable. I dont recommend it.
**create migrate script**
`db-migrate create add-user`
**execute migrate**
`db-migrate up`
**rollback migrate**
`db-migrate down`
### reference
* [node-db-migrate repository](https://github.com/db-migrate/node-db-migrate)
* [node-db-migrate doc](https://db-migrate.readthedocs.io/en/latest/)