Categorygithub.com/atrox/go-migrate-rice
modulepackage
1.0.1
Repository: https://github.com/atrox/go-migrate-rice.git
Documentation: pkg.go.dev

# README

Rice Source Driver for golang-migrate/migrate

Installation

go get github.com/atrox/go-migrate-rice

Example

import (
	rice "github.com/GeertJohan/go.rice"
	migraterice "github.com/atrox/go-migrate-rice"
	"github.com/golang-migrate/migrate/v4"
	"github.com/golang-migrate/migrate/v4/database/postgres"
)

// get rice box
migrationsBox := rice.MustFindBox("migrations")

// create source driver with specified rice box
sourceDriver, _ := migraterice.WithInstance(migrationsBox)

// create database driver
dbDriver, _ := postgres.WithInstance(openDatabase(), &postgres.Config{})

// create migration instance
m, _ := migrate.NewWithInstance("rice", sourceDriver, "postgres", dbDriver)

// migrate
m.Up()

# Functions

No description provided by the author

# Structs

No description provided by the author