The migration tool sounds like the issue here, there is no way for Supabase to setup the permissions for you if the migration tool destroys the entire database. It is recommended you only change Schemas that belong to you. Don't modify or delete schemas created by Supabase like