1 class RenameProjectsToGroups < ActiveRecord::Migration
3 rename_table :projects, :groups
4 rename_index :groups, :index_projects_on_created_at, :index_groups_on_created_at
5 rename_index :groups, :index_projects_on_modified_at, :index_groups_on_modified_at
6 rename_index :groups, :index_projects_on_uuid, :index_groups_on_uuid
7 Link.update_all({head_kind:'orvos#group'}, ['head_kind=?','orvos#project'])
8 Link.update_all({tail_kind:'orvos#group'}, ['tail_kind=?','orvos#project'])
9 Log.update_all({object_kind:'orvos#group'}, ['object_kind=?','orvos#project'])
13 Log.update_all({object_kind:'orvos#project'}, ['object_kind=?','orvos#group'])
14 Link.update_all({tail_kind:'orvos#project'}, ['tail_kind=?','orvos#group'])
15 Link.update_all({head_kind:'orvos#project'}, ['head_kind=?','orvos#group'])
16 rename_index :groups, :index_groups_on_created_at, :index_projects_on_created_at
17 rename_index :groups, :index_groups_on_modified_at, :index_projects_on_modified_at
18 rename_index :groups, :index_groups_on_uuid, :index_projects_on_uuid
19 rename_table :groups, :projects