Document ModifyColumn, DropColumn

This commit is contained in:
Jinzhu 2015-08-19 22:47:38 +08:00
parent 44ae41e9b5
commit f6f66a60b2
1 changed files with 6 additions and 1 deletions

View File

@ -151,6 +151,12 @@ db.Set("gorm:table_options", "ENGINE=InnoDB").CreateTable(&User{})
// Drop table
db.DropTable(&User{})
// ModifyColumn
db.Model(&User{}).ModifyColumn("description", "text")
// DropColumn
db.Model(&User{}).DropColumn("description")
// Automating Migration
db.AutoMigrate(&User{})
db.Set("gorm:table_options", "ENGINE=InnoDB").AutoMigrate(&User{})
@ -1213,7 +1219,6 @@ db.Where("email = ?", "x@example.org").Attrs(User{RegisteredIp: "111.111.111.111
## TODO
* Github Pages
* AlertColumn, DropColumn
# Author