11361: Add pdh index to collections table.
authorTom Clegg <tom@curoverse.com>
Tue, 28 Mar 2017 22:01:25 +0000 (18:01 -0400)
committerTom Clegg <tom@curoverse.com>
Tue, 28 Mar 2017 22:01:25 +0000 (18:01 -0400)
services/api/db/migrate/20170328215436_add_portable_data_hash_index_to_collections.rb [new file with mode: 0644]
services/api/db/structure.sql

diff --git a/services/api/db/migrate/20170328215436_add_portable_data_hash_index_to_collections.rb b/services/api/db/migrate/20170328215436_add_portable_data_hash_index_to_collections.rb
new file mode 100644 (file)
index 0000000..01ebad5
--- /dev/null
@@ -0,0 +1,5 @@
+class AddPortableDataHashIndexToCollections < ActiveRecord::Migration
+  def change
+    add_index :collections, :portable_data_hash
+  end
+end
index 87b657543b6c851232e96defd117fc1f6991c8a6..d877452f200178c4df67610ce57a7cfc9dd0f236 100644 (file)
@@ -1687,6 +1687,13 @@ CREATE INDEX index_collections_on_owner_uuid ON collections USING btree (owner_u
 CREATE UNIQUE INDEX index_collections_on_owner_uuid_and_name ON collections USING btree (owner_uuid, name) WHERE (is_trashed = false);
 
 
+--
+-- Name: index_collections_on_portable_data_hash; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+--
+
+CREATE INDEX index_collections_on_portable_data_hash ON collections USING btree (portable_data_hash);
+
+
 --
 -- Name: index_collections_on_trash_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
 --
@@ -2744,4 +2751,6 @@ INSERT INTO schema_migrations (version) VALUES ('20170105160302');
 
 INSERT INTO schema_migrations (version) VALUES ('20170216170823');
 
-INSERT INTO schema_migrations (version) VALUES ('20170301225558');
\ No newline at end of file
+INSERT INTO schema_migrations (version) VALUES ('20170301225558');
+
+INSERT INTO schema_migrations (version) VALUES ('20170328215436');
\ No newline at end of file