From 63c15eaf25629a3de6c860e290fd01be45e6567b Mon Sep 17 00:00:00 2001 From: Splines Date: Mon, 30 Oct 2023 17:07:29 +0100 Subject: [PATCH] Add null constraint to category in original migration --- db/migrate/20221015114100_create_annotations.rb | 2 +- ...28113531_add_category_not_null_contraint_to_annotation.rb | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) delete mode 100644 db/migrate/20231028113531_add_category_not_null_contraint_to_annotation.rb diff --git a/db/migrate/20221015114100_create_annotations.rb b/db/migrate/20221015114100_create_annotations.rb index 02bbd65bc..e22f4365d 100644 --- a/db/migrate/20221015114100_create_annotations.rb +++ b/db/migrate/20221015114100_create_annotations.rb @@ -5,7 +5,7 @@ def change t.references :user, null: false, foreign_key: true t.text :timestamp, null: false t.text :comment - t.integer :category + t.integer :category, null: false t.boolean :visible_for_teacher t.string :color t.integer :public_comment_id diff --git a/db/migrate/20231028113531_add_category_not_null_contraint_to_annotation.rb b/db/migrate/20231028113531_add_category_not_null_contraint_to_annotation.rb deleted file mode 100644 index f815562cb..000000000 --- a/db/migrate/20231028113531_add_category_not_null_contraint_to_annotation.rb +++ /dev/null @@ -1,5 +0,0 @@ -class AddCategoryNotNullContraintToAnnotation < ActiveRecord::Migration[7.0] - def change - change_column_null :annotations, :category, false - end -end