mirror of https://github.com/go-gorm/gorm.git
Document ModifyColumn, DropColumn
This commit is contained in:
parent
44ae41e9b5
commit
f6f66a60b2
|
@ -151,6 +151,12 @@ db.Set("gorm:table_options", "ENGINE=InnoDB").CreateTable(&User{})
|
||||||
// Drop table
|
// Drop table
|
||||||
db.DropTable(&User{})
|
db.DropTable(&User{})
|
||||||
|
|
||||||
|
// ModifyColumn
|
||||||
|
db.Model(&User{}).ModifyColumn("description", "text")
|
||||||
|
|
||||||
|
// DropColumn
|
||||||
|
db.Model(&User{}).DropColumn("description")
|
||||||
|
|
||||||
// Automating Migration
|
// Automating Migration
|
||||||
db.AutoMigrate(&User{})
|
db.AutoMigrate(&User{})
|
||||||
db.Set("gorm:table_options", "ENGINE=InnoDB").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
|
## TODO
|
||||||
* Github Pages
|
* Github Pages
|
||||||
* AlertColumn, DropColumn
|
|
||||||
|
|
||||||
# Author
|
# Author
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue