20210322164601_create_account_summaries.rb 344 B

1234567891011
  1. # frozen_string_literal: true
  2. class CreateAccountSummaries < ActiveRecord::Migration[5.2]
  3. def change
  4. create_view :account_summaries, materialized: true
  5. # To be able to refresh the view concurrently,
  6. # at least one unique index is required
  7. safety_assured { add_index :account_summaries, :account_id, unique: true }
  8. end
  9. end