Skip to content

Commit fc17bb5

Browse files
committed
Generate AddLocationToJobApplications migration
1 parent 83d9f1e commit fc17bb5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
class AddLocationToJobApplications < ActiveRecord::Migration[7.1]
2+
def change
3+
add_column :job_applications, :location, :string, null: false, default: "remote"
4+
add_check_constraint :job_applications, "location IN ('remote', 'in office', 'hybrid')", name: "check_valid_location"
5+
end
6+
end

0 commit comments

Comments
 (0)