summary history files

db/migrations/bindata.go
// Code generated by go-bindata. DO NOT EDIT.
// sources:
// 000001_init.down.sql
// 000001_init.up.sql
// migrations.go
package migrations

import (
	"bytes"
	"compress/gzip"
	"fmt"
	"io"
	"io/ioutil"
	"os"
	"path/filepath"
	"strings"
	"time"
)

func bindataRead(data []byte, name string) ([]byte, error) {
	gz, err := gzip.NewReader(bytes.NewBuffer(data))
	if err != nil {
		return nil, fmt.Errorf("Read %q: %v", name, err)
	}

	var buf bytes.Buffer
	_, err = io.Copy(&buf, gz)
	clErr := gz.Close()

	if err != nil {
		return nil, fmt.Errorf("Read %q: %v", name, err)
	}
	if clErr != nil {
		return nil, err
	}

	return buf.Bytes(), nil
}

type asset struct {
	bytes []byte
	info  os.FileInfo
}

type bindataFileInfo struct {
	name    string
	size    int64
	mode    os.FileMode
	modTime time.Time
}

func (fi bindataFileInfo) Name() string {
	return fi.name
}
func (fi bindataFileInfo) Size() int64 {
	return fi.size
}
func (fi bindataFileInfo) Mode() os.FileMode {
	return fi.mode
}
func (fi bindataFileInfo) ModTime() time.Time {
	return fi.modTime
}
func (fi bindataFileInfo) IsDir() bool {
	return false
}
func (fi bindataFileInfo) Sys() interface{} {
	return nil
}

var __000001_initDownSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x72\x09\xf2\x0f\x50\x08\x71\x74\xf2\x71\x55\xf0\x74\x53\x70\x8d\xf0\x0c\x0e\x09\x56\x28\x28\x89\xcf\x48\x2c\xce\xb0\xe6\xc2\x25\x9b\x9b\x5a\x92\x18\x9f\x9d\x5a\x89\x5f\x85\x35\x17\x20\x00\x00\xff\xff\xda\x20\xc3\x89\x5e\x00\x00\x00")

func _000001_initDownSqlBytes() ([]byte, error) {
	return bindataRead(
		__000001_initDownSql,
		"000001_init.down.sql",
	)
}

func _000001_initDownSql() (*asset, error) {
	bytes, err := _000001_initDownSqlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "000001_init.down.sql", size: 94, mode: os.FileMode(420), modTime: time.Unix(1662689231, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var __000001_initUpSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x94\x91\x41\xaa\x83\x30\x10\x86\xf7\x39\xc5\x2c\x0d\x78\x83\xb7\xf2\xc9\x28\xa1\x36\xb6\x31\x82\xae\x24\xd0\x14\x45\x2d\x85\xda\x82\xb7\x2f\x31\x8d\xb8\xb0\x52\xb7\x33\xdf\x3f\xf9\x32\x13\x0a\x0c\x24\x82\x0c\xfe\x13\x24\x2c\x02\x9e\x4a\xc0\x82\x65\x32\x83\x5a\x3d\x6a\xe2\x11\x00\x80\xe6\x02\x8c\x4b\x8c\x51\x4c\x00\xcf\x93\x04\x4e\x82\x1d\x03\x51\xc2\x01\x4b\x7f\x82\x0c\x0f\x12\x0b\x39\x33\xb6\x7e\x6d\x3a\x7d\x57\xc3\x6a\x2f\xe7\xec\x9c\x23\x78\x26\xeb\xcf\x24\x25\xf4\x8f\x90\x0d\xb5\x5e\x0f\xaa\x6a\xf5\xb8\x47\xaf\xd5\x63\x75\x53\xbd\xde\xd2\x70\xcc\x4f\x02\x7b\x77\x53\xad\x90\xb6\xeb\xbe\xf3\x9d\x78\xa9\xee\xb9\x69\xfe\x79\xc0\x5f\xce\xa2\x16\x89\x52\x81\x2c\xe6\x46\xc6\x61\x14\x04\x46\x28\x90\x87\x68\xef\xec\xad\xd2\xcb\x59\xcb\x84\xab\x9b\x94\xd9\xd4\x3b\x00\x00\xff\xff\x56\x88\x4d\x27\x45\x02\x00\x00")

func _000001_initUpSqlBytes() ([]byte, error) {
	return bindataRead(
		__000001_initUpSql,
		"000001_init.up.sql",
	)
}

func _000001_initUpSql() (*asset, error) {
	bytes, err := _000001_initUpSqlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "000001_init.up.sql", size: 581, mode: os.FileMode(420), modTime: time.Unix(1662708447, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _migrationsGo = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x94\x90\x3d\x8f\xd4\x30\x10\x86\x6b\xcf\xaf\x18\x52\x9c\x6c\x69\x2f\x2e\xa0\x02\x5d\x01\x84\x02\x09\xb6\x38\x74\xa2\x40\xe8\xe4\x64\x27\x5e\x8b\xc4\x0e\x63\x07\x84\xd0\xfe\x77\x14\xe7\x83\x08\x51\xec\xa5\x89\xc6\x7a\xe7\x79\x46\xef\x60\x9a\x6f\xc6\x12\xf6\xce\xb2\x49\x2e\xf8\x08\xe0\xfa\x21\x70\x42\x09\xa2\xb0\x2e\x9d\xc7\xba\x6c\x42\xaf\x6d\xe8\x8c\xb7\xb7\x73\x90\xf4\xfa\xff\xf1\xa2\x00\xf1\x88\x57\x25\xf5\xc9\x24\x53\x9b\x48\x3a\x7e\xef\x5c\xa2\xe7\x05\x6a\xed\x43\xe7\x7c\xba\x9e\x11\xc3\xc8\x0d\xe9\xd6\x75\x54\x60\xfe\xfe\x32\x6a\xe7\x27\xc5\xd3\x48\x36\x3c\x2e\x7b\x05\x28\x00\xad\xb1\x0a\x1f\xe7\x54\x55\xe3\x40\xdc\x06\xee\x23\x56\x6f\x76\x25\x95\xd0\x8e\xbe\xd9\x07\xe5\xa9\x7e\xb8\xff\x80\x31\xb1\xf3\x56\x21\x31\x07\xc6\xdf\x20\x98\x66\x4d\xc4\x97\x77\xb8\x78\xca\xfb\xe5\x51\xbe\x8e\x91\xd2\xd1\xf4\x14\xa5\x3a\x80\x10\x13\x55\x7a\xd3\xd3\x06\x92\x5f\xbe\xd6\xbf\x12\x1d\x66\xa2\x9a\x90\x42\x30\xa5\x91\x3d\xe6\xed\x1c\x57\x20\xc4\x45\x01\x88\xed\xc4\xca\x24\x93\x97\xf6\xde\xcf\x2e\x9d\xdf\xfb\x98\x8c\x6f\x48\x6e\x97\x29\x10\xae\xcd\xd1\x67\x77\xe8\x5d\x97\x1d\x8b\x82\x98\x41\x5c\x26\xf0\x06\x5b\x1a\x2c\x8f\xf4\x73\xe2\x7d\xca\x90\x8d\x5a\xd8\x70\xbb\xd6\x79\xc0\x7f\xce\xc9\x1d\x5d\xa5\x5b\x12\x93\xae\x7c\x18\xa4\x7a\xb5\x5f\xb8\xb9\x59\xa7\xf5\x96\x77\xcc\xc7\xf0\xf6\x6c\xbc\xa5\xff\xe0\xd6\xd1\xbb\x0e\x2e\xf0\x27\x00\x00\xff\xff\x21\x84\xf6\xe9\xf3\x02\x00\x00")

func migrationsGoBytes() ([]byte, error) {
	return bindataRead(
		_migrationsGo,
		"migrations.go",
	)
}

func migrationsGo() (*asset, error) {
	bytes, err := migrationsGoBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "migrations.go", size: 755, mode: os.FileMode(420), modTime: time.Unix(1659302231, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

// Asset loads and returns the asset for the given name.
// It returns an error if the asset could not be found or
// could not be loaded.
func Asset(name string) ([]byte, error) {
	cannonicalName := strings.Replace(name, "\\", "/", -1)
	if f, ok := _bindata[cannonicalName]; ok {
		a, err := f()
		if err != nil {
			return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err)
		}
		return a.bytes, nil
	}
	return nil, fmt.Errorf("Asset %s not found", name)
}

// MustAsset is like Asset but panics when Asset would return an error.
// It simplifies safe initialization of global variables.
func MustAsset(name string) []byte {
	a, err := Asset(name)
	if err != nil {
		panic("asset: Asset(" + name + "): " + err.Error())
	}

	return a
}

// AssetInfo loads and returns the asset info for the given name.
// It returns an error if the asset could not be found or
// could not be loaded.
func AssetInfo(name string) (os.FileInfo, error) {
	cannonicalName := strings.Replace(name, "\\", "/", -1)
	if f, ok := _bindata[cannonicalName]; ok {
		a, err := f()
		if err != nil {
			return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err)
		}
		return a.info, nil
	}
	return nil, fmt.Errorf("AssetInfo %s not found", name)
}

// AssetNames returns the names of the assets.
func AssetNames() []string {
	names := make([]string, 0, len(_bindata))
	for name := range _bindata {
		names = append(names, name)
	}
	return names
}

// _bindata is a table, holding each asset generator, mapped to its name.
var _bindata = map[string]func() (*asset, error){
	"000001_init.down.sql": _000001_initDownSql,
	"000001_init.up.sql": _000001_initUpSql,
	"migrations.go": migrationsGo,
}

// AssetDir returns the file names below a certain
// directory embedded in the file by go-bindata.
// For example if you run go-bindata on data/... and data contains the
// following hierarchy:
//     data/
//       foo.txt
//       img/
//         a.png
//         b.png
// then AssetDir("data") would return []string{"foo.txt", "img"}
// AssetDir("data/img") would return []string{"a.png", "b.png"}
// AssetDir("foo.txt") and AssetDir("notexist") would return an error
// AssetDir("") will return []string{"data"}.
func AssetDir(name string) ([]string, error) {
	node := _bintree
	if len(name) != 0 {
		cannonicalName := strings.Replace(name, "\\", "/", -1)
		pathList := strings.Split(cannonicalName, "/")
		for _, p := range pathList {
			node = node.Children[p]
			if node == nil {
				return nil, fmt.Errorf("Asset %s not found", name)
			}
		}
	}
	if node.Func != nil {
		return nil, fmt.Errorf("Asset %s not found", name)
	}
	rv := make([]string, 0, len(node.Children))
	for childName := range node.Children {
		rv = append(rv, childName)
	}
	return rv, nil
}

type bintree struct {
	Func     func() (*asset, error)
	Children map[string]*bintree
}
var _bintree = &bintree{nil, map[string]*bintree{
	"000001_init.down.sql": &bintree{_000001_initDownSql, map[string]*bintree{}},
	"000001_init.up.sql": &bintree{_000001_initUpSql, map[string]*bintree{}},
	"migrations.go": &bintree{migrationsGo, map[string]*bintree{}},
}}

// RestoreAsset restores an asset under the given directory
func RestoreAsset(dir, name string) error {
	data, err := Asset(name)
	if err != nil {
		return err
	}
	info, err := AssetInfo(name)
	if err != nil {
		return err
	}
	err = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0755))
	if err != nil {
		return err
	}
	err = ioutil.WriteFile(_filePath(dir, name), data, info.Mode())
	if err != nil {
		return err
	}
	err = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())
	if err != nil {
		return err
	}
	return nil
}

// RestoreAssets restores an asset under the given directory recursively
func RestoreAssets(dir, name string) error {
	children, err := AssetDir(name)
	// File
	if err != nil {
		return RestoreAsset(dir, name)
	}
	// Dir
	for _, child := range children {
		err = RestoreAssets(dir, filepath.Join(name, child))
		if err != nil {
			return err
		}
	}
	return nil
}

func _filePath(dir, name string) string {
	cannonicalName := strings.Replace(name, "\\", "/", -1)
	return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...)
}