aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--db/migrate/20170925154017_create_referential_suite_for_each_existing_workbench.rb12
-rw-r--r--db/schema.rb2
2 files changed, 13 insertions, 1 deletions
diff --git a/db/migrate/20170925154017_create_referential_suite_for_each_existing_workbench.rb b/db/migrate/20170925154017_create_referential_suite_for_each_existing_workbench.rb
new file mode 100644
index 000000000..530850a5a
--- /dev/null
+++ b/db/migrate/20170925154017_create_referential_suite_for_each_existing_workbench.rb
@@ -0,0 +1,12 @@
+class CreateReferentialSuiteForEachExistingWorkbench < ActiveRecord::Migration
+ def up
+ Workbench.where(output: nil).each do |workbench|
+ workbench.output = ReferentialSuite.create
+ workbench.save
+ end
+ end
+
+ def down
+ raise ActiveRecord::IrreversibleMigration
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index e7efce531..c95280051 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20170925123159) do
+ActiveRecord::Schema.define(version: 20170925154017) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"