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
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20250827103452_remove_linked_applications_from_settings.rb
Ruby
mit
19
main
218
class RemoveLinkedApplicationsFromSettings < ActiveRecord::Migration[8.0] def change safety_assured do remove_column :settings, :linked_applications, :boolean, null: false, default: false end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20190704160038_create_scope_limitations.rb
Ruby
mit
19
main
348
class CreateScopeLimitations < ActiveRecord::Migration[5.2] def change create_table :scope_limitations, id: :uuid do |t| t.string :code, index: true t.string :meaning t.string :description t.boolean :substantive, default: false t.boolean :delegated_functions, default: false t.t...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20230706095142_remove_address_fields_from_partner.rb
Ruby
mit
19
main
458
class RemoveAddressFieldsFromPartner < ActiveRecord::Migration[7.0] def change safety_assured do change_table :partners, bulk: true do |t| t.remove :shared_address_with_client t.remove :address_line_one t.remove :address_line_two t.remove :city t.remove :county ...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20250731075330_create_schedules.rb
Ruby
mit
19
main
489
class CreateSchedules < ActiveRecord::Migration[8.0] def change create_table :schedules, id: :uuid do |t| t.belongs_to :office, foreign_key: true, null: false, type: :uuid t.string :area_of_law t.string :category_of_law t.string :authorisation_status t.string :status t.date :st...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20200917082925_add_used_delegated_functions_reported_on_to_legal_aid_application.rb
Ruby
mit
19
main
202
class AddUsedDelegatedFunctionsReportedOnToLegalAidApplication < ActiveRecord::Migration[6.0] def change add_column :legal_aid_applications, :used_delegated_functions_reported_on, :date end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20210319110509_create_attempts_to_settle.rb
Ruby
mit
19
main
281
class CreateAttemptsToSettle < ActiveRecord::Migration[6.1] def change create_table :attempts_to_settles, id: :uuid do |t| t.belongs_to :legal_aid_application, foreign_key: true, null: false, type: :uuid t.text :attempts_made t.timestamps end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20210423180431_add_name_to_proceeding_types.rb
Ruby
mit
19
main
200
class AddNameToProceedingTypes < ActiveRecord::Migration[6.1] def up add_column :proceeding_types, :name, :string end def down remove_column :proceeding_types, :name, :string end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20240913145848_create_temp_contract_data.rb
Ruby
mit
19
main
242
class CreateTempContractData < ActiveRecord::Migration[7.1] def change create_table :temp_contract_data, id: :uuid do |t| t.boolean :success t.string :office_code t.json :response t.timestamps end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20191121143142_rename_column_on_submissions_documents.rb
Ruby
mit
19
main
219
class RenameColumnOnSubmissionsDocuments < ActiveRecord::Migration[5.2] def change remove_column :ccms_submission_documents, :document_id add_column :ccms_submission_documents, :attachment_id, :uuid end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20250203164133_rename_required_document_categories_to_allowed_document_categories.rb
Ruby
mit
19
main
255
class RenameRequiredDocumentCategoriesToAllowedDocumentCategories < ActiveRecord::Migration[7.2] def change safety_assured do rename_column :legal_aid_applications, :required_document_categories, :allowed_document_categories end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20200709112844_create_actor_permissions.rb
Ruby
mit
19
main
269
class CreateActorPermissions < ActiveRecord::Migration[6.0] def change create_table :actor_permissions, id: :uuid do |t| t.references :permittable, polymorphic: true, index: true, type: :uuid t.uuid :permission_id t.timestamps end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20220928154516_add_applicant_in_receipt_of_housing_benefit_to_legal_aid_applications.rb
Ruby
mit
19
main
223
class AddApplicantInReceiptOfHousingBenefitToLegalAidApplications < ActiveRecord::Migration[7.0] def change add_column :legal_aid_applications, :applicant_in_receipt_of_housing_benefit, :boolean, null: true end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20211025135348_create_hmrc_responses.rb
Ruby
mit
19
main
238
class CreateHMRCResponses < ActiveRecord::Migration[6.1] def change create_table :hmrc_responses, id: :uuid do |t| t.string :application_id t.string :use_case t.json :response t.timestamps end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20221219133711_remove_enable_mini_loop_from_settings.rb
Ruby
mit
19
main
211
class RemoveEnableMiniLoopFromSettings < ActiveRecord::Migration[7.0] def change safety_assured do remove_column :settings, :enable_mini_loop, :boolean, null: false, default: false end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20181206142708_create_other_asset_declaration.rb
Ruby
mit
19
main
685
class CreateOtherAssetDeclaration < ActiveRecord::Migration[5.2] def change create_table :other_assets_declarations, id: :uuid do |t| t.uuid :legal_aid_application_id, null: false t.decimal :second_home_value t.decimal :second_home_mortgage t.decimal :second_home_percentage t.decimal...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20230515130906_update_regular_transactions.rb
Ruby
mit
19
main
276
class UpdateRegularTransactions < ActiveRecord::Migration[7.0] def change safety_assured do change_table :regular_transactions, bulk: true do |t| t.string :description t.belongs_to :owner, polymorphic: true, type: :uuid end end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20190313174812_add_archived_at_to_transaction_types.rb
Ruby
mit
19
main
292
class AddArchivedAtToTransactionTypes < ActiveRecord::Migration[5.2] def up add_column(:transaction_types, :archived_at, :datetime) Populators::TransactionTypePopulator.call(:without_income) end def down remove_column(:transaction_types, :archived_at, :datetime) end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20190301131852_create_pdf_files.rb
Ruby
mit
19
main
231
class CreatePdfFiles < ActiveRecord::Migration[5.2] def change create_table :pdf_files, id: :uuid do |t| t.uuid :original_file_id, null: false end add_index :pdf_files, :original_file_id, unique: true end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20230911120457_update_legal_framework_merits_task_list_foreign_key.rb
Ruby
mit
19
main
306
class UpdateLegalFrameworkMeritsTaskListForeignKey < ActiveRecord::Migration[7.0] def change remove_foreign_key :legal_framework_merits_task_lists, :legal_aid_applications add_foreign_key :legal_framework_merits_task_lists, :legal_aid_applications, on_delete: :cascade, validate: false end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20241030094958_add_uniqueness_index_to_capital_disregards.rb
Ruby
mit
19
main
237
class AddUniquenessIndexToCapitalDisregards < ActiveRecord::Migration[7.2] disable_ddl_transaction! def change add_index(:capital_disregards, [:legal_aid_application_id, :name], unique: true, algorithm: :concurrently) end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20180911143012_add_new_columns_to_proceeding_types.rb
Ruby
mit
19
main
337
class AddNewColumnsToProceedingTypes < ActiveRecord::Migration[5.2] def change add_column :proceeding_types, :ccms_category_law, :string add_column :proceeding_types, :ccms_category_law_code, :string add_column :proceeding_types, :ccms_matter, :string add_column :proceeding_types, :ccms_matter_code, :...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20240722082922_add_shared_benefit_column_to_applicant.rb
Ruby
mit
19
main
441
class AddSharedBenefitColumnToApplicant < ActiveRecord::Migration[7.1] def up add_column :applicants, :shared_benefit_with_partner, :boolean Partner.where.not(shared_benefit_with_applicant: nil).each do |partner| partner.legal_aid_application.applicant.update!(shared_benefit_with_partner: partner.shared...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20210602110352_remove_legal_aid_application_association_from_chances_of_success.rb
Ruby
mit
19
main
342
class RemoveLegalAidApplicationAssociationFromChancesOfSuccess < ActiveRecord::Migration[6.1] def up change_table :chances_of_successes do |t| t.remove_references :legal_aid_application end end def down add_reference :chances_of_successes, :legal_aid_application, foreign_key: true, null: true, ...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20260302150718_replace_providers_auth_subject_uid_index.rb
Ruby
mit
19
main
218
class ReplaceProvidersAuthSubjectUidIndex < ActiveRecord::Migration[8.1] disable_ddl_transaction! def change add_index :providers, [:silas_id, :auth_provider], unique: true, algorithm: :concurrently end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20191114152212_add_on_delete_to_statement_of_case_fk.rb
Ruby
mit
19
main
245
class AddOnDeleteToStatementOfCaseFk < ActiveRecord::Migration[5.2] def change remove_foreign_key :statement_of_cases, :legal_aid_applications add_foreign_key :statement_of_cases, :legal_aid_applications, on_delete: :cascade end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20240514091845_rename_link_case_to_case_cloned_on_legal_aid_application.rb
Ruby
mit
19
main
208
class RenameLinkCaseToCaseClonedOnLegalAidApplication < ActiveRecord::Migration[7.1] def change safety_assured do rename_column :legal_aid_applications, :link_case, :case_cloned end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20190820154405_change_transaction_period_dates.rb
Ruby
mit
19
main
542
# rubocop:disable Rails/ReversibleMigration class ChangeTransactionPeriodDates < ActiveRecord::Migration[5.2] def change rename_column :legal_aid_applications, :transaction_period_start_at, :transaction_period_start_on rename_column :legal_aid_applications, :transaction_period_finish_at, :transaction_period_f...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20211209141633_add_required_document_categories_to_legal_aid_applications.rb
Ruby
mit
19
main
230
class AddRequiredDocumentCategoriesToLegalAidApplications < ActiveRecord::Migration[6.1] def change add_column :legal_aid_applications, :required_document_categories, :string, array: true, null: false, default: [] end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20220512125715_add_employed_field_to_digest.rb
Ruby
mit
19
main
335
class AddEmployedFieldToDigest < ActiveRecord::Migration[6.1] def change change_table :application_digests, bulk: true do |t| t.boolean :employed, null: false, default: false t.boolean :hmrc_data_used, null: false, default: false t.boolean :referred_to_caseworker, null: false, default: false ...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20210913110123_drop_cost_limitations_from_proceeding_types.rb
Ruby
mit
19
main
275
class DropCostLimitationsFromProceedingTypes < ActiveRecord::Migration[6.1] def change remove_column :proceeding_types, :default_cost_limitation_delegated_functions, :decimal remove_column :proceeding_types, :default_cost_limitation_substantive, :decimal end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20231009145448_create_linked_applications.rb
Ruby
mit
19
main
713
class CreateLinkedApplications < ActiveRecord::Migration[7.0] def change create_table :linked_applications, id: :uuid do |t| t.references :lead_application, type: :uuid, null: false t.references :associated_application, type: :uuid, null: false t.string :link_type_code, null: false t.time...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20180821122427_remove_legal_aid_application_reference_applicant.rb
Ruby
mit
19
main
261
# rubocop:disable Rails/ReversibleMigration class RemoveLegalAidApplicationReferenceApplicant < ActiveRecord::Migration[5.2] def change remove_reference :applicants, :legal_aid_application, index: true end end # rubocop:enable Rails/ReversibleMigration
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20250305080311_remove_proceedings_child_relationship.rb
Ruby
mit
19
main
791
class RemoveProceedingsChildRelationship < ActiveRecord::Migration[8.0] def up raise StandardError, "There is mismatched child relationship data" if mismatched_relationship_data? safety_assured { remove_column :proceedings, :relationship_to_child, :string } end def down raise ActiveRecord::Irreversi...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20201125154924_remove_client_received_legal_help_from_merits_assessment.rb
Ruby
mit
19
main
265
class RemoveClientReceivedLegalHelpFromMeritsAssessment < ActiveRecord::Migration[6.0] def up remove_column :merits_assessments, :client_received_legal_help end def down add_column :merits_assessments, :client_received_legal_help, :boolean end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20210520071320_add_emergency_cost_limitation_to_legal_aid_application.rb
Ruby
mit
19
main
332
class AddEmergencyCostLimitationToLegalAidApplication < ActiveRecord::Migration[6.1] def change add_column :legal_aid_applications, :emergency_cost_override, :boolean add_column :legal_aid_applications, :emergency_cost_requested, :numeric add_column :legal_aid_applications, :emergency_cost_reasons, :strin...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20210115155032_reinstate_cash_transaction_index.rb
Ruby
mit
19
main
234
class ReinstateCashTransactionIndex < ActiveRecord::Migration[6.0] def change add_index :cash_transactions, %i[legal_aid_application_id transaction_type_id month_number], unique: true, name: "cash_transactions_unique" end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20230213141824_add_true_layer_provider_id_applicant_index_to_bank_providers.rb
Ruby
mit
19
main
252
class AddTrueLayerProviderIdApplicantIndexToBankProviders < ActiveRecord::Migration[7.0] disable_ddl_transaction! def change add_index :bank_providers, [:true_layer_provider_id, :applicant_id], unique: true, algorithm: :concurrently end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20231005161440_add_extra_employment_information_to_partner.rb
Ruby
mit
19
main
238
class AddExtraEmploymentInformationToPartner < ActiveRecord::Migration[7.0] def change add_column :partners, :extra_employment_information, :boolean add_column :partners, :extra_employment_information_details, :string end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20201215170558_add_cash_transaction_table.rb
Ruby
mit
19
main
297
class AddCashTransactionTable < ActiveRecord::Migration[6.0] def change create_table :cash_transactions, id: :uuid do |t| t.string :legal_aid_application_id t.decimal :amount t.date :transaction_date t.string :transaction_type_id t.timestamps end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20190307104610_create_respondents.rb
Ruby
mit
19
main
587
class CreateRespondents < ActiveRecord::Migration[5.2] def change create_table :respondents, id: :uuid do |t| t.belongs_to :legal_aid_application, foreign_key: true, null: false, type: :uuid t.boolean :understands_terms_of_court_order t.text :understands_terms_of_court_order_details t.b...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20190124140446_create_feedbacks.rb
Ruby
mit
19
main
249
class CreateFeedbacks < ActiveRecord::Migration[5.2] def change create_table :feedbacks, id: :uuid do |t| t.boolean :done_all_needed t.integer :satisfaction t.text :improvement_suggestion t.timestamps end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20230321081156_create_partners.rb
Ruby
mit
19
main
405
class CreatePartners < ActiveRecord::Migration[7.0] def change create_table :partners, id: :uuid do |t| t.string :first_name t.string :last_name t.date :date_of_birth t.boolean :has_national_insurance_number t.string :national_insurance_number t.belongs_to :legal_aid_applicatio...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20210401155950_create_involved_child.rb
Ruby
mit
19
main
302
class CreateInvolvedChild < ActiveRecord::Migration[6.1] def change create_table :involved_children, id: :uuid do |t| t.belongs_to :legal_aid_application, foreign_key: true, null: false, type: :uuid t.string :full_name t.date :date_of_birth t.timestamps end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20210302142433_drop_foreign_key_constraints_on_join_table.rb
Ruby
mit
19
main
432
class DropForeignKeyConstraintsOnJoinTable < ActiveRecord::Migration[6.1] def up remove_foreign_key :proceeding_type_scope_limitations, :proceeding_types if foreign_key_exists?(:proceeding_type_scope_limitations, :proceeding_types) remove_foreign_key :proceeding_type_scope_limitations, :scope_limitations if ...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20230720124309_create_individuals.rb
Ruby
mit
19
main
208
class CreateIndividuals < ActiveRecord::Migration[7.0] def change create_table :individuals, id: :uuid do |t| t.string "first_name" t.string "last_name" t.timestamps end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20211008094818_make_proceeding_df_dates_nullable.rb
Ruby
mit
19
main
243
class MakeProceedingDfDatesNullable < ActiveRecord::Migration[6.1] def change change_column_null :proceedings, :used_delegated_functions_on, true change_column_null :proceedings, :used_delegated_functions_reported_on, true end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20211126133758_add_new_employment_statuses_to_applicant.rb
Ruby
mit
19
main
233
class AddNewEmploymentStatusesToApplicant < ActiveRecord::Migration[6.1] def change add_column :applicants, :self_employed, :boolean, default: false add_column :applicants, :armed_forces, :boolean, default: false end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20190128101016_add_success_prospect_to_merits_assessments.rb
Ruby
mit
19
main
230
class AddSuccessProspectToMeritsAssessments < ActiveRecord::Migration[5.2] def change add_column :merits_assessments, :success_prospect, :string add_column :merits_assessments, :success_prospect_details, :text end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20240603140432_add_care_of_to_address.rb
Ruby
mit
19
main
298
class AddCareOfToAddress < ActiveRecord::Migration[7.1] def change add_column :addresses, :care_of, :string add_column :addresses, :care_of_first_name, :string add_column :addresses, :care_of_last_name, :string add_column :addresses, :care_of_organisation_name, :string end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20201214114038_add_service_name_to_active_storage_blobs.active_storage.rb
Ruby
mit
19
main
601
# This migration comes from active_storage (originally 20190112182829) class AddServiceNameToActiveStorageBlobs < ActiveRecord::Migration[6.0] def up return if column_exists?(:active_storage_blobs, :service_name) add_column :active_storage_blobs, :service_name, :string configured_service = ActiveStorage...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20211103112548_set_new_proceeding_fields_to_not_null.rb
Ruby
mit
19
main
276
class SetNewProceedingFieldsToNotNull < ActiveRecord::Migration[6.1] def change change_column_null(:proceedings, :matter_type, false) change_column_null(:proceedings, :category_of_law, false) change_column_null(:proceedings, :category_law_code, false) end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20230614094521_add_employment_to_partners.rb
Ruby
mit
19
main
231
class AddEmploymentToPartners < ActiveRecord::Migration[7.0] def change add_column :partners, :employed, :boolean add_column :partners, :self_employed, :boolean add_column :partners, :armed_forces, :boolean end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20200108162334_create_scheduled_mailings.rb
Ruby
mit
19
main
472
class CreateScheduledMailings < ActiveRecord::Migration[5.2] def change create_table :scheduled_mailings, id: :uuid do |t| t.uuid :legal_aid_application_id, null: false t.string :mailer_klass, null: false t.string :mailer_method, null: false t.string :arguments, null: false t.datetim...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20190723083236_create_application_scope_limitations.rb
Ruby
mit
19
main
377
class CreateApplicationScopeLimitations < ActiveRecord::Migration[5.2] def change create_table :application_scope_limitations, id: :uuid do |t| t.uuid :legal_aid_application_id t.uuid :scope_limitation_id t.boolean :substantive, default: true t.timestamps end add_index :applicatio...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20250312140551_remove_confirmed_not_change_of_name_from_prohibited_steps.rb
Ruby
mit
19
main
231
class RemoveConfirmedNotChangeOfNameFromProhibitedSteps < ActiveRecord::Migration[8.0] def change safety_assured do remove_column :prohibited_steps, :confirmed_not_change_of_name, :boolean, null: true end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20181030114511_add_devise_to_applicants.rb
Ruby
mit
19
main
774
# frozen_string_literal: true class AddDeviseToApplicants < ActiveRecord::Migration[5.2] def change change_table :applicants do |t| ## Database authenticatable t.rename :email_address, :email ## Confirmable t.string :confirmation_token t.datetime :confirmed_at t.datetime :c...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20250313140248_remove_sca_from_settings.rb
Ruby
mit
19
main
205
class RemoveSCAFromSettings < ActiveRecord::Migration[8.0] def change safety_assured do remove_column :settings, :special_childrens_act, :boolean, null: false, default: false end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20190128091816_add_os_browser_and_source_to_feedbacks.rb
Ruby
mit
19
main
275
class AddOsBrowserAndSourceToFeedbacks < ActiveRecord::Migration[5.2] def change add_column :feedbacks, :os, :string add_column :feedbacks, :browser, :string add_column :feedbacks, :browser_version, :string add_column :feedbacks, :source, :string end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20220121103950_create_uploaded_evidence_collection.rb
Ruby
mit
19
main
353
class CreateUploadedEvidenceCollection < ActiveRecord::Migration[6.1] def change create_table :uploaded_evidence_collections, id: :uuid do |t| t.belongs_to :legal_aid_application, foreign_key: true, null: false, type: :uuid t.uuid :provider_uploader_id, type: :uuid, index: true, foreign_key: true ...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20260311092401_add_first_name_last_name_to_involved_children.rb
Ruby
mit
19
main
210
class AddFirstNameLastNameToInvolvedChildren < ActiveRecord::Migration[8.1] def change add_column :involved_children, :first_name, :string add_column :involved_children, :last_name, :string end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20190925105003_add_columns_to_ccms_submission_histories.rb
Ruby
mit
19
main
215
class AddColumnsToCCMSSubmissionHistories < ActiveRecord::Migration[5.2] def change add_column :ccms_submission_histories, :request, :text add_column :ccms_submission_histories, :response, :text end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20231006091714_add_joint_accounts_to_savings_amounts.rb
Ruby
mit
19
main
243
class AddJointAccountsToSavingsAmounts < ActiveRecord::Migration[7.0] def change add_column :savings_amounts, :joint_offline_current_accounts, :numeric add_column :savings_amounts, :joint_offline_savings_accounts, :numeric end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20190723142529_drop_laa_restrictions_table.rb
Ruby
mit
19
main
406
class DropLaaRestrictionsTable < ActiveRecord::Migration[5.2] def change drop_table :legal_aid_application_restrictions, id: :uuid do |t| t.references( :legal_aid_application, foreign_key: true, type: :uuid, index: { name: 'laa_id_laa_restriction_id' } ) t.referen...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20210218165806_create_join_table_application_proceeding_type_scope_limitation.rb
Ruby
mit
19
main
534
class CreateJoinTableApplicationProceedingTypeScopeLimitation < ActiveRecord::Migration[6.1] def change create_join_table :application_proceeding_types, :scope_limitations, column_options: { type: :uuid } do |t| t.primary_key :id, :uuid t.timestamps t.index %i[application_proceeding_type_id scop...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20211103105546_add_extra_fields_to_proceedings.rb
Ruby
mit
19
main
251
class AddExtraFieldsToProceedings < ActiveRecord::Migration[6.1] def change add_column :proceedings, :matter_type, :string add_column :proceedings, :category_of_law, :string add_column :proceedings, :category_law_code, :string end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20231005160623_add_extra_employment_information_to_applicant.rb
Ruby
mit
19
main
244
class AddExtraEmploymentInformationToApplicant < ActiveRecord::Migration[7.0] def change add_column :applicants, :extra_employment_information, :boolean add_column :applicants, :extra_employment_information_details, :string end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20201214114039_create_active_storage_variant_records.active_storage.rb
Ruby
mit
19
main
515
# This migration comes from active_storage (originally 20191206030411) class CreateActiveStorageVariantRecords < ActiveRecord::Migration[6.0] def change create_table :active_storage_variant_records do |t| t.belongs_to :blob, null: false, index: false, type: :uuid t.string :variation_digest, null: fals...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20260126075308_add_merits_submitted_by_to_legal_aid_application.rb
Ruby
mit
19
main
254
class AddMeritsSubmittedByToLegalAidApplication < ActiveRecord::Migration[8.1] disable_ddl_transaction! def change add_reference :legal_aid_applications, :merits_submitted_by, null: true, type: :uuid, index: {algorithm: :concurrently} end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20230703102937_add_owner_to_employment.rb
Ruby
mit
19
main
232
class AddOwnerToEmployment < ActiveRecord::Migration[7.0] def change safety_assured do change_table :employments, bulk: true do |t| t.belongs_to :owner, polymorphic: true, type: :uuid end end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20210323113558_drop_table_application_scope_limitations.rb
Ruby
mit
19
main
203
class DropTableApplicationScopeLimitations < ActiveRecord::Migration[6.1] def up drop_table :application_scope_limitations end def down raise ActiveRecord::IrreversibleMigration end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20210222105725_add_new_status_to_scheduled_mailings.rb
Ruby
mit
19
main
693
class AddNewStatusToScheduledMailings < ActiveRecord::Migration[6.1] def up change_column :scheduled_mailings, :legal_aid_application_id, :uuid, null: true add_column :scheduled_mailings, :status, :string add_column :scheduled_mailings, :addressee, :string add_column :scheduled_mailings, :govuk_messag...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20210303231303_drop_cash_payment_flag_from_settings.rb
Ruby
mit
19
main
240
class DropCashPaymentFlagFromSettings < ActiveRecord::Migration[6.1] def up remove_column :settings, :allow_cash_payment end def down add_column :settings, :allow_cash_payment, :boolean, null: false, default: false end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20190712133912_create_firms_and_offices.rb
Ruby
mit
19
main
631
class CreateFirmsAndOffices < ActiveRecord::Migration[5.2] def change create_table :firms, id: :uuid do |t| t.timestamps t.string :ccms_id t.string :name end create_table :offices, id: :uuid do |t| t.timestamps t.string :ccms_id t.string :code t.references :firm,...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20210309111908_add_unique_index_to_dwp_overrides.rb
Ruby
mit
19
main
405
class AddUniqueIndexToDWPOverrides < ActiveRecord::Migration[6.1] def up remove_index :dwp_overrides, name: :index_dwp_overrides_on_legal_aid_application_id add_index :dwp_overrides, :legal_aid_application_id, unique: true end def down remove_index :dwp_overrides, name: :index_dwp_overrides_on_legal_...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20221102161808_create_matter_oppositions.rb
Ruby
mit
19
main
334
class CreateMatterOppositions < ActiveRecord::Migration[7.0] def change create_table :matter_oppositions, id: :uuid do |t| t.references :legal_aid_application, null: false, foreign_key: { on_delete: :cascade }, index: false, type: :uuid t.text :reason, null: false, default: "" t.timestamps ...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20200327115015_update_name_in_transaction_types.rb
Ruby
mit
19
main
261
class UpdateNameInTransactionTypes < ActiveRecord::Migration[6.0] def up TransactionType.where(name: "pension").update_all(name: "private_pension") end def down TransactionType.where(name: "private_pension").update_all(name: "pension") end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20200729140115_remove_legal_aid_application_state_column.rb
Ruby
mit
19
main
425
class RemoveLegalAidApplicationStateColumn < ActiveRecord::Migration[6.0] def up remove_column :legal_aid_applications, :state, :string end def down add_column :legal_aid_applications, :state, :string LegalAidApplication.all.each do |application| application.state = application.state_machine_p...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20221017130541_create_undertakings.rb
Ruby
mit
19
main
307
class CreateUndertakings < ActiveRecord::Migration[7.0] def change create_table :undertakings, id: :uuid do |t| t.belongs_to :legal_aid_application, null: false, foreign_key: true, type: :uuid t.boolean :offered t.string :additional_information t.timestamps end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20200709135901_add_unique_index_to_actor_permissions.rb
Ruby
mit
19
main
229
class AddUniqueIndexToActorPermissions < ActiveRecord::Migration[6.0] def change add_index :actor_permissions, %i[permittable_type permittable_id permission_id], name: "actor_permissions_unqiueness", unique: true end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20210112103855_add_month_number_to_cash_transactions.rb
Ruby
mit
19
main
297
class AddMonthNumberToCashTransactions < ActiveRecord::Migration[6.0] def change add_column :cash_transactions, :month_number, :integer add_index :cash_transactions, %i[legal_aid_application_id transaction_type_id month_number], unique: true, name: "cash_transactions_unique" end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20221122083958_remove_full_name_from_opponent.rb
Ruby
mit
19
main
385
class RemoveFullNameFromOpponent < ActiveRecord::Migration[7.0] def change raise StandardError, "Opponent table still has full_name values" if full_name_values_present? safety_assured do remove_column :opponents, :full_name, :string end end def full_name_values_present? ApplicationMeritsTa...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20190417130107_add_submitted_at_to_merits_assessments.rb
Ruby
mit
19
main
231
class AddSubmittedAtToMeritsAssessments < ActiveRecord::Migration[5.2] def change add_column :merits_assessments, :submitted_at, :datetime remove_column :merits_assessments, :client_merits_declaration, :boolean end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20230824132946_add_owner_to_legal_aid_application_transaction_types.rb
Ruby
mit
19
main
285
class AddOwnerToLegalAidApplicationTransactionTypes < ActiveRecord::Migration[7.0] def change safety_assured do change_table :legal_aid_application_transaction_types, bulk: true do |t| t.belongs_to :owner, polymorphic: true, type: :uuid end end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20240702132532_add_new_fields_to_application_digest.rb
Ruby
mit
19
main
415
class AddNewFieldsToApplicationDigest < ActiveRecord::Migration[7.1] def change add_column :application_digests, :has_partner, :boolean add_column :application_digests, :contrary_interest, :boolean add_column :application_digests, :partner_dwp_challenge, :boolean add_column :application_digests, :appl...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20200728081000_create_state_machine_proxies.rb
Ruby
mit
19
main
258
class CreateStateMachineProxies < ActiveRecord::Migration[6.0] def change create_table :state_machine_proxies, id: :uuid do |t| t.uuid :legal_aid_application_id t.string :type t.string :aasm_state t.timestamps end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20241211093840_create_appeals.rb
Ruby
mit
19
main
328
class CreateAppeals < ActiveRecord::Migration[7.2] def change create_table :appeals, id: :uuid do |t| t.belongs_to :legal_aid_application, foreign_key: true, null: false, type: :uuid t.boolean :second_appeal t.string :original_judge_level t.string :court_type t.timestamps end ...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20190828131221_remove_service_levels_table.rb
Ruby
mit
19
main
536
class RemoveServiceLevelsTable < ActiveRecord::Migration[5.2] def up remove_column :proceeding_types, :default_service_level_id drop_table :service_levels end def down add_column :proceeding_types, :default_service_level_id, :integer create_table :service_levels, id: false, primary_key: :service_...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20250217150948_add_questions_to_feedback.rb
Ruby
mit
19
main
479
class AddQuestionsToFeedback < ActiveRecord::Migration[7.2] def change add_column :feedbacks, :done_all_needed_reason, :text add_column :feedbacks, :difficulty_reason, :text add_column :feedbacks, :satisfaction_reason, :text add_column :feedbacks, :time_taken_satisfaction, :integer add_column :fee...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20211105083833_update_hmrc_responses.rb
Ruby
mit
19
main
295
class UpdateHMRCResponses < ActiveRecord::Migration[6.1] def change add_reference :hmrc_responses, :legal_aid_application, foreign_key: true, null: true, type: :uuid rename_column :hmrc_responses, :application_id, :submission_id add_column :hmrc_responses, :url, :string end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20200106094725_add_provider_citizen_consented_to_legal_aid_applications.rb
Ruby
mit
19
main
274
class AddProviderCitizenConsentedToLegalAidApplications < ActiveRecord::Migration[5.2] def change add_column :legal_aid_applications, :provider_received_citizen_consent, :boolean add_column :legal_aid_applications, :citizen_uses_online_banking, :boolean end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20240905104607_add_previous_reference_to_applicant.rb
Ruby
mit
19
main
207
class AddPreviousReferenceToApplicant < ActiveRecord::Migration[7.1] def change add_column :applicants, :applied_previously, :boolean add_column :applicants, :previous_reference, :string end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20190808094323_create_benefit_types.rb
Ruby
mit
19
main
248
class CreateBenefitTypes < ActiveRecord::Migration[5.2] def change create_table :benefit_types, id: :uuid do |t| t.string :label t.text :description t.boolean :exclude_from_gross_income t.timestamps end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20211209083010_create_document_categories.rb
Ruby
mit
19
main
428
class CreateDocumentCategories < ActiveRecord::Migration[6.1] def change create_table :document_categories, id: :uuid do |t| t.string :name, null: false t.boolean :submit_to_ccms, null: false, default: false t.string :ccms_document_type t.boolean :display_on_evidence_upload, null: false, d...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20210407081304_create_legal_framework_merits_task_list.rb
Ruby
mit
19
main
370
class CreateLegalFrameworkMeritsTaskList < ActiveRecord::Migration[6.1] def change create_table :legal_framework_merits_task_lists, id: :uuid do |t| t.references :legal_aid_application, foreign_key: true, type: :uuid, index: { name: "idx_lfa_merits_task_lists_on_legal_aid_application_id" } t.text :ser...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20211209134144_add_employment_attrs_to_legal_aid_application.rb
Ruby
mit
19
main
261
class AddEmploymentAttrsToLegalAidApplication < ActiveRecord::Migration[6.1] def change add_column :legal_aid_applications, :extra_employment_information, :boolean add_column :legal_aid_applications, :employment_information_details, :string end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20210420092148_update_chances_of_successes.rb
Ruby
mit
19
main
1,131
class UpdateChancesOfSuccesses < ActiveRecord::Migration[6.1] def up add_belongs_to :chances_of_successes, :application_proceeding_type, foreign_key: true, null: true, type: :uuid execute <<~SQL.squish UPDATE chances_of_successes cos SET application_proceeding_type_id = t.apt_id from ( ...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20240206145546_add_last_name_at_birth_to_applicants.rb
Ruby
mit
19
main
205
class AddLastNameAtBirthToApplicants < ActiveRecord::Migration[7.1] def change add_column :applicants, :last_name_at_birth, :string add_column :applicants, :changed_last_name, :boolean end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20190130110634_create_statement_of_case.rb
Ruby
mit
19
main
275
class CreateStatementOfCase < ActiveRecord::Migration[5.2] def change create_table :statement_of_cases, id: :uuid do |t| t.belongs_to :legal_aid_application, foreign_key: true, null: false, type: :uuid t.text :statement t.timestamps end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20190729100046_remove_merits_completed_states.rb
Ruby
mit
19
main
356
class RemoveMeritsCompletedStates < ActiveRecord::Migration[5.2] ORIGINAL_STATE = 'merits_completed'.freeze NEW_STATE = 'assessment_submitted'.freeze def up LegalAidApplication.where(state: ORIGINAL_STATE).update_all(state: NEW_STATE) end def down LegalAidApplication.where(state: NEW_STATE).update_a...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20190219134617_create_transaction_types.rb
Ruby
mit
19
main
211
class CreateTransactionTypes < ActiveRecord::Migration[5.2] def change create_table :transaction_types, id: :uuid do |t| t.string :name t.string :operation t.timestamps end end end