// Add method adds a migration to the DBMigrator
Add method adds a migration to the DBMigrator
// Add method adds a migration to the DBMigrator
func Add(i api.Migration) {
	item := i.CoreMigration()
	if _, ok := ms[item.ID]; ok {
		errs = append(errs, errors.Wrapf(api.ErrDuplicate, "Duplicate migration ID: %v", item.ID))
		return
	}
	if err := item.Validate(); err != nil {
		errs = append(errs, errors.Wrapf(err, "Invalid migration #%v", item.ID))
		return
	}
	ms[item.ID] = *item
}
func Add ( i api . Migration ) { item := i . CoreMigration ( ) if _ , ok := ms [ item . ID ] ; ok { errs = append ( errs , errors . Wrapf ( api . ErrDuplicate , " " , item . ID ) ) return } if err := item . Validate ( ) ; err != nil { errs = append ( errs , errors . Wrapf ( err , " " , item . ID ) ) return } ms [ item . ID ] = * item }
Add method adds a migration to the DBMigrator
Add method adds a migration to the DBMigrator