diff --git a/.dassie/db/schema.rb b/.dassie/db/schema.rb index 1515b687c5..dbbe3b38d2 100644 --- a/.dassie/db/schema.rb +++ b/.dassie/db/schema.rb @@ -10,8 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2024_05_06_070809) do - +ActiveRecord::Schema[7.2].define(version: 2024_05_06_070809) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" enable_extension "uuid-ossp" @@ -22,8 +21,8 @@ t.string "document_id" t.string "document_type" t.binary "title" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["document_id"], name: "index_bookmarks_on_document_id" t.index ["user_id"], name: "index_bookmarks_on_user_id" end @@ -34,8 +33,8 @@ t.string "checked_uri" t.string "expected_result" t.string "actual_result" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.boolean "passed" t.index ["checked_uri"], name: "index_checksum_audit_logs_on_checked_uri" t.index ["file_set_id", "file_id"], name: "by_file_set_id_and_file_id" @@ -49,8 +48,8 @@ t.string "target_url" t.integer "height" t.integer "width" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false end create_table "collection_type_participants", force: :cascade do |t| @@ -58,16 +57,16 @@ t.string "agent_type" t.string "agent_id" t.string "access" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["hyrax_collection_type_id"], name: "hyrax_collection_type_id" end create_table "content_blocks", force: :cascade do |t| t.string "name" t.text "value" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.string "external_key" end @@ -84,8 +83,8 @@ t.integer "rgt", null: false t.integer "depth", default: 0, null: false t.integer "children_count", default: 0, null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["lft"], name: "index_curation_concerns_operations_on_lft" t.index ["parent_id"], name: "index_curation_concerns_operations_on_parent_id" t.index ["rgt"], name: "index_curation_concerns_operations_on_rgt" @@ -95,29 +94,29 @@ create_table "featured_works", force: :cascade do |t| t.integer "order", default: 5 t.string "work_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["order"], name: "index_featured_works_on_order" t.index ["work_id"], name: "index_featured_works_on_work_id" end create_table "file_download_stats", force: :cascade do |t| - t.datetime "date" + t.datetime "date", precision: nil t.integer "downloads" t.string "file_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.integer "user_id" t.index ["file_id"], name: "index_file_download_stats_on_file_id" t.index ["user_id"], name: "index_file_download_stats_on_user_id" end create_table "file_view_stats", force: :cascade do |t| - t.datetime "date" + t.datetime "date", precision: nil t.integer "views" t.string "file_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.integer "user_id" t.index ["file_id"], name: "index_file_view_stats_on_file_id" t.index ["user_id"], name: "index_file_view_stats_on_user_id" @@ -147,8 +146,8 @@ t.date "date" t.integer "total_item_investigations" t.integer "total_item_requests" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.string "title" t.integer "year_of_publication" t.string "publisher" @@ -161,15 +160,15 @@ create_table "hyrax_default_administrative_set", force: :cascade do |t| t.string "default_admin_set_id", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false end create_table "hyrax_features", force: :cascade do |t| t.string "key", null: false t.boolean "enabled", default: false, null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false end create_table "job_io_wrappers", force: :cascade do |t| @@ -180,8 +179,8 @@ t.string "original_name" t.string "path" t.string "relation" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["uploaded_file_id"], name: "index_job_io_wrappers_on_uploaded_file_id" t.index ["user_id"], name: "index_job_io_wrappers_on_user_id" end @@ -196,8 +195,8 @@ create_table "mailboxer_conversations", id: :serial, force: :cascade do |t| t.string "subject", default: "" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false end create_table "mailboxer_notifications", id: :serial, force: :cascade do |t| @@ -212,10 +211,10 @@ t.string "notified_object_type" t.integer "notified_object_id" t.string "attachment" - t.datetime "updated_at", null: false - t.datetime "created_at", null: false + t.datetime "updated_at", precision: nil, null: false + t.datetime "created_at", precision: nil, null: false t.boolean "global", default: false - t.datetime "expires" + t.datetime "expires", precision: nil t.index ["conversation_id"], name: "index_mailboxer_notifications_on_conversation_id" t.index ["notified_object_id", "notified_object_type"], name: "index_mailboxer_notifications_on_notified_object_id_and_type" t.index ["notified_object_type", "notified_object_id"], name: "mailboxer_notifications_notified_object" @@ -231,8 +230,8 @@ t.boolean "trashed", default: false t.boolean "deleted", default: false t.string "mailbox_type", limit: 25 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.boolean "is_delivered", default: false t.string "delivery_method" t.string "message_id" @@ -246,15 +245,15 @@ t.text "counters" t.bigint "seq", default: 0 t.binary "rand" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["namespace"], name: "index_minter_states_on_namespace", unique: true end create_table "orm_resources", id: :text, default: -> { "(uuid_generate_v4())::text" }, force: :cascade do |t| t.jsonb "metadata", default: {}, null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.string "internal_resource" t.integer "lock_version" t.index ["internal_resource"], name: "index_orm_resources_on_internal_resource" @@ -268,8 +267,8 @@ t.string "agent_type" t.string "agent_id" t.string "access" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["permission_template_id", "agent_id", "agent_type", "access"], name: "uk_permission_template_accesses", unique: true t.index ["permission_template_id"], name: "index_permission_template_accesses_on_permission_template_id" end @@ -277,8 +276,8 @@ create_table "permission_templates", force: :cascade do |t| t.string "source_id" t.string "visibility" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.date "release_date" t.string "release_period" t.index ["source_id"], name: "index_permission_templates_on_source_id", unique: true @@ -288,12 +287,12 @@ t.string "work_id", null: false t.bigint "sending_user_id", null: false t.bigint "receiving_user_id", null: false - t.datetime "fulfillment_date" + t.datetime "fulfillment_date", precision: nil t.string "status", default: "pending", null: false t.text "sender_comment" t.text "receiver_comment" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["receiving_user_id"], name: "index_proxy_deposit_requests_on_receiving_user_id" t.index ["sending_user_id"], name: "index_proxy_deposit_requests_on_sending_user_id" end @@ -301,16 +300,16 @@ create_table "proxy_deposit_rights", force: :cascade do |t| t.bigint "grantor_id" t.bigint "grantee_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["grantee_id"], name: "index_proxy_deposit_rights_on_grantee_id" t.index ["grantor_id"], name: "index_proxy_deposit_rights_on_grantor_id" end create_table "qa_local_authorities", force: :cascade do |t| t.string "name" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["name"], name: "index_qa_local_authorities_on_name", unique: true end @@ -318,8 +317,8 @@ t.bigint "local_authority_id" t.string "label" t.string "uri" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["local_authority_id"], name: "index_qa_local_authority_entries_on_local_authority_id" t.index ["uri"], name: "index_qa_local_authority_entries_on_uri", unique: true end @@ -328,8 +327,8 @@ t.binary "query_params" t.integer "user_id" t.string "user_type" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["user_id"], name: "index_searches_on_user_id" end @@ -337,16 +336,16 @@ t.string "download_key" t.string "path" t.string "item_id" - t.datetime "expires" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "expires", precision: nil + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false end create_table "sipity_agents", force: :cascade do |t| t.string "proxy_for_id", null: false t.string "proxy_for_type", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["proxy_for_id", "proxy_for_type"], name: "sipity_agents_proxy_for", unique: true end @@ -354,8 +353,8 @@ t.integer "entity_id", null: false t.integer "agent_id", null: false t.text "comment" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["agent_id"], name: "index_sipity_comments_on_agent_id" t.index ["created_at"], name: "index_sipity_comments_on_created_at" t.index ["entity_id"], name: "index_sipity_comments_on_entity_id" @@ -365,8 +364,8 @@ t.string "proxy_for_global_id", null: false t.integer "workflow_id", null: false t.integer "workflow_state_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["proxy_for_global_id"], name: "sipity_entities_proxy_for_global_id", unique: true t.index ["workflow_id"], name: "index_sipity_entities_on_workflow_id" t.index ["workflow_state_id"], name: "index_sipity_entities_on_workflow_state_id" @@ -376,8 +375,8 @@ t.integer "workflow_role_id", null: false t.integer "entity_id", null: false t.integer "agent_id", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["agent_id"], name: "sipity_entity_specific_responsibilities_agent" t.index ["entity_id"], name: "sipity_entity_specific_responsibilities_entity" t.index ["workflow_role_id", "entity_id", "agent_id"], name: "sipity_entity_specific_responsibilities_aggregate", unique: true @@ -389,8 +388,8 @@ t.string "scope_for_notification_type", null: false t.string "reason_for_notification", null: false t.integer "notification_id", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["notification_id"], name: "sipity_notifiable_contexts_notification_id" t.index ["scope_for_notification_id", "scope_for_notification_type", "reason_for_notification", "notification_id"], name: "sipity_notifiable_contexts_concern_surrogate", unique: true t.index ["scope_for_notification_id", "scope_for_notification_type", "reason_for_notification"], name: "sipity_notifiable_contexts_concern_context" @@ -401,8 +400,8 @@ t.integer "notification_id", null: false t.integer "role_id", null: false t.string "recipient_strategy", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["notification_id", "role_id", "recipient_strategy"], name: "sipity_notifications_recipients_surrogate" t.index ["notification_id"], name: "sipity_notification_recipients_notification" t.index ["recipient_strategy"], name: "sipity_notification_recipients_recipient_strategy" @@ -412,8 +411,8 @@ create_table "sipity_notifications", force: :cascade do |t| t.string "name", null: false t.string "notification_type", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["name"], name: "index_sipity_notifications_on_name", unique: true t.index ["notification_type"], name: "index_sipity_notifications_on_notification_type" end @@ -421,8 +420,8 @@ create_table "sipity_roles", force: :cascade do |t| t.string "name", null: false t.text "description" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["name"], name: "index_sipity_roles_on_name", unique: true end @@ -430,8 +429,8 @@ t.integer "workflow_id", null: false t.integer "resulting_workflow_state_id" t.string "name", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["resulting_workflow_state_id"], name: "sipity_workflow_actions_resulting_workflow_state" t.index ["workflow_id", "name"], name: "sipity_workflow_actions_aggregate", unique: true t.index ["workflow_id"], name: "sipity_workflow_actions_workflow" @@ -441,48 +440,48 @@ t.string "service_name", null: false t.integer "weight", null: false t.integer "workflow_action_id", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["workflow_action_id"], name: "index_sipity_workflow_methods_on_workflow_action_id" end create_table "sipity_workflow_responsibilities", force: :cascade do |t| t.integer "agent_id", null: false t.integer "workflow_role_id", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["agent_id", "workflow_role_id"], name: "sipity_workflow_responsibilities_aggregate", unique: true end create_table "sipity_workflow_roles", force: :cascade do |t| t.integer "workflow_id", null: false t.integer "role_id", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["workflow_id", "role_id"], name: "sipity_workflow_roles_aggregate", unique: true end create_table "sipity_workflow_state_action_permissions", force: :cascade do |t| t.integer "workflow_role_id", null: false t.integer "workflow_state_action_id", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["workflow_role_id", "workflow_state_action_id"], name: "sipity_workflow_state_action_permissions_aggregate", unique: true end create_table "sipity_workflow_state_actions", force: :cascade do |t| t.integer "originating_workflow_state_id", null: false t.integer "workflow_action_id", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["originating_workflow_state_id", "workflow_action_id"], name: "sipity_workflow_state_actions_aggregate", unique: true end create_table "sipity_workflow_states", force: :cascade do |t| t.integer "workflow_id", null: false t.string "name", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["name"], name: "index_sipity_workflow_states_on_name" t.index ["workflow_id", "name"], name: "sipity_type_state_aggregate", unique: true end @@ -491,8 +490,8 @@ t.string "name", null: false t.string "label" t.text "description" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.integer "permission_template_id" t.boolean "active" t.boolean "allows_access_grant" @@ -501,34 +500,34 @@ create_table "tinymce_assets", force: :cascade do |t| t.string "file" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false end create_table "trophies", force: :cascade do |t| t.integer "user_id" t.string "work_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false end create_table "uploaded_files", force: :cascade do |t| t.string "file" t.bigint "user_id" t.string "file_set_uri" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["file_set_uri"], name: "index_uploaded_files_on_file_set_uri" t.index ["user_id"], name: "index_uploaded_files_on_user_id" end create_table "user_stats", force: :cascade do |t| t.integer "user_id" - t.datetime "date" + t.datetime "date", precision: nil t.integer "file_views" t.integer "file_downloads" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.integer "work_views" t.index ["user_id"], name: "index_user_stats_on_user_id" end @@ -537,10 +536,10 @@ t.string "email", default: "", null: false t.string "encrypted_password", default: "", null: false t.string "reset_password_token" - t.datetime "reset_password_sent_at" - t.datetime "remember_created_at" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "reset_password_sent_at", precision: nil + t.datetime "remember_created_at", precision: nil + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.boolean "guest", default: false t.string "facebook_handle" t.string "twitter_handle" @@ -558,7 +557,7 @@ t.string "avatar_file_name" t.string "avatar_content_type" t.integer "avatar_file_size" - t.datetime "avatar_updated_at" + t.datetime "avatar_updated_at", precision: nil t.string "linkedin_handle" t.string "orcid" t.string "arkivo_token" @@ -575,16 +574,16 @@ t.string "datastream_id" t.string "version_id" t.string "committer_login" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false end create_table "work_view_stats", force: :cascade do |t| - t.datetime "date" + t.datetime "date", precision: nil t.integer "work_views" t.string "work_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.integer "user_id" t.index ["user_id"], name: "index_work_view_stats_on_user_id" t.index ["work_id"], name: "index_work_view_stats_on_work_id"