in

A simple golang tools database migration for developer


gomigrator is a simple tools database migration for developer

Installation

sudo curl -L "https://github.com/danangkonang/gomigrator/releases/download/0.0.9/gomigrator" -o gomigrator && sudo chmod +x gomigrator
sudo curl -L "https://github.com/danangkonang/gomigrator/releases/download/0.0.9/gomigrator" -o /usr/local/bin/gomigrator
  • Apply executable permissions to the binary:
sudo chmod +x /usr/local/bin/gomigrator
  • If the command gomigrator fails you cant run this
sudo ln -s /usr/local/bin/gomigrator /usr/bin/gomigrator
gomigrator --version

Databases

Usage

  # create migration
  gomigrator create migration --table [table name]

  # up migration
  gomigrator up migration

  # down migration
  gomigrator down migration
  # create seeder file
  gomigrator create seeder --table [table name]

  # up seeder
  gomigrator up seeder

  # down seeder
  gomigrator down seeder

see example seeder with fake data

GitHub

https://github.com/danangkonang/gomigrator




Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

GIPHY App Key not set. Please check settings

A Flutter widget library which helps us to select days in a week

a React component library from AppNexus