Skip to content
Extraits de code Groupes Projets
Valider 7bf0afb1 rédigé par Akihiko Odaki's avatar Akihiko Odaki Validation de Eugen Rochko
Parcourir les fichiers

Add index favourites on account_id and id (#4360)

parent 2f8bfb3d
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
class AddIndexFavouritesOnAccountIdAndId < ActiveRecord::Migration[5.1]
def change
# Used to query favourites of an account ordered by id.
add_index :favourites, [:account_id, :id]
end
end
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20170718211102) do ActiveRecord::Schema.define(version: 20170720000000) do
# These are extensions that must be enabled in order to support this database # These are extensions that must be enabled in order to support this database
enable_extension "plpgsql" enable_extension "plpgsql"
...@@ -103,6 +103,7 @@ ActiveRecord::Schema.define(version: 20170718211102) do ...@@ -103,6 +103,7 @@ ActiveRecord::Schema.define(version: 20170718211102) do
t.integer "status_id", null: false t.integer "status_id", null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.index ["account_id", "id"], name: "index_favourites_on_account_id_and_id"
t.index ["account_id", "status_id"], name: "index_favourites_on_account_id_and_status_id", unique: true t.index ["account_id", "status_id"], name: "index_favourites_on_account_id_and_status_id", unique: true
t.index ["status_id"], name: "index_favourites_on_status_id" t.index ["status_id"], name: "index_favourites_on_status_id"
end end
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter