Skip to content

Commit

Permalink
migration to update all objects with a nil digitalobject_source (#1447)
Browse files Browse the repository at this point in the history
Co-authored-by: JP Engstrom <jpengstrom@macbook-pro.lan>
  • Loading branch information
JP Engstrom and JP Engstrom authored Oct 11, 2024
1 parent 5a041ae commit beaaa98
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions db/migrate/20241010160941_update_digital_object_source.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class UpdateDigitalObjectSource < ActiveRecord::Migration[7.0]
def change
ActiveRecord::Base.connection.execute("UPDATE parent_objects SET digital_object_source = 'None' WHERE digital_object_source IS NULL")
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[7.0].define(version: 2024_05_08_022339) do
ActiveRecord::Schema[7.0].define(version: 2024_10_10_160941) do
# These are extensions that must be enabled in order to support this database
enable_extension "pgcrypto"
enable_extension "plpgsql"
Expand Down

0 comments on commit beaaa98

Please sign in to comment.