renamed remotes table to providers table
fixed down migration error due to table constraints
determine the provider table name only once