source stringclasses 1
value | repo stringlengths 5 63 | repo_url stringlengths 24 82 | path stringlengths 5 167 | language stringclasses 1
value | license stringclasses 5
values | stars int64 10 51.4k | ref stringclasses 23
values | size_bytes int64 200 258k | text stringlengths 137 258k |
|---|---|---|---|---|---|---|---|---|---|
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20250826142440_create_bulkrax_entries.bulkrax.rb | Ruby | apache-2.0 | 197 | main | 492 | # This migration comes from bulkrax (originally 20190325183136)
class CreateBulkraxEntries < ActiveRecord::Migration[5.1]
def change
unless table_exists?(:bulkrax_entries)
create_table :bulkrax_entries do |t|
t.string :identifier
t.string :collection_id
t.string :type
t.refer... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20250826142445_create_bulkrax_exporter_runs.bulkrax.rb | Ruby | apache-2.0 | 197 | main | 579 | # This migration comes from bulkrax (originally 20190729134158)
class CreateBulkraxExporterRuns < ActiveRecord::Migration[5.1]
def change
unless table_exists?(:bulkrax_exporter_runs)
create_table :bulkrax_exporter_runs do |t|
t.references :exporter, foreign_key: { to_table: :bulkrax_exporters }
... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20210921150122_add_model_type_to_orm_resources.valkyrie_engine.rb | Ruby | apache-2.0 | 197 | main | 244 | # frozen_string_literal: true
# This migration comes from valkyrie_engine (originally 20170124135846)
class AddModelTypeToOrmResources < ActiveRecord::Migration[5.0]
def change
add_column :orm_resources, :resource_type, :string
end
end |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20250826142479_add_next_import_at_to_bulkrax_importers.bulkrax.rb | Ruby | apache-2.0 | 197 | main | 279 | # This migration comes from bulkrax (originally 20240916182823)
class AddNextImportAtToBulkraxImporters < ActiveRecord::Migration[5.1]
def change
add_column :bulkrax_importers, :next_import_at, :datetime unless column_exists?(:bulkrax_importers, :next_import_at)
end
end |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20210921150123_change_model_type_to_internal_model.valkyrie_engine.rb | Ruby | apache-2.0 | 197 | main | 262 | # frozen_string_literal: true
# This migration comes from valkyrie_engine (originally 20170531004548)
class ChangeModelTypeToInternalModel < ActiveRecord::Migration[5.1]
def change
rename_column :orm_resources, :resource_type, :internal_resource
end
end |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20250826142477_add_error_tracking_to_pending_relationships.bulkrax.rb | Ruby | apache-2.0 | 197 | main | 326 | # This migration comes from bulkrax (originally 20240823173525)
class AddErrorTrackingToPendingRelationships < ActiveRecord::Migration[5.1]
def change
add_column :bulkrax_pending_relationships, :status_message, :string, default: 'Pending' unless column_exists?(:bulkrax_pending_relationships, :status_message)
en... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20210911143586_add_missing_indices.mailboxer_engine.rb | Ruby | apache-2.0 | 197 | main | 971 | # This migration comes from mailboxer_engine (originally 20131206080417)
class AddMissingIndices < ActiveRecord::Migration[4.2]
def change
# We'll explicitly specify its name, as the auto-generated name is too long and exceeds 63
# characters limitation.
add_index :mailboxer_conversation_opt_outs, [:unsub... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20210911143587_add_delivery_tracking_info_to_mailboxer_receipts.mailboxer_engine.rb | Ruby | apache-2.0 | 197 | main | 371 | # This migration comes from mailboxer_engine (originally 20151103080417)
class AddDeliveryTrackingInfoToMailboxerReceipts < ActiveRecord::Migration[4.2]
def change
add_column :mailboxer_receipts, :is_delivered, :boolean, default: false
add_column :mailboxer_receipts, :delivery_method, :string
add_column :... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20211207172259_create_default_administrative_set.hyrax.rb | Ruby | apache-2.0 | 197 | main | 238 | class CreateDefaultAdministrativeSet < ActiveRecord::Migration[5.2]
def change
create_table :hyrax_default_administrative_set do |t|
t.string :default_admin_set_id, null: false
t.timestamps null: false
end
end
end |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20210911143550_create_work_view_stats.hyrax.rb | Ruby | apache-2.0 | 197 | main | 280 | class CreateWorkViewStats < ActiveRecord::Migration[5.2]
def change
create_table :work_view_stats do |t|
t.datetime :date
t.integer :work_views
t.string :work_id
t.timestamps null: false
end
add_index :work_view_stats, :work_id
end
end |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20211021161136_user_roles.rb | Ruby | apache-2.0 | 197 | main | 427 | # frozen_string_literal: true
class UserRoles < ActiveRecord::Migration[5.0]
def up
create_table :roles do |t|
t.string :name
end
create_table :roles_users, id: false do |t|
t.references :role
t.references :user
end
add_index :roles_users, %i[role_id user_id]
add_index :role... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20210911143582_update_single_use_links_column_names.hyrax.rb | Ruby | apache-2.0 | 197 | main | 212 | class UpdateSingleUseLinksColumnNames < ActiveRecord::Migration[5.2]
def change
rename_column :single_use_links, :downloadKey, :download_key
rename_column :single_use_links, :itemId, :item_id
end
end |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20250826142476_add_file_name_to_uploaded_files.bulkrax.rb | Ruby | apache-2.0 | 197 | main | 283 | # This migration comes from bulkrax (originally 20240806161142)
class AddFileNameToUploadedFiles < ActiveRecord::Migration[5.2]
def change
add_column :uploaded_files, :filename, :string if table_exists?(:uploaded_files) && !column_exists?(:uploaded_files, :filename)
end
end |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20250826142444_create_bulkrax_exporters.bulkrax.rb | Ruby | apache-2.0 | 197 | main | 555 | # This migration comes from bulkrax (originally 20190729124607)
class CreateBulkraxExporters < ActiveRecord::Migration[5.1]
def change
unless table_exists?(:bulkrax_exporters)
create_table :bulkrax_exporters do |t|
t.string :name
t.references :user, foreign_key: false
t.string :parse... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20250826142478_add_last_imported_at_to_bulkrax_importers.bulkrax.rb | Ruby | apache-2.0 | 197 | main | 285 | # This migration comes from bulkrax (originally 20240916182737)
class AddLastImportedAtToBulkraxImporters < ActiveRecord::Migration[5.1]
def change
add_column :bulkrax_importers, :last_imported_at, :datetime unless column_exists?(:bulkrax_importers, :last_imported_at)
end
end |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20210911143430_create_searches.blacklight.rb | Ruby | apache-2.0 | 197 | main | 389 | # frozen_string_literal: true
# This migration comes from blacklight (originally 20140202020201)
class CreateSearches < ActiveRecord::Migration[4.2]
def self.up
create_table :searches do |t|
t.binary :query_params
t.integer :user_id, index: true
t.string :user_type
t.timestamps null: fal... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20250826142438_create_bulkrax_importers.bulkrax.rb | Ruby | apache-2.0 | 197 | main | 522 | # This migration comes from bulkrax (originally 20181011230201)
class CreateBulkraxImporters < ActiveRecord::Migration[5.1]
def change
unless table_exists?(:bulkrax_importers)
create_table :bulkrax_importers do |t|
t.string :name
t.string :admin_set_id
t.references :user, foreign_key... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20210911143569_change_checksum_audit_log.hyrax.rb | Ruby | apache-2.0 | 197 | main | 551 | class ChangeChecksumAuditLog < ActiveRecord::Migration[5.2]
def change
rename_column :checksum_audit_logs, :version, :checked_uri
add_column :checksum_audit_logs, :passed, :boolean
reversible do |dir|
dir.up do
execute 'UPDATE checksum_audit_logs SET passed = (pass = 1)'
end
... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20250826142439_create_bulkrax_importer_runs.bulkrax.rb | Ruby | apache-2.0 | 197 | main | 599 | # This migration comes from bulkrax (originally 20181011230228)
class CreateBulkraxImporterRuns < ActiveRecord::Migration[5.1]
def change
unless table_exists?(:bulkrax_importer_runs)
create_table :bulkrax_importer_runs do |t|
t.references :importer, foreign_key: {to_table: :bulkrax_importers}
... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20210911143624_rename_minter_state_random_to_rand.noid_rails_engine.rb | Ruby | apache-2.0 | 197 | main | 244 | # frozen_string_literal: true
# This migration comes from noid_rails_engine (originally 20161021203429)
class RenameMinterStateRandomToRand < ActiveRecord::Migration[4.2]
def change
rename_column :minter_states, :random, :rand
end
end |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20250826142468_add_order_to_bulkrax_pending_relationships.bulkrax.rb | Ruby | apache-2.0 | 197 | main | 300 | # This migration comes from bulkrax (originally 20220303212810)
class AddOrderToBulkraxPendingRelationships < ActiveRecord::Migration[5.1]
def change
add_column :bulkrax_pending_relationships, :order, :integer, default: 0 unless column_exists?(:bulkrax_pending_relationships, :order)
end
end |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20210911143545_create_proxy_deposit_requests.hyrax.rb | Ruby | apache-2.0 | 197 | main | 469 | class CreateProxyDepositRequests < ActiveRecord::Migration[5.2]
def change
create_table :proxy_deposit_requests do |t|
t.string :generic_file_id, null: false
t.references :sending_user, null: false
t.references :receiving_user, null: false
t.datetime :fulfillment_date
t.string :statu... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20250826142462_change_bulkrax_statuses_error_message_column_type_to_text.bulkrax.rb | Ruby | apache-2.0 | 197 | main | 233 | # This migration comes from bulkrax (originally 20211004170708)
class ChangeBulkraxStatusesErrorMessageColumnTypeToText < ActiveRecord::Migration[5.1]
def change
change_column :bulkrax_statuses, :error_message, :text
end
end |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20210911143571_create_collection_types.hyrax.rb | Ruby | apache-2.0 | 197 | main | 668 | class CreateCollectionTypes < ActiveRecord::Migration[5.2]
def change
create_table :hyrax_collection_types do |t|
t.string :title
t.text :description
t.string :machine_id
t.boolean :nestable, null: false, default: true
t.boolean :discovery, null: false, default: true
t.boolean ... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20250826142441_add_status_to_entry.bulkrax.rb | Ruby | apache-2.0 | 197 | main | 486 | # This migration comes from bulkrax (originally 20190601221109)
class AddStatusToEntry < ActiveRecord::Migration[5.1]
def change
add_column :bulkrax_entries, :last_error, :text unless column_exists?(:bulkrax_entries, :last_error)
add_column :bulkrax_entries, :last_error_at, :datetime unless column_exists?(:bu... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20210911143585_add_conversation_optout.mailboxer_engine.rb | Ruby | apache-2.0 | 197 | main | 636 | # This migration comes from mailboxer_engine (originally 20131206080416)
class AddConversationOptout < ActiveRecord::Migration[4.2]
def self.up
create_table :mailboxer_conversation_opt_outs do |t|
t.references :unsubscriber, :polymorphic => true
t.references :conversation
end
add_foreign_key "... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20250826142458_add_date_filter_and_status_to_bulkrax_exporters.bulkrax.rb | Ruby | apache-2.0 | 197 | main | 506 | # This migration comes from bulkrax (originally 20201106014204)
class AddDateFilterAndStatusToBulkraxExporters < ActiveRecord::Migration[5.1]
def change
add_column :bulkrax_exporters, :start_date, :date unless column_exists?(:bulkrax_exporters, :start_date)
add_column :bulkrax_exporters, :finish_date, :date u... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20210921150120_enable_uuid_extension.valkyrie_engine.rb | Ruby | apache-2.0 | 197 | main | 215 | # frozen_string_literal: true
# This migration comes from valkyrie_engine (originally 20160111215816)
class EnableUuidExtension < ActiveRecord::Migration[5.0]
def change
enable_extension 'uuid-ossp'
end
end |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20250826142465_add_import_attempts_to_entries.bulkrax.rb | Ruby | apache-2.0 | 197 | main | 281 | # This migration comes from bulkrax (originally 20220118001339)
class AddImportAttemptsToEntries < ActiveRecord::Migration[5.1]
def change
add_column :bulkrax_entries, :import_attempts, :integer, default: 0 unless column_exists?(:bulkrax_entries, :import_attempts)
end
end |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20210911143560_add_arkivo_to_users.hyrax.rb | Ruby | apache-2.0 | 197 | main | 269 | class AddArkivoToUsers < ActiveRecord::Migration[5.2]
def change
add_column :users, :arkivo_token, :string
add_column :users, :arkivo_subscription, :string
add_column :users, :zotero_token, :binary
add_column :users, :zotero_userid, :string
end
end |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20250826142450_change_entry_last_error.bulkrax.rb | Ruby | apache-2.0 | 197 | main | 792 | # This migration comes from bulkrax (originally 20191212155530)
class ChangeEntryLastError < ActiveRecord::Migration[5.1]
def up
# Use raw query to change text to JSON as last_error field is now serialized
results = ActiveRecord::Base.connection.execute("SELECT id, last_error from bulkrax_entries WHERE last_... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20210911143555_change_proxy_deposit_request_generic_file_id_to_work_id.hyrax.rb | Ruby | apache-2.0 | 197 | main | 244 | class ChangeProxyDepositRequestGenericFileIdToWorkId < ActiveRecord::Migration[5.2]
def change
rename_column :proxy_deposit_requests, :generic_file_id, :generic_id if ProxyDepositRequest.column_names.include?('generic_file_id')
end
end |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20230725222727_create_hyrax_counter_metrics.hyrax.rb | Ruby | apache-2.0 | 197 | main | 340 | class CreateHyraxCounterMetrics < ActiveRecord::Migration[6.0]
def change
create_table :hyrax_counter_metrics do |t|
t.string :worktype
t.string :resource_type
t.integer :work_id
t.date :date
t.integer :total_item_investigations
t.integer :total_item_requests
t.timestamp... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20250826142473_denormalize_status_message.bulkrax.rb | Ruby | apache-2.0 | 197 | main | 562 | # This migration comes from bulkrax (originally 20240208005801)
class DenormalizeStatusMessage < ActiveRecord::Migration[5.2]
def change
add_column :bulkrax_entries, :status_message, :string, default: 'Pending' unless column_exists?(:bulkrax_entries, :status_message)
add_column :bulkrax_importers, :status_mes... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20210911143547_create_file_download_stats.hyrax.rb | Ruby | apache-2.0 | 197 | main | 288 | class CreateFileDownloadStats < ActiveRecord::Migration[5.2]
def change
create_table :file_download_stats do |t|
t.datetime :date
t.integer :downloads
t.string :file_id
t.timestamps null: false
end
add_index :file_download_stats, :file_id
end
end |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20210911143558_create_operations.hyrax.rb | Ruby | apache-2.0 | 197 | main | 682 | class CreateOperations < ActiveRecord::Migration[5.2]
def change
create_table :curation_concerns_operations do |t|
t.string :status
t.string :operation_type
t.string :job_class
t.string :job_id
t.string :type # For Single Table Inheritance
t.text :message
t.references :us... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20210911143557_create_features.hyrax.rb | Ruby | apache-2.0 | 197 | main | 242 | class CreateFeatures < ActiveRecord::Migration[5.2]
def change
create_table :hyrax_features do |t|
t.string :key, null: false
t.boolean :enabled, null: false, default: false
t.timestamps null: false
end
end
end |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20210911143452_devise_create_users.rb | Ruby | apache-2.0 | 197 | main | 1,401 | # frozen_string_literal: true
class DeviseCreateUsers < ActiveRecord::Migration[5.2]
def change
create_table :users do |t|
## Database authenticatable
t.string :email, null: false, default: ""
t.string :encrypted_password, null: false, default: ""
## Recoverable
t.stri... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20210911143584_create_mailboxer.mailboxer_engine.rb | Ruby | apache-2.0 | 197 | main | 2,463 | # This migration comes from mailboxer_engine (originally 20110511145103)
class CreateMailboxer < ActiveRecord::Migration[4.2]
def self.up
#Tables
#Conversations
create_table :mailboxer_conversations do |t|
t.column :subject, :string, :default => ""
t.column :created_at, :datetime, :null => false... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20250826142474_update_identifier_index.bulkrax.rb | Ruby | apache-2.0 | 197 | main | 498 | # This migration comes from bulkrax (originally 20240209070952)
class UpdateIdentifierIndex < ActiveRecord::Migration[5.2]
def change
remove_index :bulkrax_entries, :identifier if index_exists?(:bulkrax_entries, :identifier )
add_index :bulkrax_entries, [:identifier, :importerexporter_id, :importerexporter_ty... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20210921150125_create_internal_resource_index.valkyrie_engine.rb | Ruby | apache-2.0 | 197 | main | 239 | # frozen_string_literal: true
# This migration comes from valkyrie_engine (originally 20171204224121)
class CreateInternalResourceIndex < ActiveRecord::Migration[5.1]
def change
add_index :orm_resources, :internal_resource
end
end |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20250826142464_add_file_set_counters_to_importer_runs.bulkrax.rb | Ruby | apache-2.0 | 197 | main | 607 | # This migration comes from bulkrax (originally 20211220195027)
class AddFileSetCountersToImporterRuns < ActiveRecord::Migration[5.1]
def change
add_column :bulkrax_importer_runs, :processed_file_sets, :integer, default: 0 unless column_exists?(:bulkrax_importer_runs, :processed_file_sets)
add_column :bulkrax... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20210921150127_add_optimistic_locking_to_orm_resources.valkyrie_engine.rb | Ruby | apache-2.0 | 197 | main | 252 | # frozen_string_literal: true
# This migration comes from valkyrie_engine (originally 20180802220739)
class AddOptimisticLockingToOrmResources < ActiveRecord::Migration[5.1]
def change
add_column :orm_resources, :lock_version, :integer
end
end |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20250826142460_remove_unused_last_error.bulkrax.rb | Ruby | apache-2.0 | 197 | main | 445 | # This migration comes from bulkrax (originally 20210806044408)
class RemoveUnusedLastError < ActiveRecord::Migration[5.1]
def change
remove_column :bulkrax_entries, :last_error if column_exists?(:bulkrax_entries, :last_error)
remove_column :bulkrax_exporters, :last_error if column_exists?(:bulkrax_exporters,... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20210911143544_create_proxy_deposit_rights.hyrax.rb | Ruby | apache-2.0 | 197 | main | 231 | class CreateProxyDepositRights < ActiveRecord::Migration[5.2]
def change
create_table :proxy_deposit_rights do |t|
t.references :grantor
t.references :grantee
t.timestamps null: false
end
end
end |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20210911143623_create_minter_states.noid_rails_engine.rb | Ruby | apache-2.0 | 197 | main | 581 | # frozen_string_literal: true
# This migration comes from noid_rails_engine (originally 20160610010003)
class CreateMinterStates < ActiveRecord::Migration[4.2]
def change
create_table :minter_states do |t|
t.string :namespace, null: false, default: 'default'
t.string :template, null: false
t.te... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20250826142475_add_index_to_metadata_bulkrax_identifier.bulkrax.rb | Ruby | apache-2.0 | 197 | main | 775 | # This migration comes from bulkrax (originally 20240307053156)
class AddIndexToMetadataBulkraxIdentifier < ActiveRecord::Migration[5.2]
def up
return unless table_exists?(:orm_resources)
return if index_exists?(:orm_resources, "(((metadata -> 'bulkrax_identifier'::text) ->> 0))", name: 'index_on_bulkrax_iden... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20250826142446_change_importer_and_exporter_to_polymorphic.bulkrax.rb | Ruby | apache-2.0 | 197 | main | 873 | # This migration comes from bulkrax (originally 20190731114016)
module Bulkrax
class Entry < ApplicationRecord
belongs_to :importer
end
end
class ChangeImporterAndExporterToPolymorphic < ActiveRecord::Migration[5.1]
def change
begin # deal with odd bug around foreign keys in ci
remove_foreign_key ... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20210911143456_add_devise_guests_to_users.rb | Ruby | apache-2.0 | 197 | main | 474 | class AddDeviseGuestsToUsers < ActiveRecord::Migration[5.2]
def self.up
change_table(:users) do |t|
## Database authenticatable
t.boolean :guest, :default => false
end
end
def self.down
# By default, we don't want to make any assumption about how to roll back a migration when your
# ... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20210911143563_create_permission_template.hyrax.rb | Ruby | apache-2.0 | 197 | main | 294 | class CreatePermissionTemplate < ActiveRecord::Migration[5.2]
def change
create_table :permission_templates do |t|
t.belongs_to :workflow
t.string :admin_set_id
t.string :visibility
t.timestamps
end
add_index :permission_templates, :admin_set_id
end
end |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20210911143566_add_permission_template_to_sipity_workflow.hyrax.rb | Ruby | apache-2.0 | 197 | main | 1,144 | class AddPermissionTemplateToSipityWorkflow < ActiveRecord::Migration[5.2]
def change
add_column :sipity_workflows, :permission_template_id, :integer, index: true
remove_index :sipity_workflows, :name
add_index :sipity_workflows, [:permission_template_id, :name], name: :index_sipity_workflows_on_permissio... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20210911143561_create_sipity.hyrax.rb | Ruby | apache-2.0 | 197 | main | 9,284 | class CreateSipity < ActiveRecord::Migration[5.2]
def change
create_table "sipity_notification_recipients" do |t|
t.integer "notification_id", null: false
t.integer "role_id", null: false
t.string "recipient_strategy", null: false
t.dat... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20210911143546_create_file_view_stats.hyrax.rb | Ruby | apache-2.0 | 197 | main | 272 | class CreateFileViewStats < ActiveRecord::Migration[5.2]
def change
create_table :file_view_stats do |t|
t.datetime :date
t.integer :views
t.string :file_id
t.timestamps null: false
end
add_index :file_view_stats, :file_id
end
end |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/db/migrate/20210911143567_tidy_up_because_of_bad_exception.hyrax.rb | Ruby | apache-2.0 | 197 | main | 468 | class TidyUpBecauseOfBadException < ActiveRecord::Migration[5.2]
def change
if column_exists?(Hyrax::PermissionTemplate.table_name, :workflow_id)
Hyrax::PermissionTemplate.all.each do |permission_template|
workflow_id = permission_template.workflow_id
next unless workflow_id
Sipity::... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/config/routes.rb | Ruby | apache-2.0 | 197 | main | 1,148 | require 'sidekiq/web'
Rails.application.routes.draw do
mount Riiif::Engine => 'images', as: :riiif if Hyrax.config.iiif_image_server?
mount BrowseEverything::Engine => '/browse'
mount Bulkrax::Engine, at: '/'
mount Blacklight::Engine => '/'
concern :searchable, Blacklight::Routes::Searchable.new
r... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/config/application.rb | Ruby | apache-2.0 | 197 | main | 1,256 | require_relative 'boot'
require 'rails/all'
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)
module Koppie
class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails ve... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/config/puma.rb | Ruby | apache-2.0 | 197 | main | 2,034 | # Puma can serve each request in a thread from an internal thread pool.
# The `threads` method setting takes two numbers: a minimum and maximum.
# Any libraries that use thread pools should be configured to match
# the maximum value specified for Puma. Default is set to 5 threads for minimum
# and maximum; this matches... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/config/initializers/arkivo_constraint.rb | Ruby | apache-2.0 | 197 | main | 358 | # frozen_string_literal: true
module Hyrax
class ArkivoConstraint
def self.matches?(_request)
# Add your own logic here to authorize trusted connections to
# the API e.g., if your installation of Arkivo runs on a host
# with the 10.0.0.3 IP address, you could use:
# request.remote_ip == '1... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/config/initializers/simple_form.rb | Ruby | apache-2.0 | 197 | main | 6,621 | # frozen_string_literal: true
# NOTE: This is a modified version of simple_form's default config file.
# The only changes were to move the input to after the hint and error.
# Use this setup block to configure all options available in SimpleForm.
SimpleForm.setup do |config|
# Wrappers are used by the form bui... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/config/initializers/riiif.rb | Ruby | apache-2.0 | 197 | main | 1,502 | # frozen_string_literal: true
Rails.application.reloader.to_prepare do
Riiif::Image.info_service = lambda do |id, _file|
# id will look like a path to a pcdm:file
# (e.g. rv042t299%2Ffiles%2F6d71677a-4f80-42f1-ae58-ed1063fd79c7)
# but we just want the id for the FileSet it's attached to.
fs_id = id.s... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/config/initializers/bulkrax.rb | Ruby | apache-2.0 | 197 | main | 5,092 | # frozen_string_literal: true
Rails.application.reloader.to_prepare do
Bulkrax.setup do |config|
# Add local parsers
# config.parsers += [
# { name: 'MODS - My Local MODS parser', class_name: 'Bulkrax::ModsXmlParser', partial: 'mods_fields' },
# ]
# WorkType to use as the default if none is spe... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/config/initializers/file_services.rb | Ruby | apache-2.0 | 197 | main | 200 | ActiveSupport::Reloader.to_prepare do
Hydra::Derivatives.config.output_file_service = Hyrax::ValkyriePersistDerivatives
Hydra::Derivatives.config.source_file_service = Hyrax::LocalFileService
end |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/config/initializers/1_valkyrie.rb | Ruby | apache-2.0 | 197 | main | 3,225 | # frozen_string_literal: true
require 'faraday/multipart'
# require "shrine/storage/s3"
# require "valkyrie/storage/shrine"
# require "valkyrie/shrine/checksum/s3"
# database = ENV.fetch("METADATA_DB_NAME", "nurax_pg_metadata")
# Rails.logger.info "Establishing connection to postgresql on: " \
# "#{... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/config/initializers/redis_config.rb | Ruby | apache-2.0 | 197 | main | 403 | # frozen_string_literal: true
require 'redis'
require 'connection_pool'
config = YAML.safe_load(ERB.new(IO.read(Rails.root.join('config', 'redis.yml'))).result)[Rails.env].with_indifferent_access
size = ENV.fetch("HYRAX_REDIS_POOL_SIZE", 5)
timeout = ENV.fetch("HYRAX_REDIS_TIMEOUT", 5)
Hyrax.config.redis_connection =... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/config/initializers/simple_form_bootstrap.rb | Ruby | apache-2.0 | 197 | main | 5,294 | # frozen_string_literal: true
# NOTE: This is a modified version of simple_form's default config file.
# The only changes were to move the inputs to after the hints and errors.
# Use this setup block to configure all options available in SimpleForm.
SimpleForm.setup do |config|
config.error_notification_class... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/config/initializers/hydra_config.rb | Ruby | apache-2.0 | 197 | main | 1,639 | # windows doesn't properly require hydra-head (from the gemfile), so we need to require it explicitly here:
require 'hydra/head' unless defined? Hydra
Hydra.configure do |config|
# This specifies the solr field names of permissions-related fields.
# You only need to change these values if you've indexed permission... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/config/initializers/mime_types.rb | Ruby | apache-2.0 | 197 | main | 355 | # Be sure to restart your server when you modify this file.
# Add new mime types for use in respond_to blocks:
# Mime::Type.register "text/richtext", :rtf
Mime::Type.register "application/n-triples", :nt
Mime::Type.register "application/ld+json", :jsonld
Mime::Type.register "text/turtle", :ttl
Mime::Type.register 'app... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/config/initializers/hyrax.rb | Ruby | apache-2.0 | 197 | main | 15,371 | # frozen_string_literal: true
Hyrax.config do |config|
# Injected via `rails g hyrax:work_resource Monograph`
config.register_curation_concern :monograph
# Injected via `rails g hyrax:work_resource GenericWork`
config.register_curation_concern :generic_work
config.disable_wings = true # not needed if ENV inc... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/config/initializers/devise.rb | Ruby | apache-2.0 | 197 | main | 15,190 | # frozen_string_literal: true
# Assuming you have not yet modified this file, each configuration option below
# is set to its default value. Note that some are commented out while others
# are not: uncommented lines are intended to protect your configuration from
# breaking changes in upgrades (i.e., in the event that... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/config/environments/production.rb | Ruby | apache-2.0 | 197 | main | 4,162 | Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# Code is not reloaded between requests.
config.cache_classes = true
# Eager load code on boot. This eager loads most of Rails and
# your application in memory, allowing both threaded web serve... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/config/environments/development.rb | Ruby | apache-2.0 | 197 | main | 2,875 | Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the web serv... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/config/environments/test.rb | Ruby | apache-2.0 | 197 | main | 1,925 | Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
config.assets.debug = true
# The test environment is used exclusively to run your application's
# test suite. You never need to work with it otherwise. Remember that
# your test database is "scr... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/spec/rails_helper.rb | Ruby | apache-2.0 | 197 | main | 2,035 | # This file is copied to spec/ when you run 'rails generate rspec:install'
require 'spec_helper'
ENV['RAILS_ENV'] ||= 'test'
require File.expand_path('../config/environment', __dir__)
# Prevent database truncation if the environment is production
abort("The Rails environment is running in production mode!") if Rails.en... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/spec/spec_helper.rb | Ruby | apache-2.0 | 197 | main | 610 | RSpec.configure do |config|
config.expect_with :rspec do |expectations|
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
end
config.mock_with :rspec do |mocks|
mocks.verify_partial_doubles = true
end
config.shared_context_metadata_behavior = :apply_to_host_groups
config.filt... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/spec/indexers/collection_resource_indexer_spec.rb | Ruby | apache-2.0 | 197 | main | 405 | # frozen_string_literal: true
# Generated via
# `rails generate hyrax:work_resource CollectionResource`
require 'rails_helper'
require 'hyrax/specs/shared_specs/indexers'
RSpec.describe CollectionResourceIndexer do
let(:indexer_class) { described_class }
let(:resource) { CollectionResource.new }
it_behav... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/spec/indexers/monograph_indexer_spec.rb | Ruby | apache-2.0 | 197 | main | 328 | # frozen_string_literal: true
# Generated via
# `rails generate hyrax:work_resource Monograph`
require 'rails_helper'
require 'hyrax/specs/shared_specs/indexers'
RSpec.describe MonographIndexer do
let(:resource) { Monograph.new }
let(:indexer_class) { described_class }
it_behaves_like 'a Hyrax::Resource index... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/spec/indexers/generic_work_indexer_spec.rb | Ruby | apache-2.0 | 197 | main | 334 | # frozen_string_literal: true
# Generated via
# `rails generate hyrax:work_resource GenericWork`
require 'rails_helper'
require 'hyrax/specs/shared_specs/indexers'
RSpec.describe GenericWorkIndexer do
let(:resource) { GenericWork.new }
let(:indexer_class) { described_class }
it_behaves_like 'a Hyrax::Resource... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/spec/models/collection_spec.rb | Ruby | apache-2.0 | 197 | main | 505 | # frozen_string_literal: true
require 'rails_helper'
require 'hyrax/specs/shared_specs/hydra_works'
RSpec.describe Collection do
subject(:collection) { described_class.new }
# TODO: This is temporarily reverting Collection to an ActiveFedora::Base object
# so the application will load.
# it_behaves_like... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/spec/models/generic_work_spec.rb | Ruby | apache-2.0 | 197 | main | 306 | # frozen_string_literal: true
# Generated via
# `rails generate hyrax:work_resource GenericWork`
require 'rails_helper'
require 'hyrax/specs/shared_specs/hydra_works'
RSpec.describe GenericWork do
subject(:work) { described_class.new }
let(:resource) { work }
it_behaves_like 'a Hyrax::Work'
end |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/spec/models/monograph_spec.rb | Ruby | apache-2.0 | 197 | main | 302 | # frozen_string_literal: true
# Generated via
# `rails generate hyrax:work_resource Monograph`
require 'rails_helper'
require 'hyrax/specs/shared_specs/hydra_works'
RSpec.describe Monograph do
subject(:work) { described_class.new }
let(:resource) { work }
it_behaves_like 'a Hyrax::Work'
end |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/spec/models/file_set_spec.rb | Ruby | apache-2.0 | 197 | main | 364 | # frozen_string_literal: true
require 'rails_helper'
require 'hyrax/specs/shared_specs/hydra_works'
RSpec.describe FileSet do
subject(:file_set) { described_class.new }
it_behaves_like 'a Hyrax::FileSet'
describe '#human_readable_type' do
it 'has a human readable type' do
expect(file_set.human_readab... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/spec/models/collection_resource_spec.rb | Ruby | apache-2.0 | 197 | main | 364 | # frozen_string_literal: true
# Generated via
# `rails generate hyrax:collection_resource CollectionResource`
require 'rails_helper'
require 'hyrax/specs/shared_specs/hydra_works'
RSpec.describe CollectionResource do
subject(:collection) { described_class.new }
it_behaves_like 'a Hyrax::PcdmCollection'
it_beh... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/spec/views/monographs/_monograph.html.erb_spec.rb | Ruby | apache-2.0 | 197 | main | 236 | # frozen_string_literal: true
# Generated via
# `rails generate hyrax:work_resource Monograph`
RSpec.describe 'monographs/monograph.html.erb', type: :view do # rubocop:disable RSpec/EmptyExampleGroup
# add monograph view specs
end |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/spec/views/generic_works/_generic_work.html.erb_spec.rb | Ruby | apache-2.0 | 197 | main | 247 | # frozen_string_literal: true
# Generated via
# `rails generate hyrax:work_resource GenericWork`
RSpec.describe 'generic_works/generic_work.html.erb', type: :view do # rubocop:disable RSpec/EmptyExampleGroup
# add generic_work view specs
end |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/spec/forms/collection_resource_form_spec.rb | Ruby | apache-2.0 | 197 | main | 355 | # frozen_string_literal: true
# Generated via
# `rails generate hyrax:work_resource CollectionResource`
require 'rails_helper'
require 'valkyrie/specs/shared_specs'
RSpec.describe CollectionResourceForm do
let(:change_set) { described_class.new(resource) }
let(:resource) { CollectionResource.new }
it_behave... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/app/forms/generic_work_form.rb | Ruby | apache-2.0 | 197 | main | 797 | # frozen_string_literal: true
# Generated via
# `rails generate hyrax:work_resource GenericWork`
#
# @see https://github.com/samvera/hyrax/wiki/Hyrax-Valkyrie-Usage-Guide#forms
# @see https://github.com/samvera/valkyrie/wiki/ChangeSets-and-Dirty-Tracking
class GenericWorkForm < Hyrax::Forms::ResourceForm(GenericWork)... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/app/forms/monograph_form.rb | Ruby | apache-2.0 | 197 | main | 786 | # frozen_string_literal: true
# Generated via
# `rails generate hyrax:work_resource Monograph`
#
# @see https://github.com/samvera/hyrax/wiki/Hyrax-Valkyrie-Usage-Guide#forms
# @see https://github.com/samvera/valkyrie/wiki/ChangeSets-and-Dirty-Tracking
class MonographForm < Hyrax::Forms::ResourceForm(Monograph)
if ... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/app/forms/collection_resource_form.rb | Ruby | apache-2.0 | 197 | main | 372 | # frozen_string_literal: true
# Generated via
# `rails generate hyrax:collection_resource CollectionResource`
class CollectionResourceForm < Hyrax::Forms::PcdmCollectionForm
if Hyrax.config.collection_include_metadata?
include Hyrax::FormFields(:basic_metadata)
include Hyrax::FormFields(:collection_resource... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/app/views/blacklight_dynamic_sitemap/sitemap/show.xml.builder | Ruby | apache-2.0 | 197 | main | 866 | # frozen_string_literal: true
xml.instruct! :xml, version: '1.0', encoding: 'UTF-8'
xml.urlset(
'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
'xsi:schemaLocation' => 'http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd',
'xmlns' => 'http://www.sitemap... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/app/indexers/collection_resource_indexer.rb | Ruby | apache-2.0 | 197 | main | 365 | # frozen_string_literal: true
# Generated via
# `rails generate hyrax:collection_resource CollectionResource`
class CollectionResourceIndexer < Hyrax::PcdmCollectionIndexer
if Hyrax.config.collection_include_metadata?
include Hyrax::Indexer(:basic_metadata)
include Hyrax::Indexer(:collection_resource)
end... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/app/indexers/monograph_indexer.rb | Ruby | apache-2.0 | 197 | main | 643 | # frozen_string_literal: true
# Generated via
# `rails generate hyrax:work_resource Monograph`
class MonographIndexer < Hyrax::ValkyrieWorkIndexer
if Hyrax.config.work_include_metadata?
include Hyrax::Indexer(:core_metadata)
include Hyrax::Indexer(:basic_metadata)
include Hyrax::Indexer(:monograph)
en... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/app/indexers/generic_work_indexer.rb | Ruby | apache-2.0 | 197 | main | 651 | # frozen_string_literal: true
# Generated via
# `rails generate hyrax:work_resource GenericWork`
class GenericWorkIndexer < Hyrax::ValkyrieWorkIndexer
if Hyrax.config.work_include_metadata?
include Hyrax::Indexer(:core_metadata)
include Hyrax::Indexer(:basic_metadata)
include Hyrax::Indexer(:generic_wor... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/app/controllers/catalog_controller.rb | Ruby | apache-2.0 | 197 | main | 13,269 | # frozen_string_literal: true
class CatalogController < ApplicationController
include Hydra::Catalog
include Hydra::Controller::ControllerBehavior
include Hyrax::FlexibleCatalogBehavior if Hyrax.config.flexible?
# This filter applies the hydra access controls
before_action :enforce_show_permissions, only: :sh... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/app/controllers/application_controller.rb | Ruby | apache-2.0 | 197 | main | 540 | class ApplicationController < ActionController::Base
helper Openseadragon::OpenseadragonHelper
# Adds a few additional behaviors into the application controller
include Blacklight::Controller
include Hydra::Controller::ControllerBehavior
# Adds Hyrax behaviors into the application controller
include Hyrax:... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/app/controllers/hyrax/monographs_controller.rb | Ruby | apache-2.0 | 197 | main | 529 | # frozen_string_literal: true
# Generated via
# `rails generate hyrax:work_resource Monograph`
module Hyrax
# Generated controller for Monograph
class MonographsController < ApplicationController
# Adds Hyrax behaviors to the controller.
include Hyrax::WorksControllerBehavior
include Hyrax::Breadcrumb... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/app/controllers/hyrax/generic_works_controller.rb | Ruby | apache-2.0 | 197 | main | 537 | # frozen_string_literal: true
# Generated via
# `rails generate hyrax:work_resource GenericWork`
module Hyrax
# Generated controller for GenericWork
class GenericWorksController < ApplicationController
# Adds Hyrax behaviors to the controller.
include Hyrax::WorksControllerBehavior
include Hyrax::Brea... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/app/helpers/hyrax_helper.rb | Ruby | apache-2.0 | 197 | main | 230 | # frozen_string_literal: true
module HyraxHelper
include ::BlacklightHelper
include Hyrax::BlacklightOverride
include Hyrax::HyraxHelperBehavior
def application_name
ENV.fetch('APP_NAME') { super }.titleize
end
end |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/app/listeners/hyrax_listener.rb | Ruby | apache-2.0 | 197 | main | 1,742 | # frozen_string_literal: true
##
# Generated by hyrax:listeners
#
# The Hyrax engine uses a publish/subscribe programming model to allow
# pluggable behavior in response to certain repository events. A range of events
# are published on a topic based event bus.
#
# This listener provides a template.
#
# For simple use... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/app/models/collection_resource.rb | Ruby | apache-2.0 | 197 | main | 1,610 | # frozen_string_literal: true
# Generated via
# `rails generate hyrax:collection_resource CollectionResource`
class CollectionResource < Hyrax::PcdmCollection
# @note Do not directly update `basic_metadata.yaml`. It is also used by works.
#
# To change metadata for collections
# * extend by adding fields to ... |
github | samvera/hyrax | https://github.com/samvera/hyrax | .koppie/app/models/user.rb | Ruby | apache-2.0 | 197 | main | 974 | class User < ApplicationRecord
# Connects this user object to Hydra behaviors.
include Hydra::User
# Connects this user object to Role-management behaviors.
include Hydra::RoleManagement::UserRoles
# Connects this user object to Hyrax behaviors.
include Hyrax::User
include Hyrax::UserUsageStats
# Con... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.