Sha256: 86b1fa2e2d2f75f5e52ac300dd4ac2c93697e9fe4f6139e0e6ece116126334c3
Contents?: true
Size: 1013 Bytes
Versions: 15
Compression:
Stored size: 1013 Bytes
Contents
class AddNresultToPathologyObservations < ActiveRecord::Migration[5.2] def change within_renalware_schema do add_column( :pathology_observations, :nresult, :float, index: false, null: true, comment: "The result column cast to a float, for ease of using graphing and claculations."\ "Will be null if the result has a text value that cannot be coreced into a number" ) reversible do |direction| direction.up do load_function("update_pathology_observations_nresult_from_trigger_v01.sql") load_trigger("update_pathology_observations_nresult_trigger_v01.sql") end direction.down do connection.execute( "DROP TRIGGER IF EXISTS update_pathology_observations_nresult_trigger "\ "ON pathology_observations; "\ "DROP FUNCTION IF EXISTS update_pathology_observations_nresult_from_trigger();" ) end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems