-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: room advert available_from type (#439)
* write migration for changing available_from to a date * just to be sure the migration does not fail * even better * I suppose this is also needed * finally, figure out how to create a reversible migration * oke en nu is ie ook non-null 😄
- Loading branch information
1 parent
153319a
commit c18d2b4
Showing
3 changed files
with
10 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
db/migrate/20241018155243_update_room_adverts_available_from_string_to_date.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
class UpdateRoomAdvertsAvailableFromStringToDate < ActiveRecord::Migration[7.0] | ||
def change | ||
remove_column :room_adverts, :available_from, :string | ||
add_column :room_adverts, :available_from, :date | ||
change_column_null :room_adverts, :available_from, false | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters