Ok so I was able to solve this by checking information_schema.columns
table and verifing the id exists in the tables
if err := db.Table("information_schema.columns").
Where("column_name = ? AND table_name not in (?)", "id", excludeTables).
Pluck("table_name", &tableNames).
Error; err != nil {
return err
}