aboutsummaryrefslogtreecommitdiffstats
path: root/db/migrate
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20180412095756_add_referentials_to_import_resources.rb5
-rw-r--r--db/migrate/20180430122530_add_import_compliance_control_sets_to_workgroups.rb5
-rw-r--r--db/migrate/20180507130455_add_owner_to_workgroups.rb7
-rw-r--r--db/migrate/20180509071833_remove_deprected_fields_from_workbenches.rb6
-rw-r--r--db/migrate/20180517190722_alter_import_resource_referential_id.rb5
5 files changed, 28 insertions, 0 deletions
diff --git a/db/migrate/20180412095756_add_referentials_to_import_resources.rb b/db/migrate/20180412095756_add_referentials_to_import_resources.rb
new file mode 100644
index 000000000..8d4ccc095
--- /dev/null
+++ b/db/migrate/20180412095756_add_referentials_to_import_resources.rb
@@ -0,0 +1,5 @@
+class AddReferentialsToImportResources < ActiveRecord::Migration
+ def change
+ add_reference :import_resources, :referential, type: :bigint, index: true, foreign_key: true unless column_exists? :import_resources, :referential_id
+ end
+end
diff --git a/db/migrate/20180430122530_add_import_compliance_control_sets_to_workgroups.rb b/db/migrate/20180430122530_add_import_compliance_control_sets_to_workgroups.rb
new file mode 100644
index 000000000..2fc7c8e3f
--- /dev/null
+++ b/db/migrate/20180430122530_add_import_compliance_control_sets_to_workgroups.rb
@@ -0,0 +1,5 @@
+class AddImportComplianceControlSetsToWorkgroups < ActiveRecord::Migration
+ def change
+ add_column :workgroups, :import_compliance_control_set_ids, :integer, array: true, default: []
+ end
+end
diff --git a/db/migrate/20180507130455_add_owner_to_workgroups.rb b/db/migrate/20180507130455_add_owner_to_workgroups.rb
new file mode 100644
index 000000000..2ed601492
--- /dev/null
+++ b/db/migrate/20180507130455_add_owner_to_workgroups.rb
@@ -0,0 +1,7 @@
+class AddOwnerToWorkgroups < ActiveRecord::Migration
+ def change
+ add_column :workgroups, :owner_id, :bigint
+ add_column :workbenches, :owner_compliance_control_set_ids, :hstore
+ remove_column :workgroups, :import_compliance_control_set_ids
+ end
+end
diff --git a/db/migrate/20180509071833_remove_deprected_fields_from_workbenches.rb b/db/migrate/20180509071833_remove_deprected_fields_from_workbenches.rb
new file mode 100644
index 000000000..0ef056914
--- /dev/null
+++ b/db/migrate/20180509071833_remove_deprected_fields_from_workbenches.rb
@@ -0,0 +1,6 @@
+class RemoveDeprectedFieldsFromWorkbenches < ActiveRecord::Migration
+ def change
+ remove_column :workbenches, :import_compliance_control_set_id, :bigint
+ remove_column :workbenches, :merge_compliance_control_set_id, :bigint
+ end
+end
diff --git a/db/migrate/20180517190722_alter_import_resource_referential_id.rb b/db/migrate/20180517190722_alter_import_resource_referential_id.rb
new file mode 100644
index 000000000..2570ff640
--- /dev/null
+++ b/db/migrate/20180517190722_alter_import_resource_referential_id.rb
@@ -0,0 +1,5 @@
+class AlterImportResourceReferentialId < ActiveRecord::Migration
+ def change
+ change_column :import_resources, :referential_id, :bigint
+ end
+end