Documentation ¶
Index ¶
- Variables
- func Create(args []string)
- func CreateMigrationTableIfNotExist(db *sql.DB) (sql.Result, error)
- func GetSQLDriver(driver string) string
- func Init()
- func Migrate(args []string)
- func NewMigrationRecord() *migrationRecord
- func Status(args []string)
- func ValidateDbDriver(inputDriver string) bool
- func ValidateMigrationFilePaths(paths []string) []migrationFile
- type ValidData
Constants ¶
This section is empty.
Variables ¶
View Source
var ACTION = 3
View Source
var DB_URL = 2
View Source
var DRIVER = 1
argument indexes
View Source
var MIGRATION = 1
argument indexes
View Source
var QUERY_ALL_MIGRATIONS = `SELECT * FROM _gograte_db_versions ORDER BY created_at ASC;`
View Source
var QUERY_APPLIED_MIGRATIONS = `SELECT * FROM _gograte_db_versions WHERE is_applied = true ORDER BY created_at DESC;`
View Source
var QUERY_NON_APPLIED_MIGRATIONS = `SELECT * FROM _gograte_db_versions WHERE is_applied = false ORDER BY created_at ASC;`
View Source
var QUERY_ONE_APPLIED_MIGRATION = `SELECT * FROM _gograte_db_versions WHERE is_applied = true ORDER BY created_at DESC LIMIT 1;`
View Source
var UsageMessage = `` /* 1144-byte string literal not displayed */
View Source
var VERSION = 4
Functions ¶
func GetSQLDriver ¶
func NewMigrationRecord ¶
func NewMigrationRecord() *migrationRecord
func ValidateDbDriver ¶
func ValidateMigrationFilePaths ¶
func ValidateMigrationFilePaths(paths []string) []migrationFile
Types ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.