column.go 509 B

1234567891011121314151617181920212223
  1. package migrator
  2. // Notice
  3. // code based on parts from from https://github.com/go-xorm/core/blob/3e0fa232ab5c90996406c0cd7ae86ad0e5ecf85f/column.go
  4. type Column struct {
  5. Name string
  6. Type string
  7. Length int
  8. Length2 int
  9. Nullable bool
  10. IsPrimaryKey bool
  11. IsAutoIncrement bool
  12. Default string
  13. }
  14. func (col *Column) String(d Dialect) string {
  15. return d.ColString(col)
  16. }
  17. func (col *Column) StringNoPk(d Dialect) string {
  18. return d.ColStringNoPk(col)
  19. }