]> git.openstreetmap.org Git - rails.git/commitdiff
Index oauth_tokens and client_applications by user_id
authorTom Hughes <tom@compton.nu>
Wed, 22 Feb 2017 13:44:57 +0000 (13:44 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 22 Feb 2017 13:44:57 +0000 (13:44 +0000)
db/migrate/20170222134109_add_user_indexes.rb [new file with mode: 0644]
db/structure.sql

diff --git a/db/migrate/20170222134109_add_user_indexes.rb b/db/migrate/20170222134109_add_user_indexes.rb
new file mode 100644 (file)
index 0000000..62330df
--- /dev/null
@@ -0,0 +1,6 @@
+class AddUserIndexes < ActiveRecord::Migration
+  def change
+    add_index :oauth_tokens, [:user_id]
+    add_index :client_applications, [:user_id]
+  end
+end
index 63af3304d7e05aaaaf55de579d43cd3c1f954524..020d5fb1698dc0de9adf2c830dcf6a97ec218636 100644 (file)
@@ -2,8 +2,8 @@
 -- PostgreSQL database dump
 --
 
 -- PostgreSQL database dump
 --
 
--- Dumped from database version 9.5.4
--- Dumped by pg_dump version 9.5.4
+-- Dumped from database version 9.5.6
+-- Dumped by pg_dump version 9.5.6
 
 SET statement_timeout = 0;
 SET lock_timeout = 0;
 
 SET statement_timeout = 0;
 SET lock_timeout = 0;
@@ -1846,6 +1846,13 @@ CREATE UNIQUE INDEX index_changesets_subscribers_on_subscriber_id_and_changeset_
 CREATE UNIQUE INDEX index_client_applications_on_key ON client_applications USING btree (key);
 
 
 CREATE UNIQUE INDEX index_client_applications_on_key ON client_applications USING btree (key);
 
 
+--
+-- Name: index_client_applications_on_user_id; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX index_client_applications_on_user_id ON client_applications USING btree (user_id);
+
+
 --
 -- Name: index_diary_entry_subscriptions_on_diary_entry_id; Type: INDEX; Schema: public; Owner: -
 --
 --
 -- Name: index_diary_entry_subscriptions_on_diary_entry_id; Type: INDEX; Schema: public; Owner: -
 --
@@ -1881,6 +1888,13 @@ CREATE UNIQUE INDEX index_oauth_nonces_on_nonce_and_timestamp ON oauth_nonces US
 CREATE UNIQUE INDEX index_oauth_tokens_on_token ON oauth_tokens USING btree (token);
 
 
 CREATE UNIQUE INDEX index_oauth_tokens_on_token ON oauth_tokens USING btree (token);
 
 
+--
+-- Name: index_oauth_tokens_on_user_id; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX index_oauth_tokens_on_user_id ON oauth_tokens USING btree (user_id);
+
+
 --
 -- Name: index_user_blocks_on_user_id; Type: INDEX; Schema: public; Owner: -
 --
 --
 -- Name: index_user_blocks_on_user_id; Type: INDEX; Schema: public; Owner: -
 --
@@ -2599,6 +2613,8 @@ INSERT INTO schema_migrations (version) VALUES ('20161002153425');
 
 INSERT INTO schema_migrations (version) VALUES ('20161011010929');
 
 
 INSERT INTO schema_migrations (version) VALUES ('20161011010929');
 
+INSERT INTO schema_migrations (version) VALUES ('20170222134109');
+
 INSERT INTO schema_migrations (version) VALUES ('21');
 
 INSERT INTO schema_migrations (version) VALUES ('22');
 INSERT INTO schema_migrations (version) VALUES ('21');
 
 INSERT INTO schema_migrations (version) VALUES ('22');