From f6f66a60b25aaafa6a43a788e2233a8ea5440a72 Mon Sep 17 00:00:00 2001 From: Jinzhu Date: Wed, 19 Aug 2015 22:47:38 +0800 Subject: [PATCH] Document ModifyColumn, DropColumn --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9848e261..14b041e0 100644 --- a/README.md +++ b/README.md @@ -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