migrations

package
v0.0.0-...-40c8b04 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2021 License: BSD-2-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InitTables = migrate.Migration{
	ID:   "20210427141925",
	Name: "Init DB",
	Migrate: func(tx *sqlx.Tx) error {
		if _, err := tx.Exec(`
		CREATE TABLE auth_key (
			id INT PRIMARY KEY AUTO_INCREMENT,
			key_id VARCHAR(255) UNIQUE,
			public_pem VARCHAR(3000),
			private_pem VARCHAR(3000),
			user_id VARCHAR(255)
		) ENGINE=INNODB;
		`); err != nil {
			return err
		}
		return nil
	},
	Rollback: func(tx *sqlx.Tx) error {
		return nil
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL