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/20210624124911_create_ccms_opponent_ids.rb
Ruby
mit
19
main
203
class CreateCCMSOpponentIds < ActiveRecord::Migration[6.1] def change create_table :ccms_opponent_ids, id: :uuid do |t| t.integer :serial_id, null: false t.timestamps end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20200327115101_add_column_to_transaction_types.rb
Ruby
mit
19
main
470
class AddColumnToTransactionTypes < ActiveRecord::Migration[6.0] def change add_column :transaction_types, :other_income, :boolean, default: "false" TransactionType.where(name: %w[friends_or_family maintenance_in p...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20190516094442_remove_vehicle_from_other_assets_declaration.rb
Ruby
mit
19
main
246
class RemoveVehicleFromOtherAssetsDeclaration < ActiveRecord::Migration[5.2] def change remove_column :other_assets_declarations, :vehicle_value, :decimal remove_column :other_assets_declarations, :classic_car_value, :decimal end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20230327134642_add_address_fields_to_partner.rb
Ruby
mit
19
main
484
class AddAddressFieldsToPartner < ActiveRecord::Migration[7.0] def change safety_assured do change_table :partners, bulk: true do |t| t.boolean :shared_address_with_client t.string :address_line_one t.string :address_line_two t.string :city t.string :county t....
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20190122115534_update_provider_id_to_application.rb
Ruby
mit
19
main
275
class UpdateProviderIdToApplication < ActiveRecord::Migration[5.2] def up provider_id = Provider.where(username: 'benreid').try(:provider_id) return if provider_id.nil? LegalAidApplication.where(provider_id: nil).update_all(provider_id: provider_id) end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20220204171301_delete_more_tables.rb
Ruby
mit
19
main
243
class DeleteMoreTables < ActiveRecord::Migration[6.1] def up drop_table :default_cost_limitations, force: :cascade drop_table :service_levels, force: :cascade 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/20220223141619_create_employments.rb
Ruby
mit
19
main
262
class CreateEmployments < ActiveRecord::Migration[6.1] def change create_table :employments, id: :uuid do |t| t.references :legal_aid_application, foreign_key: true, type: :uuid t.string :name, null: false t.timestamps end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20190214143628_fix_active_storage_tables.rb
Ruby
mit
19
main
1,714
class FixActiveStorageTables < ActiveRecord::Migration[5.2] def change drop_table :active_storage_attachments do |t| t.string :name, null: false t.references :record, null: false, polymorphic: true, index: false t.references :blob, null: false t.datetime :created_at, null: f...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20210115142828_update_column_type_on_cash_transactions.rb
Ruby
mit
19
main
243
class UpdateColumnTypeOnCashTransactions < ActiveRecord::Migration[6.0] def change rename_column :cash_transactions, :transaction_type_id, :transaction_type_id_old add_column :cash_transactions, :transaction_type_id, :uuid end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20230628085216_add_owner_to_hmrc_responses.rb
Ruby
mit
19
main
238
class AddOwnerToHMRCResponses < ActiveRecord::Migration[7.0] def change safety_assured do change_table :hmrc_responses, 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/20221103164239_create_opponents_application.rb
Ruby
mit
19
main
329
class CreateOpponentsApplication < ActiveRecord::Migration[7.0] def change create_table :opponents_applications, id: :uuid do |t| t.belongs_to :proceeding, null: false, foreign_key: true, type: :uuid t.boolean :has_opponents_application t.string :reason_for_applying t.timestamps end ...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20190911150223_create_cfe_submissions.rb
Ruby
mit
19
main
344
class CreateCFESubmissions < ActiveRecord::Migration[5.2] def change create_table :cfe_submissions, id: :uuid do |t| t.references :legal_aid_application, foreign_key: true, type: :uuid t.uuid :assessment_id t.string :aasm_state t.string :error_message t.text :cfe_result t.times...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20181120160942_remove_unique_constraint_on_applicant_email.rb
Ruby
mit
19
main
284
class RemoveUniqueConstraintOnApplicantEmail < ActiveRecord::Migration[5.2] def up remove_index :applicants, :email add_index :applicants, :email, unique: false end def down remove_index :applicants, :email add_index :applicants, :email, unique: true end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20190909095604_create_submission_documents.rb
Ruby
mit
19
main
408
class CreateSubmissionDocuments < ActiveRecord::Migration[5.2] def change create_table :ccms_submission_documents, id: :uuid do |t| t.uuid :submission_id t.string :document_id t.string :status t.string :document_type t.string :ccms_document_id t.timestamps end add_fore...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20241018081039_update_document_categories.rb
Ruby
mit
19
main
206
class UpdateDocumentCategories < ActiveRecord::Migration[7.2] def change add_column :document_categories, :file_extension, :string add_column :document_categories, :description, :string end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20191025134729_remove_sequence_as_default_val.rb
Ruby
mit
19
main
346
class RemoveSequenceAsDefaultVal < ActiveRecord::Migration[5.2] def up # this is to remove the default value of nextval('case_proceeding_sequence') that may have been added as part of db:seeds change_column :application_proceeding_types, :proceeding_case_id, :integer, default: nil end def down # noth...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20190711135901_add_fields_to_proceeding_types.rb
Ruby
mit
19
main
399
class AddFieldsToProceedingTypes < ActiveRecord::Migration[5.2] def change add_column :proceeding_types, :default_service_level_id, :integer add_column :proceeding_types, :default_cost_limitation_delegated_functions, :integer add_column :proceeding_types, :default_cost_limitation_substantive, :integer ...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20210409102038_change_attempts_to_settle_belongs_to.rb
Ruby
mit
19
main
470
class ChangeAttemptsToSettleBelongsTo < ActiveRecord::Migration[6.1] def up add_belongs_to :attempts_to_settles, :application_proceeding_type, foreign_key: true, null: false, type: :uuid remove_belongs_to :attempts_to_settles, :legal_aid_application end def down add_belongs_to :attempts_to_settles, :...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20181207162311_create_legal_aid_application_restrictions.rb
Ruby
mit
19
main
421
class CreateLegalAidApplicationRestrictions < ActiveRecord::Migration[5.2] def change create_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' } ) ...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20190124113350_add_proceedings_before_the_court_to_merits_assessment.rb
Ruby
mit
19
main
267
class AddProceedingsBeforeTheCourtToMeritsAssessment < ActiveRecord::Migration[5.2] def change add_column :merits_assessments, :proceedings_before_the_court, :boolean add_column :merits_assessments, :details_of_proceedings_before_the_court, :text end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20190425143403_create_submission_histories.rb
Ruby
mit
19
main
462
class CreateSubmissionHistories < ActiveRecord::Migration[5.2] def change create_table :ccms_submission_histories, id: :uuid do |t| t.uuid :submission_id, null: false t.string :from_state t.string :to_state t.boolean :success t.text :details t.timestamps end add_foreign...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20190827122038_add_none_selected.rb
Ruby
mit
19
main
377
class AddNoneSelected < ActiveRecord::Migration[5.2] def change add_column :legal_aid_applications, :no_credit_transaction_types_selected, :boolean add_column :legal_aid_applications, :no_debit_transaction_types_selected, :boolean add_column :savings_amounts, :none_selected, :boolean add_column :other...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20190716081338_create_service_levels.rb
Ruby
mit
19
main
353
class CreateServiceLevels < ActiveRecord::Migration[5.2] def change create_table :service_levels, id: false, primary_key: :service_id do |t| t.primary_key :service_id t.string :name t.timestamps end add_foreign_key :proceeding_types, :service_levels, column: :default_service_level_id, pr...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20201005152150_create_debugs_table.rb
Ruby
mit
19
main
385
class CreateDebugsTable < ActiveRecord::Migration[6.0] def change create_table :debugs, id: :uuid do |t| t.string :debug_type t.string :legal_aid_application_id t.string :session_id t.text :session t.string :auth_params t.string :callback_params t.string :callback_url ...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20190523115648_rename_other_assets_declarations_columns.rb
Ruby
mit
19
main
273
class RenameOtherAssetsDeclarationsColumns < ActiveRecord::Migration[5.2] def change rename_column :other_assets_declarations, :jewellery_value, :valuable_items_value rename_column :other_assets_declarations, :timeshare_value, :timeshare_property_value end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20181214143356_create_providers.rb
Ruby
mit
19
main
531
class CreateProviders < ActiveRecord::Migration[5.2] def change create_table :providers, id: :uuid do |t| t.string :username, null: false t.string :type t.text :roles ## Trackable t.integer :sign_in_count, default: 0, null: false t.datetime :current_sign_in_at t.datetim...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20251024080229_create_join_table_provider_dismissed_announcements.rb
Ruby
mit
19
main
297
class CreateJoinTableProviderDismissedAnnouncements < ActiveRecord::Migration[8.0] def change create_join_table :announcements, :providers, table_name: :provider_dismissed_announcements, column_options: { type: :uuid } do |t| t.index [:provider_id, :announcement_id] end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20201215120821_create_policy_disregards_table.rb
Ruby
mit
19
main
607
class CreatePolicyDisregardsTable < ActiveRecord::Migration[6.0] def change create_table :policy_disregards, id: :uuid do |t| t.boolean :england_infected_blood_support t.boolean :vaccine_damage_payments t.boolean :variant_creutzfeldt_jakob_disease t.boolean :criminal_injuries_compensation_...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20230822111710_change_cash_transaction_index.rb
Ruby
mit
19
main
368
class ChangeCashTransactionIndex < ActiveRecord::Migration[7.0] disable_ddl_transaction! def change remove_index :cash_transactions, name: :cash_transactions_unique add_index :cash_transactions, [:legal_aid_application_id, :owner_id, :transaction_type_id, :month_number], unique: true, name: "cash_transacti...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20190627074728_change_default_for_submissions_documents.rb
Ruby
mit
19
main
253
# rubocop:disable Rails/ReversibleMigration class ChangeDefaultForSubmissionsDocuments < ActiveRecord::Migration[5.2] def change change_column :ccms_submissions, :documents, :text, default: nil end end # rubocop:enable Rails/ReversibleMigration
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20190708151000_add_assets_to_dependants.rb
Ruby
mit
19
main
204
class AddAssetsToDependants < ActiveRecord::Migration[5.2] def change add_column :dependants, :has_assets_more_than_threshold, :boolean add_column :dependants, :assets_value, :decimal end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20250509071703_drop_public_law_family_from_settings.rb
Ruby
mit
19
main
211
class DropPublicLawFamilyFromSettings < ActiveRecord::Migration[8.0] def change safety_assured do remove_column :settings, :public_law_family, :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/20191007141353_create_cfe_result.rb
Ruby
mit
19
main
239
class CreateCFEResult < ActiveRecord::Migration[5.2] def change create_table :cfe_results, id: :uuid do |t| t.uuid :legal_aid_application_id t.uuid :submission_id t.text :result t.timestamps end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20210429174354_remove_delegated_functions_from_legal_aid_applications.rb
Ruby
mit
19
main
355
class RemoveDelegatedFunctionsFromLegalAidApplications < ActiveRecord::Migration[6.1] def change remove_column :legal_aid_applications, :used_delegated_functions, :boolean remove_column :legal_aid_applications, :used_delegated_functions_on, :date remove_column :legal_aid_applications, :used_delegated_func...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20190222134743_create_admin_users.rb
Ruby
mit
19
main
659
class CreateAdminUsers < ActiveRecord::Migration[5.2] def change create_table :admin_users, id: :uuid do |t| t.string :username, null: false, default: '' t.string :email, null: false, default: '' t.string :encrypted_password, null: false, default: '' # Trackable ...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20190208101554_create_active_storage_tables.active_storage.rb
Ruby
mit
19
main
959
# This migration comes from active_storage (originally 20170806125915) class CreateActiveStorageTables < ActiveRecord::Migration[5.2] def change create_table :active_storage_blobs do |t| t.string :key, null: false t.string :filename, null: false t.string :content_type t.text...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20241212085816_remove_means_test_review_a_from_settings.rb
Ruby
mit
19
main
216
class RemoveMeansTestReviewAFromSettings < ActiveRecord::Migration[7.2] def change safety_assured do remove_column :settings, :means_test_review_a, :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/20211020093729_create_proeceeding_linked_children.rb
Ruby
mit
19
main
515
class CreateProeceedingLinkedChildren < ActiveRecord::Migration[6.1] def change create_table :proceedings_linked_children, id: :uuid do |t| t.uuid :proceeding_id t.uuid :involved_child_id t.timestamps end add_index :proceedings_linked_children, %w[proceeding_id involved_child_id], name...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20221113212453_backfill_applicant_has_national_insurance_number.rb
Ruby
mit
19
main
318
class BackfillApplicantHasNationalInsuranceNumber < ActiveRecord::Migration[7.0] disable_ddl_transaction! def up Applicant.unscoped.where.not(national_insurance_number: nil).in_batches do |relation| relation.update_all(has_national_insurance_number: true) sleep(0.01) # throttle end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20221026095914_create_specific_issue.rb
Ruby
mit
19
main
287
class CreateSpecificIssue < ActiveRecord::Migration[7.0] def change create_table :specific_issues, id: :uuid do |t| t.belongs_to :proceeding, null: false, foreign_key: true, type: :uuid t.boolean :confirmed t.string :details t.timestamps end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20190305152510_create_incidents.rb
Ruby
mit
19
main
266
class CreateIncidents < ActiveRecord::Migration[5.2] def change create_table :incidents, id: :uuid do |t| t.date :occurred_on t.text :details t.references :legal_aid_application, index: true, type: :uuid t.timestamps end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20201119125243_remove_blazer.rb
Ruby
mit
19
main
239
class RemoveBlazer < ActiveRecord::Migration[6.0] def change drop_table :blazer_checks drop_table :blazer_dashboard_queries drop_table :blazer_dashboards drop_table :blazer_audits drop_table :blazer_queries end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20210223134124_drop_sent_emails.rb
Ruby
mit
19
main
477
class DropSentEmails < ActiveRecord::Migration[6.1] def up drop_table :sent_emails end def down create_table :sent_emails, id: :uuid do |t| t.string :mailer t.string :mail_method t.string :addressee t.string :govuk_message_id t.string :mailer_args t.datetime :sent_at ...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20230224112243_drop_secure_data.rb
Ruby
mit
19
main
268
class DropSecureData < ActiveRecord::Migration[7.0] def change drop_table :secure_data, force: :cascade, if_exists: true, primary_key: :id, id: :uuid, default: -> { "gen_random_uuid()" } do |t| t.text :data, null: true t.timestamps end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20210524143755_create_gateway_evidence.rb
Ruby
mit
19
main
330
class CreateGatewayEvidence < ActiveRecord::Migration[6.1] def change create_table :gateway_evidences, 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 t.timestamps end ...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20210305145638_create_dwp_overrides.rb
Ruby
mit
19
main
314
class CreateDWPOverrides < ActiveRecord::Migration[6.1] def change create_table :dwp_overrides, id: :uuid do |t| t.belongs_to :legal_aid_application, foreign_key: true, null: false, type: :uuid t.text :passporting_benefit t.boolean :evidence_available t.timestamps end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20181126110330_add_lookup_details_to_address.rb
Ruby
mit
19
main
212
class AddLookupDetailsToAddress < ActiveRecord::Migration[5.2] def change add_column :addresses, :lookup_used, :boolean, null: false, default: false add_column :addresses, :lookup_id, :string end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20200611123802_create_irregular_incomes.rb
Ruby
mit
19
main
283
class CreateIrregularIncomes < ActiveRecord::Migration[6.0] def change create_table :irregular_incomes, id: :uuid do |t| t.string :legal_aid_application_id t.string :income_type t.string :frequency t.decimal :amount t.timestamps end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20221118095617_remove_application_proceeding_type_from_chances_of_successes.rb
Ruby
mit
19
main
238
class RemoveApplicationProceedingTypeFromChancesOfSuccesses < ActiveRecord::Migration[7.0] def change safety_assured do remove_column :chances_of_successes, :application_proceeding_type_id, :uuid, null: true end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20220902150227_create_regular_transactions.rb
Ruby
mit
19
main
462
class CreateRegularTransactions < ActiveRecord::Migration[7.0] def change create_table :regular_transactions, id: :uuid do |t| t.references :legal_aid_application, null: false, foreign_key: { on_delete: :cascade }, index: false, type: :uuid t.references :transaction_type, null: false, foreign_key: tru...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20250114142619_create_child_care_assessments.rb
Ruby
mit
19
main
324
class CreateChildCareAssessments < ActiveRecord::Migration[7.2] def change create_table :child_care_assessments, id: :uuid do |t| t.belongs_to :proceeding, null: false, foreign_key: true, type: :uuid t.boolean :assessed t.boolean :result t.string :details t.timestamps end end ...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20190501123416_create_vehicles.rb
Ruby
mit
19
main
349
class CreateVehicles < ActiveRecord::Migration[5.2] def change create_table :vehicles, id: :uuid do |t| t.decimal :estimated_value t.decimal :payment_remaining t.date :purchased_on t.boolean :used_regularly t.references(:legal_aid_application, foreign_key: true, type: :uuid) t....
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20180829150801_create_legal_aid_application_proceeding_types.rb
Ruby
mit
19
main
271
class CreateLegalAidApplicationProceedingTypes < ActiveRecord::Migration[5.2] def change create_table :application_proceeding_types, id: :uuid do |t| t.references :legal_aid_application t.references :proceeding_type t.timestamps end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20220727075551_add_used_delegated_functions_to_proceeding.rb
Ruby
mit
19
main
510
class AddUsedDelegatedFunctionsToProceeding < ActiveRecord::Migration[7.0] def up change_table :proceedings, bulk: true do |t| t.boolean :used_delegated_functions end Proceeding.where.not(used_delegated_functions_on: nil).update_all(used_delegated_functions: true) Proceeding.where(used_delegated...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20210401124219_create_legal_framework_submission_histories.rb
Ruby
mit
19
main
437
class CreateLegalFrameworkSubmissionHistories < ActiveRecord::Migration[6.1] def change create_table :legal_framework_submission_histories, id: :uuid do |t| t.uuid :submission_id t.string :url t.string :http_method t.text :request_payload t.integer :http_response_status t.text ...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20250617141529_add_omni_auth_columns_index_to_providers.rb
Ruby
mit
19
main
225
class AddOmniAuthColumnsIndexToProviders < ActiveRecord::Migration[8.0] disable_ddl_transaction! def change add_index :providers, [:auth_subject_uid, :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/20221102162032_add_matter_oppositions_index.rb
Ruby
mit
19
main
201
class AddMatterOppositionsIndex < ActiveRecord::Migration[7.0] disable_ddl_transaction! def change add_index :matter_oppositions, :legal_aid_application_id, algorithm: :concurrently end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20221116153344_add_split_name_fields_to_opponents.rb
Ruby
mit
19
main
260
class AddSplitNameFieldsToOpponents < ActiveRecord::Migration[7.0] def change safety_assured do change_table :opponents, bulk: true do |t| t.string :first_name, null: true t.string :last_name, null: true end end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20200501010350_add_parent_id_to_transaction_types.rb
Ruby
mit
19
main
364
class AddParentIdToTransactionTypes < ActiveRecord::Migration[6.0] def up add_column :transaction_types, :parent_id, :string, default: nil add_index :transaction_types, :parent_id, unique: false end def down remove_index :transaction_types, name: "index_transaction_types_on_parent_id" remove_colu...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20191114151820_add_on_delete_to_merits_assessment_fk.rb
Ruby
mit
19
main
246
class AddOnDeleteToMeritsAssessmentFk < ActiveRecord::Migration[5.2] def change remove_foreign_key :merits_assessments, :legal_aid_applications add_foreign_key :merits_assessments, :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/20220527111338_add_cost_overrides.rb
Ruby
mit
19
main
309
class AddCostOverrides < ActiveRecord::Migration[6.1] def change change_table :legal_aid_applications, bulk: true do |t| t.boolean :substantive_cost_override, null: true t.numeric :substantive_cost_requested, null: true t.string :substantive_cost_reasons, null: true end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20241018070508_alter_foreign_key_on_benefit_check_result.rb
Ruby
mit
19
main
273
class AlterForeignKeyOnBenefitCheckResult < ActiveRecord::Migration[7.2] def change remove_foreign_key :benefit_check_results, :legal_aid_applications add_foreign_key :benefit_check_results, :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/20200616135325_mark_student_loan_transaction_type_as_archived.rb
Ruby
mit
19
main
328
class MarkStudentLoanTransactionTypeAsArchived < ActiveRecord::Migration[6.0] def up rec = TransactionType.find_by(name: "student_loan") rec.update!(archived_at: Time.current) if rec.archived_at.nil? end def down rec = TransactionType.find_by(name: "student_loan") rec.update!(archived_at: nil) ...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20230815154938_change_foreign_key_on_chances_of_successes.rb
Ruby
mit
19
main
250
class ChangeForeignKeyOnChancesOfSuccesses < ActiveRecord::Migration[7.0] def change remove_foreign_key :chances_of_successes, :proceedings add_foreign_key :chances_of_successes, :proceedings, 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/20230727083729_add_student_finance_and_student_finance_amount_to_applicants_and_partners.rb
Ruby
mit
19
main
354
class AddStudentFinanceAndStudentFinanceAmountToApplicantsAndPartners < ActiveRecord::Migration[7.0] def change add_column :applicants, :student_finance, :boolean add_column :applicants, :student_finance_amount, :decimal add_column :partners, :student_finance, :boolean add_column :partners, :student_f...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20191114193807_add_on_delete_to_ccms_submissions_fk.rb
Ruby
mit
19
main
241
class AddOnDeleteToCCMSSubmissionsFk < ActiveRecord::Migration[5.2] def change remove_foreign_key :ccms_submissions, :legal_aid_applications add_foreign_key :ccms_submissions, :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/20180820112730_create_applicant.rb
Ruby
mit
19
main
241
class CreateApplicant < ActiveRecord::Migration[5.2] def change create_table :applicants, id: :uuid do |t| t.string :name t.date :date_of_birth t.timestamps t.references :legal_aid_application end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20190723142637_add_restrictions_to_legal_aid_applications.rb
Ruby
mit
19
main
237
class AddRestrictionsToLegalAidApplications < ActiveRecord::Migration[5.2] def change add_column :legal_aid_applications, :has_restrictions, :boolean add_column :legal_aid_applications, :restrictions_details, :string end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20190424181011_create_submissions.rb
Ruby
mit
19
main
336
class CreateSubmissions < ActiveRecord::Migration[5.2] def change create_table :ccms_submissions, id: :uuid do |t| t.references :legal_aid_application, foreign_key: true, type: :uuid t.string :applicant_ccms_reference t.string :case_ccms_reference t.string :aasm_state t.timestamps ...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20241022133251_create_capital_disregards.rb
Ruby
mit
19
main
439
class CreateCapitalDisregards < ActiveRecord::Migration[7.2] def change create_table :capital_disregards, id: :uuid do |t| t.belongs_to :legal_aid_application, null: false, foreign_key: true, type: :uuid t.string :name, null: false t.boolean :mandatory, null: false t.decimal :amount ...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20181123192102_add_consent_to_legal_aid_applications.rb
Ruby
mit
19
main
248
class AddConsentToLegalAidApplications < ActiveRecord::Migration[5.2] def change add_column :legal_aid_applications, :open_banking_consent, :boolean add_column :legal_aid_applications, :open_banking_consent_choice_at, :datetime end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20191018174252_add_column_and_rename_existing_on_savings_amounts.rb
Ruby
mit
19
main
253
class AddColumnAndRenameExistingOnSavingsAmounts < ActiveRecord::Migration[5.2] def change add_column :savings_amounts, :offline_savings_accounts, :numeric rename_column :savings_amounts, :offline_accounts, :offline_current_accounts end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20221027065931_create_prohibited_steps.rb
Ruby
mit
19
main
291
class CreateProhibitedSteps < ActiveRecord::Migration[7.0] def change create_table :prohibited_steps, id: :uuid do |t| t.belongs_to :proceeding, null: false, foreign_key: true, type: :uuid t.boolean :uk_removal t.string :details t.timestamps end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20211214154807_rename_employment_information_details.rb
Ruby
mit
19
main
209
class RenameEmploymentInformationDetails < ActiveRecord::Migration[6.1] def change rename_column :legal_aid_applications, :employment_information_details, :extra_employment_information_details end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20211008094831_add_name_to_proceedings.rb
Ruby
mit
19
main
457
class AddNameToProceedings < ActiveRecord::Migration[6.1] # rubocop:disable Rails/NotNullColumn # Disabling this as the table is currently not in use so a non-null column can be # safely added without a default. Defaults are not set for any other non-null # columns on this table so it would be strange to arbitr...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20251209151347_add_datastore_id_unique_index_to_legal_aid_applications.rb
Ruby
mit
19
main
229
class AddDatastoreIdUniqueIndexToLegalAidApplications < ActiveRecord::Migration[8.1] disable_ddl_transaction! def change add_index :legal_aid_applications, :datastore_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/20230905133536_rename_organisations_columns.rb
Ruby
mit
19
main
247
class RenameOrganisationsColumns < ActiveRecord::Migration[7.0] def change safety_assured do rename_column :organisations, :ccms_code, :ccms_type_code rename_column :organisations, :description, :ccms_type_text end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20220915131126_remove_proceedings_scope_limitations.rb
Ruby
mit
19
main
1,618
class RemoveProceedingsScopeLimitations < ActiveRecord::Migration[7.0] def up raise StandardError, "Proceeding table has scope limitation data" if any_proceeding_data_present? change_table :proceedings, bulk: true do |t| t.remove :substantive_scope_limitation_code t.remove :substantive_scope_limi...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20221118094938_remove_application_proceeding_type_from_attempts_to_settles.rb
Ruby
mit
19
main
236
class RemoveApplicationProceedingTypeFromAttemptsToSettles < ActiveRecord::Migration[7.0] def change safety_assured do remove_column :attempts_to_settles, :application_proceeding_type_id, :uuid, null: true end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20180807211758_create_legal_aid_applications.rb
Ruby
mit
19
main
206
class CreateLegalAidApplications < ActiveRecord::Migration[5.2] def change create_table :legal_aid_applications, id: :uuid do |t| t.string :application_ref t.timestamps end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20200625135809_update_states.rb
Ruby
mit
19
main
209
class UpdateStates < ActiveRecord::Migration[6.0] def up MigrationHelpers::StateChanger.new(dummy_run: false).up end def down MigrationHelpers::StateChanger.new(dummy_run: false).down end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20240627104142_add_target_application_to_linked_applications.rb
Ruby
mit
19
main
237
class AddTargetApplicationToLinkedApplications < ActiveRecord::Migration[7.1] disable_ddl_transaction! def change add_reference :linked_applications, :target_application, 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/20201105112815_add_reason_to_state_machine_proxies.rb
Ruby
mit
19
main
249
class AddReasonToStateMachineProxies < ActiveRecord::Migration[6.0] def up add_column :state_machine_proxies, :ccms_reason, :string execute "UPDATE state_machine_proxies SET ccms_reason = 'unknown' WHERE aasm_state = 'use_ccms'" end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20251020101525_create_announcements.rb
Ruby
mit
19
main
373
class CreateAnnouncements < ActiveRecord::Migration[8.0] def change create_table :announcements, id: :uuid do |t| t.integer :display_type t.string :gov_uk_header_bar t.string :heading t.string :link_display t.string :link_url t.string :body t.datetime :start_at t.da...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20211223105917_allow_null_apt_on_chances_of_success.rb
Ruby
mit
19
main
867
class AllowNullAptOnChancesOfSuccess < ActiveRecord::Migration[6.1] def up # Change to allow null values on aplication_proceeding_type_id and NOT on proceeding_id change_column :chances_of_successes, :application_proceeding_type_id, :uuid, null: true change_column :attempts_to_settles, :application_procee...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20240918073446_add_fields_to_application_digest.rb
Ruby
mit
19
main
540
class AddFieldsToApplicationDigest < ActiveRecord::Migration[7.1] def change add_column :application_digests, :family_linked, :boolean add_column :application_digests, :family_linked_lead_or_associated, :string add_column :application_digests, :number_of_family_linked_applications, :integer add_column...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20201023142248_add_rememberable_to_applicant.rb
Ruby
mit
19
main
200
class AddRememberableToApplicant < ActiveRecord::Migration[6.0] def change add_column :applicants, :remember_created_at, :datetime add_column :applicants, :remember_token, :string end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20190123111544_create_merits_assessments.rb
Ruby
mit
19
main
254
class CreateMeritsAssessments < ActiveRecord::Migration[5.2] def change create_table :merits_assessments, id: :uuid do |t| t.belongs_to :legal_aid_application, foreign_key: true, null: false, type: :uuid t.timestamps end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20241202152952_change_capital_disregards_index.rb
Ruby
mit
19
main
348
class ChangeCapitalDisregardsIndex < ActiveRecord::Migration[7.2] disable_ddl_transaction! def change remove_index(:capital_disregards, name: :index_capital_disregards_on_legal_aid_application_id_and_name) add_index(:capital_disregards, [:legal_aid_application_id, :name, :mandatory], unique: true, algorith...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20210624130422_add_ccms_opponent_id_to_opponents.rb
Ruby
mit
19
main
207
class AddCCMSOpponentIdToOpponents < ActiveRecord::Migration[6.1] def change add_column :opponents, :ccms_opponent_id, :integer add_column :involved_children, :ccms_opponent_id, :integer end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20190725130416_create_offices_providers.rb
Ruby
mit
19
main
291
class CreateOfficesProviders < ActiveRecord::Migration[5.2] def change create_table :offices_providers, id: false do |t| t.belongs_to :office, foreign_key: true, null: false, type: :uuid t.belongs_to :provider, foreign_key: true, null: false, type: :uuid end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20241107092712_add_sca_fields_to_application_digest.rb
Ruby
mit
19
main
527
class AddSCAFieldsToApplicationDigest < ActiveRecord::Migration[7.2] def change add_column :application_digests, :biological_parent, :boolean add_column :application_digests, :parental_responsibility_agreement, :boolean add_column :application_digests, :parental_responsibility_court_order, :boolean ad...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20220708123323_add_client_involvement_type_fields_to_proceedings.rb
Ruby
mit
19
main
783
class AddClientInvolvementTypeFieldsToProceedings < ActiveRecord::Migration[7.0] def up # create the columns as nullable change_table :proceedings, bulk: true do |t| t.string :client_involvement_type_ccms_code, null: true t.string :client_involvement_type_description, null: true end # Set ...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20221031111422_create_urgencies.rb
Ruby
mit
19
main
384
class CreateUrgencies < ActiveRecord::Migration[7.0] def change create_table :urgencies, id: :uuid do |t| t.belongs_to :legal_aid_application, null: false, foreign_key: true, type: :uuid t.string :nature_of_urgency, null: false t.boolean :hearing_date_set t.date :hearing_date t.strin...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20191011142505_install_blazer.rb
Ruby
mit
19
main
1,073
class InstallBlazer < ActiveRecord::Migration[5.2] def change create_table :blazer_queries do |t| t.references :creator t.string :name t.text :description t.text :statement t.string :data_source t.timestamps null: false end create_table :blazer_audits do |t| t.re...
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20240606135347_remove_partner_means_assessment_from_settings.rb
Ruby
mit
19
main
227
class RemovePartnerMeansAssessmentFromSettings < ActiveRecord::Migration[7.1] def change safety_assured do remove_column :settings, :partner_means_assessment, :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/20230929072452_add_partner_fields_to_savings_amount.rb
Ruby
mit
19
main
318
class AddPartnerFieldsToSavingsAmount < ActiveRecord::Migration[7.0] def change add_column :savings_amounts, :partner_offline_current_accounts, :numeric add_column :savings_amounts, :partner_offline_savings_accounts, :numeric add_column :savings_amounts, :no_partner_account_selected, :boolean end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20180829144026_create_proceeding_types.rb
Ruby
mit
19
main
274
class CreateProceedingTypes < ActiveRecord::Migration[5.2] def change create_table :proceeding_types, id: :uuid do |t| t.string :code, index: true t.string :ccms_code t.string :meaning t.string :description t.timestamps end end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20230720125540_add_opposable_to_opponents.rb
Ruby
mit
19
main
236
class AddOpposableToOpponents < ActiveRecord::Migration[7.0] disable_ddl_transaction! def change add_reference :opponents, :opposable, polymorphic: true, index: { unique: true, algorithm: :concurrently }, type: :uuid end end
github
ministryofjustice/laa-apply-for-legal-aid
https://github.com/ministryofjustice/laa-apply-for-legal-aid
db/migrate/20220819090020_update_proceeding_fields.rb
Ruby
mit
19
main
1,568
class UpdateProceedingFields < ActiveRecord::Migration[7.0] def change change_column_null :proceedings, :substantive_scope_limitation_code, true change_column_null :proceedings, :substantive_scope_limitation_meaning, true change_column_null :proceedings, :delegated_functions_scope_limitation_code, true ...