OpenCourseWare Database Migration
This repository contains any script to migrate the database.
Requirement
To run this migration, you should install this dependency:
- Latest go
- sql-migrate command (https://github.com/rubenv/sql-migrate)
How to migrate to my local database
To migrate to development database, you can use this command:
sql-migrate up
How to create new migration
To create new migration, you can use this command:
sql-migrate new <migration-name>
# Example
sql-migrate new user
This command will create new .sql
file at migrations/development
folder.