-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🚧 wip: upgrade bulkrax to the latest #779
Closed
Closed
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...s_rails_6_1/bulkrax/entries/show.html.erb → ...ils_6_1/bulkrax/entries/show.html.old.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
db/migrate/20230824174822_rename_children_counters_to_relationships.bulkrax.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# This migration comes from bulkrax (originally 20211203195233) | ||
class RenameChildrenCountersToRelationships < ActiveRecord::Migration[5.1] | ||
def change | ||
rename_column :bulkrax_importer_runs, :processed_children, :processed_relationships unless column_exists?(:bulkrax_importer_runs, :processed_relationships) | ||
rename_column :bulkrax_importer_runs, :failed_children, :failed_relationships unless column_exists?(:bulkrax_importer_runs, :failed_relationships) | ||
end | ||
end |
8 changes: 8 additions & 0 deletions
8
db/migrate/20230824174823_add_file_set_counters_to_importer_runs.bulkrax.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# 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_importer_runs, :failed_file_sets, :integer, default: 0 unless column_exists?(:bulkrax_importer_runs, :failed_file_sets) | ||
add_column :bulkrax_importer_runs, :total_file_set_entries, :integer, default: 0 unless column_exists?(:bulkrax_importer_runs, :total_file_set_entries) | ||
end | ||
end |
6 changes: 6 additions & 0 deletions
6
db/migrate/20230824174824_add_import_attempts_to_entries.bulkrax.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# 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 |
7 changes: 7 additions & 0 deletions
7
db/migrate/20230824174825_add_work_counters_to_importer_runs.bulkrax.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# This migration comes from bulkrax (originally 20220119213325) | ||
class AddWorkCountersToImporterRuns < ActiveRecord::Migration[5.1] | ||
def change | ||
add_column :bulkrax_importer_runs, :processed_works, :integer, default: 0 unless column_exists?(:bulkrax_importer_runs, :processed_works) | ||
add_column :bulkrax_importer_runs, :failed_works, :integer, default: 0 unless column_exists?(:bulkrax_importer_runs, :failed_works) | ||
end | ||
end |
14 changes: 14 additions & 0 deletions
14
db/migrate/20230824174826_create_bulkrax_pending_relationships.bulkrax.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# This migration comes from bulkrax (originally 20220301001839) | ||
class CreateBulkraxPendingRelationships < ActiveRecord::Migration[5.1] | ||
def change | ||
unless table_exists?(:bulkrax_pending_relationships) | ||
create_table :bulkrax_pending_relationships do |t| | ||
t.belongs_to :bulkrax_importer_run, foreign_key: true, null: false | ||
t.string :parent_id, null: false | ||
t.string :child_id, null: false | ||
|
||
t.timestamps | ||
end | ||
end | ||
end | ||
end |
6 changes: 6 additions & 0 deletions
6
db/migrate/20230824174827_add_order_to_bulkrax_pending_relationships.bulkrax.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# 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 |
6 changes: 6 additions & 0 deletions
6
db/migrate/20230824174828_add_include_thumbnails_to_bulkrax_exporters.bulkrax.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# This migration comes from bulkrax (originally 20220412233954) | ||
class AddIncludeThumbnailsToBulkraxExporters < ActiveRecord::Migration[5.1] | ||
def change | ||
add_column :bulkrax_exporters, :include_thumbnails, :boolean, default: false unless column_exists?(:bulkrax_exporters, :include_thumbnails) | ||
end | ||
end |
6 changes: 6 additions & 0 deletions
6
db/migrate/20230824174829_add_generated_metadata_to_bulkrax_exporters.bulkrax.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# This migration comes from bulkrax (originally 20220413180915) | ||
class AddGeneratedMetadataToBulkraxExporters < ActiveRecord::Migration[5.1] | ||
def change | ||
add_column :bulkrax_exporters, :generated_metadata, :boolean, default: false unless column_exists?(:bulkrax_exporters, :generated_metadata) | ||
end | ||
end |
18 changes: 18 additions & 0 deletions
18
db/migrate/20230824174830_rename_bulkrax_importer_run_to_importer_run.bulkrax.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# This migration comes from bulkrax (originally 20220609001128) | ||
class RenameBulkraxImporterRunToImporterRun < ActiveRecord::Migration[5.1] | ||
def up | ||
if column_exists?(:bulkrax_pending_relationships, :bulkrax_importer_run_id) | ||
remove_foreign_key :bulkrax_pending_relationships, :bulkrax_importer_runs | ||
remove_index :bulkrax_pending_relationships, column: :bulkrax_importer_run_id | ||
|
||
rename_column :bulkrax_pending_relationships, :bulkrax_importer_run_id, :importer_run_id | ||
|
||
add_foreign_key :bulkrax_pending_relationships, :bulkrax_importer_runs, column: :importer_run_id | ||
add_index :bulkrax_pending_relationships, :importer_run_id, name: 'index_bulkrax_pending_relationships_on_importer_run_id' | ||
end | ||
end | ||
|
||
def down | ||
rename_column :bulkrax_pending_relationships, :importer_run_id, :bulkrax_importer_run_id | ||
end | ||
end |
17 changes: 17 additions & 0 deletions
17
db/migrate/20230824174831_add_indices_to_bulkrax.bulkrax.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# This migration comes from bulkrax (originally 20230608153601) | ||
class AddIndicesToBulkrax < ActiveRecord::Migration[5.1] | ||
def change | ||
check_and_add_index :bulkrax_entries, :identifier | ||
check_and_add_index :bulkrax_entries, :type | ||
check_and_add_index :bulkrax_entries, [:importerexporter_id, :importerexporter_type], name: 'bulkrax_entries_importerexporter_idx' | ||
check_and_add_index :bulkrax_pending_relationships, :child_id | ||
check_and_add_index :bulkrax_pending_relationships, :parent_id | ||
check_and_add_index :bulkrax_statuses, :error_class | ||
check_and_add_index :bulkrax_statuses, [:runnable_id, :runnable_type], name: 'bulkrax_statuses_runnable_idx' | ||
check_and_add_index :bulkrax_statuses, [:statusable_id, :statusable_type], name: 'bulkrax_statuses_statusable_idx' | ||
end | ||
|
||
def check_and_add_index(table_name, column_name, options = {}) | ||
add_index(table_name, column_name, options) unless index_exists?(table_name, column_name, options) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rob mentioned that we may want to keep the way they do relationships