Skip to content

Commit

Permalink
Create 20240131201441_add_observation_index_to_votes.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
nimmolo committed Jan 31, 2024
1 parent 8f2e35a commit 2666962
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
9 changes: 9 additions & 0 deletions db/migrate/20240131201441_add_observation_index_to_votes.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
class AddObservationIndexToVotes < ActiveRecord::Migration[7.1]
def up
add_index :votes, :observation_id, name: :observation_index
end

def down
remove_index :votes, :observation_id, name: :observation_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_29_060737) do
ActiveRecord::Schema[7.1].define(version: 2024_01_31_201441) 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 @@ -741,6 +741,7 @@
t.boolean "favorite"
t.float "value"
t.index ["naming_id"], name: "naming_index"
t.index ["observation_id"], name: "observation_index"
end

end

0 comments on commit 2666962

Please sign in to comment.