1 Star 2 Fork 3

kristas/booting-go

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
flyway_schema_history.go 1.82 KB
一键复制 编辑 原始数据 按行查看 历史
kristas 提交于 2021-10-19 09:52 . !3merge v1.4.1
package model
import (
"time"
)
// FlywaySchemaHistory [...]
type FlywaySchemaHistory struct {
InstalledRank int `gorm:"primaryKey;column:installed_rank;type:int;not null" json:"installed_rank"`
Version string `gorm:"column:version;type:varchar(50)" json:"version"`
Description string `gorm:"column:description;type:varchar(200);not null" json:"description"`
Type string `gorm:"column:type;type:varchar(20);not null" json:"type"`
Script string `gorm:"column:script;type:varchar(1000);not null" json:"script"`
Checksum string `gorm:"column:checksum;type:varchar(50)" json:"checksum"`
InstalledBy string `gorm:"column:installed_by;type:varchar(100);not null" json:"installed_by"`
InstalledOn time.Time `gorm:"column:installed_on;type:timestamp;not null;default:CURRENT_TIMESTAMP" json:"installed_on"`
ExecutionTime int `gorm:"column:execution_time;type:int;not null" json:"execution_time"`
Success bool `gorm:"index:flyway_schema_history_s_idx;column:success;type:tinyint(1);not null" json:"success"`
}
// TableName get sql table name.获取数据库表名
func (m *FlywaySchemaHistory) TableName() string {
return "flyway_schema_history"
}
// FlywaySchemaHistoryColumns get sql column name.获取数据库列名
var FlywaySchemaHistoryColumns = struct {
InstalledRank string
Version string
Description string
Type string
Script string
Checksum string
InstalledBy string
InstalledOn string
ExecutionTime string
Success string
}{
InstalledRank: "installed_rank",
Version: "version",
Description: "description",
Type: "type",
Script: "script",
Checksum: "checksum",
InstalledBy: "installed_by",
InstalledOn: "installed_on",
ExecutionTime: "execution_time",
Success: "success",
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/kristas/booting-go.git
git@gitee.com:kristas/booting-go.git
kristas
booting-go
booting-go
v1.4.2

搜索帮助