Skip to content

Commit

Permalink
Rename Tables and some changes for Showback Models
Browse files Browse the repository at this point in the history
  • Loading branch information
aljesusg committed Oct 18, 2017
1 parent 027e309 commit e4bda01
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, :snapshot_data

add_column :showback_data_views, :snapshot_context, :string
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 @@ -5958,16 +5958,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 @@ -5977,7 +5968,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
- snapshot_data
- snapshot_context
- start_time
- end_time
showback_envelopes:
- id
- name
- description
Expand All @@ -5990,6 +5993,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 @@ -6001,16 +6012,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 @@ -6029,14 +6040,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 e4bda01

Please sign in to comment.