Module: Cms::Upgrades::V3_4_0::SchemaStatements

Defined in:
lib/cms/upgrades/v3_4_0.rb

Instance Method Summary collapse

Instance Method Details

#standardize_version_id_column(model_name) ⇒ Object



24
25
26
# File 'lib/cms/upgrades/v3_4_0.rb', line 24

def standardize_version_id_column(model_name)
  rename_column(prefix("#{model_name}_versions"), "#{model_name}_id", :original_record_id) if column_exists?(prefix("#{model_name}_versions"), "#{model_name}_id")
end