-
-
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.
remove 'NULL' string units from measurements and sensors
- Loading branch information
1 parent
00bb823
commit 4f7553f
Showing
2 changed files
with
9 additions
and
1 deletion.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
db/migrate/20241113155952_remove_null_strings_from_measurement_units.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,8 @@ | ||
class RemoveNullStringsFromMeasurementUnits < ActiveRecord::Migration[6.1] | ||
def up | ||
execute "UPDATE measurements SET unit = NULL WHERE unit = 'NULL'" | ||
execute "UPDATE sensors SET unit = NULL WHERE unit = 'NULL'" | ||
end | ||
|
||
def down; 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