I am building a multitenant application using the Apartment gem. I have the core features that will be common across all tenants. But now I want to add a table the schema for TenantB that will not be in the schema for TenantA. If I do the following it adds the table to able tenants.
class CreateStickies < ActiveRecord::Migration[5.0]
def change
if table_exists? :tenantb
create_table :post do |t|
t.text :body
t.string :title
t.timestamps
end
end
end
end
How can I add this Posts table to my tenant(s) of choice?