Closed GabrielLidenor closed 5 years ago
Create a migration to call a Task.
The Task should create a SQL function called exc
Create another migration to call a Task
The Task should use the function to loop in all tables and change the owner to postgres.
OBS: I'm not using the REASSIGN command ( it does not work either)
To Change all the owners of all tables in all tenants
It only changes the main database tables (first tenant)
Database: Postgresql 10.5
Apartment version: 2.2.0
Apartment config (in config/initializers/apartment.rb or so):
config/initializers/apartment.rb
use_schemas
false
Rails (or ActiveRecord) version: 5.2.0
Ruby version: 2.5.1p57
Steps to reproduce
Create a migration to call a Task.
The Task should create a SQL function called exc
Create another migration to call a Task
The Task should use the function to loop in all tables and change the owner to postgres.
OBS: I'm not using the REASSIGN command ( it does not work either)
Expected behavior
To Change all the owners of all tables in all tenants
Actual behavior
It only changes the main database tables (first tenant)
System configuration
Database: Postgresql 10.5
Apartment version: 2.2.0
Apartment config (in
config/initializers/apartment.rb
or so):use_schemas
:false
Rails (or ActiveRecord) version: 5.2.0
Ruby version: 2.5.1p57