1 class RenamePipelinesToPipelineTemplates < ActiveRecord::Migration
3 rename_column :pipeline_instances, :pipeline_uuid, :pipeline_template_uuid
4 rename_table :pipelines, :pipeline_templates
5 rename_index :pipeline_templates, :index_pipelines_on_created_at, :index_pipeline_templates_on_created_at
6 rename_index :pipeline_templates, :index_pipelines_on_modified_at, :index_pipeline_templates_on_modified_at
7 rename_index :pipeline_templates, :index_pipelines_on_uuid, :index_pipeline_templates_on_uuid
8 Link.update_all({head_kind:'orvos#pipeline'}, ['head_kind=?','orvos#pipeline_template'])
9 Link.update_all({tail_kind:'orvos#pipeline'}, ['tail_kind=?','orvos#pipeline_template'])
10 Log.update_all({object_kind:'orvos#pipeline'}, ['object_kind=?','orvos#pipeline_template'])
14 Link.update_all({head_kind:'orvos#pipeline_template'}, ['head_kind=?','orvos#pipeline'])
15 Link.update_all({tail_kind:'orvos#pipeline_template'}, ['tail_kind=?','orvos#pipeline'])
16 Log.update_all({object_kind:'orvos#pipeline_template'}, ['object_kind=?','orvos#pipeline'])
17 rename_index :pipeline_templates, :index_pipeline_templates_on_created_at, :index_pipelines_on_created_at
18 rename_index :pipeline_templates, :index_pipeline_templates_on_modified_at, :index_pipelines_on_modified_at
19 rename_index :pipeline_templates, :index_pipeline_templates_on_uuid, :index_pipelines_on_uuid
20 rename_table :pipeline_templates, :pipelines
21 rename_column :pipeline_instances, :pipeline_template_uuid, :pipeline_uuid