Skip to content

Commit

Permalink
Merge pull request #96 from aljesusg/showback_chargeback_changes
Browse files Browse the repository at this point in the history
Rename Tables and some changes for Showback Models
  • Loading branch information
Fryguy authored Oct 27, 2017
2 parents 6d17aad + ed68ae6 commit 42aa87a
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 24 deletions.
27 changes: 27 additions & 0 deletions db/migrate/20171018081206_showback_fix_and_rename.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
class ShowbackFixAndRename < ActiveRecord::Migration[5.0]
def change
rename_table :showback_events, :showback_data_rollups
rename_table :showback_charges, :showback_data_views
rename_table :showback_pools, :showback_envelopes
rename_table :showback_usage_types, :showback_input_measures

rename_column :showback_data_views, :showback_event_id, :showback_data_rollup_id
rename_column :showback_data_views, :showback_pool_id, :showback_envelope_id

rename_column :showback_rates, :category, :entity
rename_column :showback_rates, :dimension, :field
rename_column :showback_rates, :measure, :group
rename_column :showback_rates, :step_variable, :tier_input_variable
rename_column :showback_rates, :date, :start_date

rename_column :showback_input_measures, :category, :entity
rename_column :showback_input_measures, :dimensions, :fields
rename_column :showback_input_measures, :measure, :group

rename_column :showback_data_views, :stored_data, :data_snapshot

add_column :showback_data_views, :context_snapshot, :jsonb
add_column :showback_data_views, :start_time, :timestamp
add_column :showback_data_views, :end_time, :timestamp
end
end
51 changes: 27 additions & 24 deletions db/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5967,16 +5967,7 @@ shares:
- allow_tenant_inheritance
- created_at
- updated_at
showback_charges:
- id
- cost_subunits
- cost_currency
- showback_pool_id
- showback_event_id
- created_at
- updated_at
- stored_data
showback_events:
showback_data_rollups:
- id
- data
- start_time
Expand All @@ -5986,7 +5977,19 @@ showback_events:
- context
- created_at
- updated_at
showback_pools:
showback_data_views:
- id
- cost_subunits
- cost_currency
- showback_envelope_id
- showback_data_rollup_id
- created_at
- updated_at
- data_snapshot
- context_snapshot
- start_time
- end_time
showback_envelopes:
- id
- name
- description
Expand All @@ -5999,6 +6002,14 @@ showback_pools:
- resource_id
- created_at
- updated_at
showback_input_measures:
- id
- entity
- description
- group
- fields
- created_at
- updated_at
showback_price_plans:
- id
- name
Expand All @@ -6010,16 +6021,16 @@ showback_price_plans:
showback_rates:
- id
- calculation
- category
- dimension
- entity
- field
- screener
- date
- start_date
- concept
- showback_price_plan_id
- created_at
- updated_at
- measure
- step_variable
- group
- tier_input_variable
- uses_single_tier
- tiers_use_full_value
showback_tiers:
Expand All @@ -6038,14 +6049,6 @@ showback_tiers:
- step_time_value
- step_unit
- showback_rate_id
showback_usage_types:
- id
- category
- description
- measure
- dimensions
- created_at
- updated_at
snapshots:
- id
- uid
Expand Down

0 comments on commit 42aa87a

Please sign in to comment.