Documentation ¶
Index ¶
- func ExpectedVersion() int64
- func GetCurrentDBVersion(engine *xorm.Engine) (int64, error)
- func Migrate(debug bool, dbConf *data.Database, cacheConf *data.CacheConf, ...) error
- type AnswerV13
- type InitNeedUserInputData
- type Mentor
- type Migration
- type QuestionPostTime
- type QuestionV13
- type RevisionV14
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCurrentDBVersion ¶
GetCurrentDBVersion returns the current db version
Types ¶
type AnswerV13 ¶
type AnswerV13 struct { ID string `xorm:"not null pk autoincr BIGINT(20) id"` QuestionID string `xorm:"not null default 0 BIGINT(20) question_id"` UserID string `xorm:"not null default 0 BIGINT(20) INDEX user_id"` Status int `xorm:"not null default 1 INT(11) status"` Accepted int `xorm:"not null default 1 INT(11) adopted"` }
type InitNeedUserInputData ¶
type Mentor ¶
type Mentor struct { Done bool // contains filtered or unexported fields }
type Migration ¶
type Migration interface { Version() string Description() string Migrate(ctx context.Context, x *xorm.Engine) error ShouldCleanCache() bool }
Migration describes on migration from lower version to high version
func GetMigrations ¶
func GetMigrations() []Migration
type QuestionPostTime ¶
type QuestionPostTime struct { ID string `xorm:"not null pk BIGINT(20) id"` CreatedAt time.Time `xorm:"not null default CURRENT_TIMESTAMP TIMESTAMP created_at"` UpdatedAt time.Time `xorm:"updated_at TIMESTAMP"` UserID string `xorm:"not null default 0 BIGINT(20) INDEX user_id"` LastEditUserID string `xorm:"not null default 0 BIGINT(20) last_edit_user_id"` Title string `xorm:"not null default '' VARCHAR(150) title"` OriginalText string `xorm:"not null MEDIUMTEXT original_text"` ParsedText string `xorm:"not null MEDIUMTEXT parsed_text"` Status int `xorm:"not null default 1 INT(11) status"` Pin int `xorm:"not null default 1 INT(11) pin"` Show int `xorm:"not null default 1 INT(11) show"` ViewCount int `xorm:"not null default 0 INT(11) view_count"` UniqueViewCount int `xorm:"not null default 0 INT(11) unique_view_count"` VoteCount int `xorm:"not null default 0 INT(11) vote_count"` AnswerCount int `xorm:"not null default 0 INT(11) answer_count"` CollectionCount int `xorm:"not null default 0 INT(11) collection_count"` FollowCount int `xorm:"not null default 0 INT(11) follow_count"` AcceptedAnswerID string `xorm:"not null default 0 BIGINT(20) accepted_answer_id"` LastAnswerID string `xorm:"not null default 0 BIGINT(20) last_answer_id"` PostUpdateTime time.Time `xorm:"post_update_time TIMESTAMP"` RevisionID string `xorm:"not null default 0 BIGINT(20) revision_id"` }
func (QuestionPostTime) TableName ¶
func (QuestionPostTime) TableName() string
type QuestionV13 ¶
type QuestionV13 struct { ID string `xorm:"not null pk BIGINT(20) id"` CreatedAt time.Time `xorm:"not null default CURRENT_TIMESTAMP TIMESTAMP created_at"` UpdatedAt time.Time `xorm:"updated_at TIMESTAMP"` UserID string `xorm:"not null default 0 BIGINT(20) INDEX user_id"` InviteUserID string `xorm:"TEXT invite_user_id"` LastEditUserID string `xorm:"not null default 0 BIGINT(20) last_edit_user_id"` Title string `xorm:"not null default '' VARCHAR(150) title"` OriginalText string `xorm:"not null MEDIUMTEXT original_text"` ParsedText string `xorm:"not null MEDIUMTEXT parsed_text"` Status int `xorm:"not null default 1 INT(11) status"` Pin int `xorm:"not null default 1 INT(11) pin"` Show int `xorm:"not null default 1 INT(11) show"` ViewCount int `xorm:"not null default 0 INT(11) view_count"` UniqueViewCount int `xorm:"not null default 0 INT(11) unique_view_count"` VoteCount int `xorm:"not null default 0 INT(11) vote_count"` AnswerCount int `xorm:"not null default 0 INT(11) answer_count"` CollectionCount int `xorm:"not null default 0 INT(11) collection_count"` FollowCount int `xorm:"not null default 0 INT(11) follow_count"` AcceptedAnswerID string `xorm:"not null default 0 BIGINT(20) accepted_answer_id"` LastAnswerID string `xorm:"not null default 0 BIGINT(20) last_answer_id"` PostUpdateTime time.Time `xorm:"post_update_time TIMESTAMP"` RevisionID string `xorm:"not null default 0 BIGINT(20) revision_id"` }
func (QuestionV13) TableName ¶
func (QuestionV13) TableName() string
type RevisionV14 ¶
type RevisionV14 struct { ID string `xorm:"not null pk autoincr BIGINT(20) id"` CreatedAt time.Time `xorm:"created TIMESTAMP created_at"` UpdatedAt time.Time `xorm:"updated TIMESTAMP updated_at"` UserID string `xorm:"not null default 0 BIGINT(20) user_id"` ObjectType int `xorm:"not null default 0 INT(11) object_type"` ObjectID string `xorm:"not null default 0 BIGINT(20) INDEX object_id"` Title string `xorm:"not null default '' VARCHAR(255) title"` Content string `xorm:"not null MEDIUMTEXT content"` Log string `xorm:"VARCHAR(255) log"` Status int `xorm:"not null default 1 INT(11) status"` ReviewUserID int64 `xorm:"not null default 0 BIGINT(20) review_user_id"` }
func (RevisionV14) TableName ¶
func (RevisionV14) TableName() string
Click to show internal directories.
Click to hide internal directories.