feat: migrator support table comment

This commit is contained in:
John Mai 2023-04-11 00:01:19 +08:00
parent b444011d09
commit 97e2cc11da
2 changed files with 6 additions and 0 deletions

View File

@ -76,6 +76,7 @@ type Migrator interface {
HasTable(dst interface{}) bool
RenameTable(oldName, newName interface{}) error
GetTables() (tableList []string, err error)
GetTableComment(tableName string) (comment string, err error)
// Columns
AddColumn(dst interface{}, field string) error

View File

@ -947,3 +947,8 @@ func (m Migrator) GetIndexes(dst interface{}) ([]gorm.Index, error) {
func (m Migrator) GetTypeAliases(databaseTypeName string) []string {
return nil
}
// GetTableComment return table comment
func (m Migrator) GetTableComment(tableName string) (string, error) {
return "", errors.New("not support")
}