Skip to content

Commit f75aa2d

Browse files
committed
add migrations for dietary restrictions
separating out the migrations for dietary restrictions so we can apply these to production before deploying the code that makes use of the new columns.
1 parent c1deed3 commit f75aa2d

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
class CreateDietaryRestrictionEnum < ActiveRecord::Migration[7.1]
2+
def change
3+
create_enum :dietary_restriction_enum, %w[vegan vegetarian pescetarian halal gluten_free dairy_free other]
4+
end
5+
end
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
class AddDietaryRestrictionsToMembers < ActiveRecord::Migration[7.0]
2+
def change
3+
add_column :members, :dietary_restrictions, :enum, enum_type: "dietary_restriction_enum", array: true, default: []
4+
add_column :members, :other_dietary_restrictions, :string
5+
end
6+
end

0 commit comments

Comments
 (0)