Skip to content

Commit

Permalink
[api] add index to events sent_mail
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianschroeter committed Mar 6, 2017
1 parent fad10c0 commit df5013b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
9 changes: 9 additions & 0 deletions src/api/db/migrate/20170306105300_add_index_to_events.rb
@@ -0,0 +1,9 @@
class AddIndexToEvents < ActiveRecord::Migration
def self.up
add_index :events, :mails_sent
end

def self.down
remove_index :events, :mails_sent
end
end
4 changes: 3 additions & 1 deletion src/api/db/structure.sql
Expand Up @@ -481,7 +481,8 @@ CREATE TABLE `events` (
KEY `index_events_on_queued` (`queued`),
KEY `index_events_on_project_logged` (`project_logged`),
KEY `index_events_on_eventtype` (`eventtype`),
KEY `index_events_on_created_at` (`created_at`)
KEY `index_events_on_created_at` (`created_at`),
KEY `index_events_on_mails_sent` (`mails_sent`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE `flags` (
Expand Down Expand Up @@ -1402,6 +1403,7 @@ INSERT INTO schema_migrations (version) VALUES
('20170118091131'),
('20170123115500'),
('20170215231042'),
('20170306105300'),
('21'),
('22'),
('23'),
Expand Down

0 comments on commit df5013b

Please sign in to comment.