diff --git a/db/migrate/20190227110801_remove_null_constraint_from_project_in_activities.rb b/db/migrate/20190227110801_remove_null_constraint_from_project_in_activities.rb new file mode 100644 index 000000000..b14b042f1 --- /dev/null +++ b/db/migrate/20190227110801_remove_null_constraint_from_project_in_activities.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +class RemoveNullConstraintFromProjectInActivities < ActiveRecord::Migration[5.1] + def change + change_column_null :activities, :project_id, :integer, true + end +end diff --git a/db/schema.rb b/db/schema.rb index f897df04c..390a26461 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: 20190213064847) do +ActiveRecord::Schema.define(version: 20190227110801) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -25,7 +25,7 @@ ActiveRecord::Schema.define(version: 20190213064847) do t.string "message" t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.bigint "project_id", null: false + t.bigint "project_id" t.bigint "experiment_id" t.string "subject_type" t.bigint "subject_id"