Skip to content

Commit

Permalink
Merge pull request #1018 from datacite/schema-4.5-r1
Browse files Browse the repository at this point in the history
Metadata 4.5 - Add field to dataset DB for new publisher_obj
  • Loading branch information
svogt0511 authored Oct 4, 2023
2 parents ee4b505 + 460f410 commit ba6e112
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
11 changes: 11 additions & 0 deletions db/migrate/20231004145109_add_publisher_obj_to_doi.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# frozen_string_literal: true

class AddPublisherObjToDoi < ActiveRecord::Migration[6.1]
def up
add_column :dataset, :publisher_obj, :json
end

def down
remove_column :dataset, :publisher_obj
end
end
3 changes: 2 additions & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 2023_01_23_122711) do
ActiveRecord::Schema.define(version: 2023_10_04_145109) do
create_table "active_storage_attachments", charset: "utf8mb4", force: :cascade do |t|
t.string "name", limit: 191, null: false
t.string "record_type", null: false
Expand Down Expand Up @@ -224,6 +224,7 @@
t.string "agency", limit: 191, default: "datacite"
t.string "type", limit: 16, default: "DataCiteDoi"
t.json "related_items"
t.json "publisher_obj"
t.index ["aasm_state"], name: "index_dataset_on_aasm_state"
t.index ["created", "indexed", "updated"], name: "index_dataset_on_created_indexed_updated"
t.index ["datacentre"], name: "FK5605B47847B5F5FF"
Expand Down

0 comments on commit ba6e112

Please sign in to comment.