From 6c9f9bf3130d143937e4adcef1cf1bb9f6899260 Mon Sep 17 00:00:00 2001 From: wangsongyan Date: Wed, 3 May 2017 20:16:46 +0800 Subject: [PATCH] =?UTF-8?q?column,table=E5=AE=9E=E4=BD=93=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=B3=A8=E9=87=8A=E5=B1=9E=E6=80=A7=20(#24)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- column.go | 2 ++ table.go | 1 + 2 files changed, 3 insertions(+) diff --git a/column.go b/column.go index c59d0102..d4d83145 100644 --- a/column.go +++ b/column.go @@ -37,6 +37,7 @@ type Column struct { SetOptions map[string]int DisableTimeZone bool TimeZone *time.Location // column specified time zone + Comment string } func NewColumn(name, fieldName string, sqlType SQLType, len1, len2 int, nullable bool) *Column { @@ -60,6 +61,7 @@ func NewColumn(name, fieldName string, sqlType SQLType, len1, len2 int, nullable IsVersion: false, DefaultIsEmpty: false, EnumOptions: make(map[string]int), + Comment: "", } } diff --git a/table.go b/table.go index e6f6a751..88199bed 100644 --- a/table.go +++ b/table.go @@ -22,6 +22,7 @@ type Table struct { Cacher Cacher StoreEngine string Charset string + Comment string } func (table *Table) Columns() []*Column {