Skip to content

Commit

Permalink
remove 'NULL' string units from measurements and sensors
Browse files Browse the repository at this point in the history
  • Loading branch information
timcowlishaw committed Nov 13, 2024
1 parent 00bb823 commit 4f7553f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
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
2 changes: 1 addition & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 2024_10_14_052837) do
ActiveRecord::Schema.define(version: 2024_11_13_155952) do

# These are extensions that must be enabled in order to support this database
enable_extension "adminpack"
Expand Down

0 comments on commit 4f7553f

Please sign in to comment.