iferr:=sess.Table("information_schema.sequences").Cols("sequence_name").Where("sequence_name LIKE 'tmp_recreate__%_id_seq%' AND sequence_catalog = ?",setting.Database.Name).Find(&sequences);err!=nil{
return0,err
}
sess.Engine().SetSchema(schema)
returnint64(len(sequences)),nil
}
// FixBadSequences fixes for broken sequences from recreate-table mistakes
iferr:=sess.Table("information_schema.sequences").Cols("sequence_name").Where("sequence_name LIKE 'tmp_recreate__%_id_seq%' AND sequence_catalog = ?",setting.Database.Name).Find(&sequences);err!=nil{