31 lines
663 B
Go
31 lines
663 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"github.com/astaxie/beego/migration"
|
||
|
)
|
||
|
|
||
|
// DO NOT MODIFY
|
||
|
type CreateTemplate_20181112_134051 struct {
|
||
|
migration.Migration
|
||
|
}
|
||
|
|
||
|
// DO NOT MODIFY
|
||
|
func init() {
|
||
|
m := &CreateTemplate_20181112_134051{}
|
||
|
m.Created = "20181112_134051"
|
||
|
|
||
|
migration.Register("CreateTemplate_20181112_134051", m)
|
||
|
}
|
||
|
|
||
|
// Run the migrations
|
||
|
func (m *CreateTemplate_20181112_134051) Up() {
|
||
|
// use m.SQL("CREATE TABLE ...") to make schema update
|
||
|
m.SQL("CREATE DATABASE company_template;")
|
||
|
}
|
||
|
|
||
|
// Reverse the migrations
|
||
|
func (m *CreateTemplate_20181112_134051) Down() {
|
||
|
// use m.SQL("DROP TABLE ...") to reverse schema update
|
||
|
m.SQL("DROP DATABASE company_template;")
|
||
|
}
|