Class: ViewOrdersOriginFact

Inherits:
ApplicationViewRecord show all
Defined in:
app/models/view_orders_origin_fact.rb

Overview

== Schema Information

Table name: view_orders_origin_facts
Database name: primary

id :bigint
code :integer
detail :text
opportunity_reception_type :string(255)
ord_date :date
order_reception_type :string(255)
report_grouping :string(255)
revenue_consolidated :decimal(8, 2)
company_id :integer
customer_id :integer
invoice_id :integer
order_id :integer
quote_id :integer

Indexes

index_view_orders_origin_facts_on_company_id (company_id)
index_view_orders_origin_facts_on_id (id) UNIQUE

Class Method Summary collapse

Methods inherited from ApplicationViewRecord

create, create!, #readonly?

Methods inherited from ApplicationRecord

ransackable_associations, ransackable_attributes, ransackable_scopes, ransortable_attributes, #to_relation

Methods included from Models::EventPublishable

#publish_event

Class Method Details

.refreshObject



26
27
28
# File 'app/models/view_orders_origin_fact.rb', line 26

def self.refresh
  Scenic.database.refresh_materialized_view(table_name, concurrently: true, cascade: false)
end