Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion app/models/emancipation_option.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ class EmancipationOption < ApplicationRecord
#
# Indexes
#
# index_emancipation_options_on_emancipation_category_id (emancipation_category_id)
# index_emancipation_options_on_emancipation_category_id_and_name (emancipation_category_id,name) UNIQUE
#
# Foreign Keys
Expand Down
1 change: 0 additions & 1 deletion app/models/user_language.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ class UserLanguage < ApplicationRecord
#
# Indexes
#
# index_user_languages_on_language_id (language_id)
# index_user_languages_on_language_id_and_user_id (language_id,user_id) UNIQUE
# index_user_languages_on_user_id (user_id)
#
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
class ValidateConstraintMileageRates < ActiveRecord::Migration[7.2]
def up
ActiveRecord::Base.connection.execute(Arel.sql("ALTER TABLE mileage_rates VALIDATE CONSTRAINT fk_rails_3dad81992f;"))
end

def down
# cannot un-validate a constraint
end
end
9 changes: 9 additions & 0 deletions db/migrate/20250331033339_validate_constraint_notes.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
class ValidateConstraintNotes < ActiveRecord::Migration[7.2]
def up
ActiveRecord::Base.connection.execute(Arel.sql("ALTER TABLE notes VALIDATE CONSTRAINT fk_rails_5d4a723a34;"))
end

def down
# cannot un-validate a constraint
end
end
9 changes: 9 additions & 0 deletions db/migrate/20250331033350_validate_constraint_placements.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
class ValidateConstraintPlacements < ActiveRecord::Migration[7.2]
def up
ActiveRecord::Base.connection.execute(Arel.sql("ALTER TABLE placements VALIDATE CONSTRAINT fk_rails_65aeeb5669;"))
end

def down
# cannot un-validate a constraint
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class RemoveDuplicateIndexindexEmancipationOptionsOnEmancipationCategoryId < ActiveRecord::Migration[7.2]
def change
remove_index :emancipation_options, :emancipation_category_id
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class RemoveDuplicateIndexindexUserLanguagesOnLanguageId < ActiveRecord::Migration[7.2]
def change
remove_index :user_languages, :language_id
end
end
10 changes: 4 additions & 6 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema[7.2].define(version: 2025_02_08_160513) do
ActiveRecord::Schema[7.2].define(version: 2025_03_31_033441) do
# These are extensions that must be enabled in order to support this database
enable_extension "pg_stat_statements"
enable_extension "plpgsql"
Expand Down Expand Up @@ -344,7 +344,6 @@
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["emancipation_category_id", "name"], name: "index_emancipation_options_on_emancipation_category_id_and_name", unique: true
t.index ["emancipation_category_id"], name: "index_emancipation_options_on_emancipation_category_id"
end

create_table "flipper_features", force: :cascade do |t|
Expand Down Expand Up @@ -641,7 +640,6 @@
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["language_id", "user_id"], name: "index_user_languages_on_language_id_and_user_id", unique: true
t.index ["language_id"], name: "index_user_languages_on_language_id"
t.index ["user_id"], name: "index_user_languages_on_user_id"
end

Expand Down Expand Up @@ -740,14 +738,14 @@
add_foreign_key "learning_hour_types", "casa_orgs"
add_foreign_key "learning_hours", "learning_hour_types"
add_foreign_key "learning_hours", "users"
add_foreign_key "mileage_rates", "casa_orgs", validate: false
add_foreign_key "mileage_rates", "casa_orgs"
add_foreign_key "mileage_rates", "users"
add_foreign_key "notes", "users", column: "creator_id", validate: false
add_foreign_key "notes", "users", column: "creator_id"
add_foreign_key "other_duties", "users", column: "creator_id"
add_foreign_key "patch_notes", "patch_note_groups"
add_foreign_key "patch_notes", "patch_note_types"
add_foreign_key "placement_types", "casa_orgs"
add_foreign_key "placements", "casa_cases", validate: false
add_foreign_key "placements", "casa_cases"
add_foreign_key "placements", "placement_types"
add_foreign_key "placements", "users", column: "creator_id"
add_foreign_key "preference_sets", "users"
Expand Down