Skip to content

Commit

Permalink
Merge pull request #1857 from MushroomObserver/nimmo-add-synonym-inde…
Browse files Browse the repository at this point in the history
…x-to-names

Add synonym index to Names table
  • Loading branch information
nimmolo committed Jan 26, 2024
2 parents f54d931 + 82eceff commit e63abcb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
9 changes: 9 additions & 0 deletions db/migrate/20240126082516_add_synonym_index_to_names.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
class AddSynonymIndexToNames < ActiveRecord::Migration[7.1]
def up
add_index :names, :synonym_id, name: :synonym_index
end

def down
remove_index :names, :synonym_id, name: :synonym_index
end
end
3 changes: 2 additions & 1 deletion 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.1].define(version: 2024_01_26_075657) do
ActiveRecord::Schema[7.1].define(version: 2024_01_26_082516) do
create_table "api_keys", id: :integer, charset: "utf8mb3", force: :cascade do |t|
t.datetime "created_at", precision: nil
t.datetime "last_used", precision: nil
Expand Down Expand Up @@ -397,6 +397,7 @@
t.string "lifeform", limit: 1024, default: " ", null: false
t.boolean "locked", default: false, null: false
t.integer "icn_id"
t.index ["synonym_id"], name: "synonym_index"
end

create_table "names_versions", id: :integer, charset: "utf8mb3", force: :cascade do |t|
Expand Down

0 comments on commit e63abcb

Please sign in to comment.