diff --git a/migrations/1509484288_add_block_index.down.sql b/migrations/1509484288_add_block_index.down.sql new file mode 100644 index 00000000..9a1d42fb --- /dev/null +++ b/migrations/1509484288_add_block_index.down.sql @@ -0,0 +1 @@ +DROP INDEX block_number_index; \ No newline at end of file diff --git a/migrations/1509484288_add_block_index.up.sql b/migrations/1509484288_add_block_index.up.sql new file mode 100644 index 00000000..a4710b9c --- /dev/null +++ b/migrations/1509484288_add_block_index.up.sql @@ -0,0 +1 @@ +CREATE INDEX block_number_index ON blocks (block_number); diff --git a/migrations/schema.sql b/migrations/schema.sql index 2c938aa5..83dd2c59 100644 --- a/migrations/schema.sql +++ b/migrations/schema.sql @@ -149,6 +149,13 @@ ALTER TABLE ONLY transactions ADD CONSTRAINT transactions_pkey PRIMARY KEY (id); +-- +-- Name: block_number_index; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX block_number_index ON blocks USING btree (block_number); + + -- -- Name: transactions fk_test; Type: FK CONSTRAINT; Schema: public; Owner: - --