mini tools handling migrasion database from cli

gomigrator

gomigrator is a simple tools database migration for developer

Installation

  • local install
sudo curl -L "https://github.com/danangkonang/gomigrator/releases/download/0.0.9/gomigrator" -o gomigrator && sudo chmod +x gomigrator
  • global install
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
  • Test installation.
gomigrator --version

Databases

  • PostgreSQL
  • Mysql

Usage

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

  # up migration
  gomigrator up migration

  # down migration
  gomigrator down migration
  • Seeder
  # 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

Similar Resources

A simple database migration tool using an sql.DB connection and fs.FS for the migration source

A simple database migration tool using an sql.DB connection and fs.FS for the migration source. It has no non-test dependencies.

Dec 7, 2022

Opinionated tool for database structure management and migrations

trek Requirements At least version 13 of postgres is needed. Installation go install . Setup Create config.yaml: model_name: model_name db_name: db

Dec 14, 2022

Database migration through structures - development

goMigration 基于 Golang 的数据库迁移工具,目前仍在开发中,有兴趣的小伙伴可以联系我一起~ 食用方法 go get https://github.com/DGuang21/goMigration 手动将其安装 可通过 gom gen create_c_user_table 方法生

Dec 2, 2021

A database migration tool written in Go.

dbmagritte created by Austin Poor A database migration tool written in Go. Usage Commands: init: Set up the repo by creating a .dbmagritte.yaml file a

Jan 29, 2022

A migration engine to deploy database changes in your golang + mongodb app.

bisonmigration A migration engine to deploy database changes in your golang + mongodb app. Migration files register their UP and DOWN functions in the

Jan 30, 2022

Schema management CLI for MySQL

Schema management CLI for MySQL

Skeema is a tool for managing MySQL tables and schema changes in a declarative fashion using pure SQL. It provides a CLI tool allowing you to: Export

Dec 27, 2022

trojan-go trojan(mini) mini auth trojan golang go

trojan forked from https://github.com/p4gefau1t/trojan-go Usage build: go build -tags "full" client: ./trojan-go -client -remote xxx.com:443 -local

Feb 2, 2022

siusiu (suite-suite harmonics) a suite used to manage the suite, designed to free penetration testing engineers from learning and using various security tools, reducing the time and effort spent by penetration testing engineers on installing tools, remembering how to use tools.

siusiu (suite-suite harmonics) a suite used to manage the suite, designed to free penetration testing engineers from learning and using various security tools, reducing the time and effort spent by penetration testing engineers on installing tools, remembering how to use tools.

siusiu (suite-suite harmonics) a suite used to manage the suite, designed to free penetration testing engineers from learning and using various security tools, reducing the time and effort spent by penetration testing engineers on installing tools, remembering how to use tools.

Dec 12, 2022

Example Golang API backend rest implementation mini project Point Of Sale using Gin Framework and Gorm ORM Database.

Example Golang API backend rest implementation mini project Point Of Sale using Gin Framework and Gorm ORM Database.

Dec 23, 2022

[mirror] the database client and tools for the Go vulnerability database

The Go Vulnerability Database golang.org/x/vulndb This repository is a prototype of the Go Vulnerability Database. Read the Draft Design. Neither the

Dec 29, 2022

🥝 Mini ECS CLI Command 🥝

miniecs 🥝 miniecs is a CLI tool for AWS ECS. 🥝 Requirement go 1.17.x or later �Installation go install github.com/jedipunkz/miniecs@latest Usage $ m

Oct 26, 2022

StaticBackend is a simple backend server API handling user mgmt, database, storage and real-time component

StaticBackend is a simple backend server API handling user mgmt, database, storage and real-time component

StaticBackend is a simple backend that handles user management, database, file storage, forms, and real-time experiences via channel/topic-based communication for web and mobile applications.

Jan 7, 2023

A simple program to automatically backup a database using git. Err handling by Sentry, Reporting by Betteruptime. Made with 🩸 , 😓 & 😭

backup What is this? A Simple program to automatically backup a database using git. Err handling by Sentry, Uses heartbeats by Betteruptime Made with

Nov 4, 2022

gNXI Tools - gRPC Network Management/Operations Interface Tools

gNxI Tools gNMI - gRPC Network Management Interface gNOI - gRPC Network Operations Interface A collection of tools for Network Management that use the

Dec 15, 2022

Chanify is a safe and simple notification tools. This repository is command line tools for Chanify.

Chanify is a safe and simple notification tools. For developers, system administrators, and everyone can push notifications with API.

Dec 29, 2022

Tools - This subrepository holds the source for various packages and tools that support

Go Tools This subrepository holds the source for various packages and tools that

Jan 12, 2022

Mini audio library

malgo Go bindings for miniaudio library. Requires cgo but does not require linking to anything on the Windows/macOS and it links only -ldl on Linux/BS

Dec 31, 2022

DEPRECATED. Embeds mruby (mini Ruby) VM into Go.

GoMRuby Package gomruby embeds mruby (mini Ruby) VM into Go. Documentation. Installation It's slightly more than just go get: go get -d github.com/Ale

May 17, 2022
Database migrations. CLI and Golang library.

migrate Database migrations written in Go. Use as CLI or import as library. Migrate reads migrations from sources and applies them in correct order to

Dec 31, 2022
Database migrations. CLI and Golang library.

Database migrations written in Go. Use as CLI or import as library.

May 30, 2021
Migration - Commonly used migration tools

Migration Commonly used migration tools Usage package main import ( "context"

Feb 16, 2022
Migration - Commonly used migration tools

Migration Commonly used migration tools Usage package main import ( "context"

Feb 16, 2022
Database schema evolution library for Go

Try browsing the code on Sourcegraph! Darwin Database schema evolution library for Go Example package main import ( "database/sql" "log" "github.

Dec 5, 2022
Django style fixtures for Golang's excellent built-in database/sql library.

go-fixtures Django style fixtures for Golang's excellent built-in database/sql library. Currently only YAML fixtures are supported. There are two rese

Sep 26, 2022
Goose database migration tool - fork of https://bitbucket.org/liamstask/goose

goose Goose is a database migration tool. Manage your database schema by creating incremental SQL changes or Go functions. Goals of this fork github.c

Dec 30, 2022
Minimalistic database migration helper for Gorm ORM

Gormigrate Gormigrate is a minimalistic migration helper for Gorm. Gorm already has useful migrate functions, just misses proper schema versioning and

Dec 25, 2022
Dead simple Go database migration library.
Dead simple Go database migration library.

migrator Dead simple Go database migration library. Features Simple code Usage as a library, embeddable and extensible on your behalf Support of any d

Nov 9, 2022
goydb, a couchdb compatible embeddable database written in go
goydb, a couchdb compatible embeddable database written in go

goydb, a couchdb compatible embeddable database written in go Getting started (not embedded) Using docker mkdir data docker run -e GOYDB_ADMINS=admin:

Sep 14, 2022