-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update migrations to support Rails upgrade (#23534)
Co-authored-by: mounikamy <[email protected]>
- Loading branch information
Showing
7 changed files
with
27 additions
and
7 deletions.
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
2 changes: 1 addition & 1 deletion
2
db/migrate/20240523021417_update_transcription_packages_columns.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
6 changes: 6 additions & 0 deletions
6
db/migrate/20241118071918_add_index_to_transcription_packages_contractor_id.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 @@ | ||
class AddIndexToTranscriptionPackagesContractorId < ActiveRecord::Migration[6.1] | ||
disable_ddl_transaction! | ||
def change | ||
add_index :transcription_packages, :contractor_id, name: "index_transcription_packages_on_contractor_id", algorithm: :concurrently | ||
end | ||
end |
13 changes: 13 additions & 0 deletions
13
db/migrate/20241118075353_update_indexes_on_transcriptions.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,13 @@ | ||
class UpdateIndexesOnTranscriptions < ActiveRecord::Migration[6.1] | ||
disable_ddl_transaction! | ||
|
||
def change | ||
unless index_exists?(:transcriptions, :transcription_contractor_id, name: "index_transcriptions_on_transcription_contractor_id") | ||
add_index :transcriptions, :transcription_contractor_id, name: "index_transcriptions_on_transcription_contractor_id",algorithm: :concurrently | ||
end | ||
|
||
unless index_exists?(:transcriptions, :deleted_at, name: "index_transcriptions_on_deleted_at") | ||
add_index :transcriptions, :deleted_at, name: "index_transcriptions_on_deleted_at",algorithm: :concurrently | ||
end | ||
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