Adding migrations
This commit is contained in:
30
database/migrations/20181112_131638_testMig.go
Normal file
30
database/migrations/20181112_131638_testMig.go
Normal file
@ -0,0 +1,30 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/astaxie/beego/migration"
|
||||
)
|
||||
|
||||
// DO NOT MODIFY
|
||||
type TestMig_20181112_131638 struct {
|
||||
migration.Migration
|
||||
}
|
||||
|
||||
// DO NOT MODIFY
|
||||
func init() {
|
||||
m := &TestMig_20181112_131638{}
|
||||
m.Created = "20181112_131638"
|
||||
|
||||
migration.Register("TestMig_20181112_131638", m)
|
||||
}
|
||||
|
||||
// Run the migrations
|
||||
func (m *TestMig_20181112_131638) Up() {
|
||||
// use m.SQL("CREATE TABLE ...") to make schema update
|
||||
|
||||
}
|
||||
|
||||
// Reverse the migrations
|
||||
func (m *TestMig_20181112_131638) Down() {
|
||||
// use m.SQL("DROP TABLE ...") to reverse schema update
|
||||
|
||||
}
|
Reference in New Issue
Block a user