houston-core 0.7.0.beta3 → 0.7.0.beta4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (157) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +56 -56
  3. data/app/assets/javascripts/houston/app/infinite_scroll.coffee +6 -2
  4. data/app/assets/javascripts/houston/app/models/ticket.coffee +0 -42
  5. data/app/assets/javascripts/houston/app/ticket_tracker_refresh.coffee +0 -2
  6. data/app/assets/javascripts/houston/app/views/keyboard_shortcuts_modal.coffee +0 -6
  7. data/app/assets/javascripts/houston/core/handlebars_helpers.coffee +0 -5
  8. data/app/assets/stylesheets/houston/application/actions.scss +15 -0
  9. data/app/assets/stylesheets/houston/application/layout.scss +3 -0
  10. data/app/assets/stylesheets/houston/application/markdown.scss +1 -1
  11. data/app/assets/stylesheets/houston/application/navigation.scss +3 -1
  12. data/app/assets/stylesheets/houston/application/project_banner_buttons.scss +2 -0
  13. data/app/assets/stylesheets/houston/application/tables.scss +0 -1
  14. data/app/assets/stylesheets/houston/application/timeline.scss +1 -1
  15. data/app/assets/stylesheets/houston/core/overrides.scss +2 -1
  16. data/app/concerns/houston/props.rb +11 -4
  17. data/app/concerns/project_adapter.rb +1 -1
  18. data/app/concerns/unique_add.rb +1 -1
  19. data/app/controllers/actions_controller.rb +39 -0
  20. data/app/controllers/commits_controller.rb +1 -1
  21. data/app/controllers/errors_controller.rb +10 -0
  22. data/app/controllers/hooks_controller.rb +1 -1
  23. data/app/controllers/omnibar_controller.rb +1 -11
  24. data/app/controllers/project_hooks_controller.rb +2 -2
  25. data/app/controllers/projects_controller.rb +2 -0
  26. data/app/controllers/test_runs_controller.rb +14 -3
  27. data/app/controllers/triggers_controller.rb +8 -0
  28. data/app/helpers/actions_helper.rb +7 -0
  29. data/app/helpers/application_helper.rb +1 -1
  30. data/app/interactors/cache_key_dependencies.rb +1 -1
  31. data/app/interactors/test_run_comparer.rb +1 -1
  32. data/app/mailers/project_notification.rb +0 -31
  33. data/app/models/ability.rb +0 -11
  34. data/app/models/{job.rb → action.rb} +19 -7
  35. data/app/models/commit.rb +2 -2
  36. data/app/models/deploy.rb +3 -3
  37. data/app/models/github/comment_event.rb +9 -3
  38. data/app/models/github/post_receive_event.rb +1 -1
  39. data/app/models/github/pull_request.rb +5 -5
  40. data/app/models/persistent_trigger.rb +46 -0
  41. data/app/models/project.rb +0 -1
  42. data/app/models/release.rb +1 -1
  43. data/app/models/run_tests_on_post_receive.rb +17 -17
  44. data/app/models/task.rb +4 -4
  45. data/app/models/test_run.rb +18 -5
  46. data/app/models/ticket.rb +2 -21
  47. data/app/models/ticket_antecedent.rb +3 -3
  48. data/app/models/user.rb +0 -1
  49. data/app/views/actions/index.html.erb +69 -0
  50. data/app/views/actions/show.html.erb +45 -0
  51. data/app/views/commits/show.html.erb +7 -8
  52. data/app/views/errors/_actions.html.erb +11 -0
  53. data/app/views/errors/index.html.erb +39 -0
  54. data/app/views/layouts/_mobile_navigation.html.erb +1 -9
  55. data/app/views/layouts/_navigation.html.erb +14 -8
  56. data/app/views/layouts/application.html.erb +1 -3
  57. data/app/views/project_notification/test_run.html.erb +13 -3
  58. data/app/views/projects/_form.html.erb +13 -7
  59. data/app/views/triggers/index.html.erb +39 -0
  60. data/config/initializers/add_navigation_renderers.rb +0 -6
  61. data/config/initializers/houston_async.rb +4 -2
  62. data/config/initializers/houston_scheduler_daemon.rb +6 -0
  63. data/config/initializers/load_persistent_triggers.rb +7 -0
  64. data/config/initializers/requirements.rb +2 -1
  65. data/config/initializers/sync_commits_on_post_receive.rb +2 -2
  66. data/config/routes.rb +17 -15
  67. data/db/migrate/20160711170921_rename_jobs_to_actions.rb +5 -0
  68. data/db/migrate/20160713204605_add_trigger_and_params_to_actions.rb +6 -0
  69. data/db/migrate/20160715173039_create_persistent_triggers.rb +10 -0
  70. data/db/structure.sql +197 -221
  71. data/houston-core.gemspec +1 -1
  72. data/lib/houston/boot/actions.rb +105 -0
  73. data/lib/houston/boot/active_record_serializer.rb +24 -0
  74. data/lib/houston/boot/configuration.rb +118 -49
  75. data/lib/houston/boot/events.rb +46 -0
  76. data/lib/houston/boot/extensions.rb +118 -14
  77. data/lib/houston/boot/observer.rb +122 -24
  78. data/lib/houston/boot/readonly_hash_serializer.rb +15 -0
  79. data/lib/houston/boot/serializer.rb +83 -0
  80. data/lib/houston/boot/ticket_antecedent_serializer.rb +21 -0
  81. data/lib/houston/boot/timer.rb +45 -0
  82. data/lib/houston/boot/triggers.rb +75 -0
  83. data/lib/houston/boot.rb +5 -0
  84. data/lib/houston/version.rb +1 -1
  85. data/lib/params_serializer.rb +18 -0
  86. data/lib/tasks/actions.rake +12 -0
  87. data/lib/tasks/events.rake +11 -0
  88. data/templates/new-instance/config/abilities.rb +0 -8
  89. data/templates/new-instance/config/{triggers → events}/alerts/slack_when_assigned.rb +1 -1
  90. data/templates/new-instance/config/{triggers → events}/alerts/slack_when_opened.rb +1 -1
  91. data/templates/new-instance/config/{triggers → events}/daemons/health.rb +6 -6
  92. data/templates/new-instance/config/{triggers → events}/deploy/autoresolve_errs.rb +1 -1
  93. data/templates/new-instance/config/{triggers → events}/deploy/checkout_mentioned_alerts.rb +1 -1
  94. data/templates/new-instance/config/{triggers → events}/deploy/notify_deployer_when_finished.rb +2 -2
  95. data/templates/new-instance/config/{triggers → events}/github/publish_comments_on_slack.rb +9 -9
  96. data/templates/new-instance/config/{triggers → events}/tests/slack_when_analyzed.rb +1 -1
  97. data/templates/new-instance/config/{triggers → events}/tests/slack_when_completed.rb +1 -1
  98. data/templates/new-instance/config/{triggers → events}/tickets/mark_tasks_completed_on_commit.rb +1 -1
  99. data/templates/new-instance/config/main.rb +8 -35
  100. data/templates/new-instance/config/{jobs → timers}/cache_key_dependencies.rb +0 -0
  101. data/templates/new-instance/config/{jobs → timers}/email_about_open_alerts.rb +0 -0
  102. data/templates/new-instance/config/{jobs → timers}/purge_jobs.rb +0 -0
  103. data/templates/new-instance/config/{jobs → timers}/slack_reminders_about_alerts.rb +0 -0
  104. data/templates/new-instance/config/{jobs → timers}/sync_commits.rb +0 -0
  105. data/templates/new-instance/config/{jobs → timers}/sync_pull_requests.rb +0 -0
  106. data/templates/new-instance/config/{jobs → timers}/sync_tickets.rb +0 -0
  107. data/templates/new-module/lib/houston/%name%.rb +13 -0
  108. data/test/integration/ci_integration_test.rb +5 -5
  109. data/test/integration/web_hook_test.rb +1 -1
  110. data/test/test_helper.rb +14 -0
  111. data/test/unit/controllers/hooks_controller_test.rb +2 -2
  112. data/test/unit/initializers/sync_commits_on_post_receive_test.rb +1 -1
  113. data/test/unit/models/actions_test.rb +107 -0
  114. data/test/unit/models/configuration_test.rb +108 -0
  115. data/test/unit/models/observer_test.rb +87 -3
  116. data/test/unit/models/persistent_trigger_test.rb +94 -0
  117. data/test/unit/models/serializer_test.rb +80 -0
  118. data/test/unit/models/triggers_test.rb +53 -0
  119. metadata +60 -60
  120. data/app/assets/javascripts/houston/app/models/testing_note.coffee +0 -18
  121. data/app/assets/javascripts/houston/app/views/commit_view.coffee +0 -13
  122. data/app/assets/javascripts/houston/app/views/testing_note_view.coffee +0 -85
  123. data/app/assets/javascripts/houston/app/views/testing_report_view.coffee +0 -29
  124. data/app/assets/javascripts/houston/app/views/testing_ticket_view.coffee +0 -203
  125. data/app/assets/stylesheets/houston/application/jobs.scss +0 -5
  126. data/app/assets/stylesheets/houston/application/testing_report.scss +0 -279
  127. data/app/assets/templates/commit.hbs +0 -9
  128. data/app/assets/templates/testing_notes/edit.hbs +0 -20
  129. data/app/assets/templates/testing_notes/new.hbs +0 -27
  130. data/app/assets/templates/testing_notes/show.hbs +0 -11
  131. data/app/assets/templates/testing_report/description.hbs +0 -12
  132. data/app/assets/templates/testing_report/ticket.hbs +0 -21
  133. data/app/assets/templates/testing_report/verdict.hbs +0 -4
  134. data/app/controllers/jobs_controller.rb +0 -42
  135. data/app/controllers/testing_notes_controller.rb +0 -50
  136. data/app/controllers/testing_report_controller.rb +0 -38
  137. data/app/models/testing_note.rb +0 -64
  138. data/app/presenters/testing_note_presenter.rb +0 -27
  139. data/app/presenters/testing_report_ticket_presenter.rb +0 -71
  140. data/app/views/jobs/index.html.erb +0 -72
  141. data/app/views/jobs/show.html.erb +0 -41
  142. data/app/views/project_notification/testing_note.html.erb +0 -9
  143. data/app/views/testing_report/_scripts.html.erb +0 -12
  144. data/app/views/testing_report/index.html.erb +0 -31
  145. data/app/views/testing_report/show.html.erb +0 -29
  146. data/config/initializers/houston_scheduler.rb +0 -23
  147. data/db/migrate/20120424212706_create_testing_notes.rb +0 -14
  148. data/db/migrate/20120501231817_add_expires_at_to_testing_notes.rb +0 -5
  149. data/db/migrate/20120501231948_add_unfuddle_id_to_testing_notes.rb +0 -5
  150. data/db/migrate/20120715230526_change_testing_notes_comment_to_text.rb +0 -9
  151. data/db/migrate/20130211015046_add_min_passing_verdicts_to_projects.rb +0 -5
  152. data/db/migrate/20130407220039_add_project_id_to_testing_notes.rb +0 -26
  153. data/db/migrate/20140511024021_rename_testing_notes_unfuddle_id_to_remote_id.rb +0 -5
  154. data/templates/new-instance/config/triggers/tickets/email_testing_notes.rb +0 -7
  155. data/templates/new-instance/log/development.log +0 -41253
  156. data/templates/new-instance/log/test.log +0 -545
  157. data/templates/new-module/config/initializers/add_navigation_renderer.rb +0 -3
data/db/structure.sql CHANGED
@@ -54,6 +54,41 @@ SET default_tablespace = '';
54
54
 
55
55
  SET default_with_oids = false;
56
56
 
57
+ --
58
+ -- Name: actions; Type: TABLE; Schema: public; Owner: -; Tablespace:
59
+ --
60
+
61
+ CREATE TABLE actions (
62
+ id integer NOT NULL,
63
+ name character varying NOT NULL,
64
+ started_at timestamp without time zone NOT NULL,
65
+ finished_at timestamp without time zone,
66
+ succeeded boolean,
67
+ error_id integer,
68
+ trigger character varying,
69
+ params jsonb
70
+ );
71
+
72
+
73
+ --
74
+ -- Name: actions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
75
+ --
76
+
77
+ CREATE SEQUENCE actions_id_seq
78
+ START WITH 1
79
+ INCREMENT BY 1
80
+ NO MINVALUE
81
+ NO MAXVALUE
82
+ CACHE 1;
83
+
84
+
85
+ --
86
+ -- Name: actions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
87
+ --
88
+
89
+ ALTER SEQUENCE actions_id_seq OWNED BY actions.id;
90
+
91
+
57
92
  --
58
93
  -- Name: authorizations; Type: TABLE; Schema: public; Owner: -; Tablespace:
59
94
  --
@@ -99,17 +134,17 @@ ALTER SEQUENCE authorizations_id_seq OWNED BY authorizations.id;
99
134
  CREATE TABLE commits (
100
135
  id integer NOT NULL,
101
136
  release_id integer,
102
- sha character varying(255),
137
+ sha character varying,
103
138
  message text,
104
- committer character varying(255),
139
+ committer character varying,
105
140
  date date,
106
141
  created_at timestamp without time zone,
107
142
  updated_at timestamp without time zone,
108
- committer_email character varying(255),
143
+ committer_email character varying,
109
144
  project_id integer NOT NULL,
110
145
  authored_at timestamp without time zone NOT NULL,
111
146
  unreachable boolean DEFAULT false NOT NULL,
112
- parent_sha character varying(255)
147
+ parent_sha character varying
113
148
  );
114
149
 
115
150
 
@@ -191,10 +226,10 @@ CREATE TABLE consumer_tokens (
191
226
  user_id integer,
192
227
  type character varying(30),
193
228
  token character varying(1024),
194
- refresh_token character varying(255),
195
- secret character varying(255),
229
+ refresh_token character varying,
230
+ secret character varying,
196
231
  expires_at integer,
197
- expires_in character varying(255),
232
+ expires_in character varying,
198
233
  created_at timestamp without time zone,
199
234
  updated_at timestamp without time zone
200
235
  );
@@ -226,17 +261,17 @@ ALTER SEQUENCE consumer_tokens_id_seq OWNED BY consumer_tokens.id;
226
261
  CREATE TABLE deploys (
227
262
  id integer NOT NULL,
228
263
  project_id integer,
229
- sha character varying(255) NOT NULL,
264
+ sha character varying NOT NULL,
230
265
  created_at timestamp without time zone,
231
266
  updated_at timestamp without time zone,
232
- environment_name character varying(255) DEFAULT 'Production'::character varying NOT NULL,
233
- deployer character varying(255),
267
+ environment_name character varying DEFAULT 'Production'::character varying NOT NULL,
268
+ deployer character varying,
234
269
  commit_id integer,
235
270
  duration integer,
236
- branch character varying(255),
271
+ branch character varying,
272
+ completed_at timestamp without time zone,
237
273
  output text,
238
274
  user_id integer,
239
- completed_at timestamp without time zone,
240
275
  successful boolean DEFAULT false NOT NULL
241
276
  );
242
277
 
@@ -293,51 +328,20 @@ CREATE SEQUENCE errors_id_seq
293
328
  ALTER SEQUENCE errors_id_seq OWNED BY errors.id;
294
329
 
295
330
 
296
- --
297
- -- Name: jobs; Type: TABLE; Schema: public; Owner: -; Tablespace:
298
- --
299
-
300
- CREATE TABLE jobs (
301
- id integer NOT NULL,
302
- name character varying NOT NULL,
303
- started_at timestamp without time zone NOT NULL,
304
- finished_at timestamp without time zone,
305
- succeeded boolean,
306
- error_id integer
307
- );
308
-
309
-
310
- --
311
- -- Name: jobs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
312
- --
313
-
314
- CREATE SEQUENCE jobs_id_seq
315
- START WITH 1
316
- INCREMENT BY 1
317
- NO MINVALUE
318
- NO MAXVALUE
319
- CACHE 1;
320
-
321
-
322
- --
323
- -- Name: jobs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
324
- --
325
-
326
- ALTER SEQUENCE jobs_id_seq OWNED BY jobs.id;
327
-
328
-
329
331
  --
330
332
  -- Name: measurements; Type: TABLE; Schema: public; Owner: -; Tablespace:
331
333
  --
332
334
 
333
335
  CREATE TABLE measurements (
334
336
  id integer NOT NULL,
335
- subject_type character varying(255),
337
+ subject_type character varying,
336
338
  subject_id integer,
337
- name character varying(255) NOT NULL,
338
- value character varying(255) NOT NULL,
339
+ name character varying NOT NULL,
340
+ value character varying NOT NULL,
339
341
  taken_at timestamp without time zone NOT NULL,
340
- taken_on date NOT NULL
342
+ taken_on date NOT NULL,
343
+ created_at timestamp without time zone,
344
+ updated_at timestamp without time zone
341
345
  );
342
346
 
343
347
 
@@ -368,7 +372,7 @@ CREATE TABLE milestones (
368
372
  id integer NOT NULL,
369
373
  project_id integer NOT NULL,
370
374
  remote_id integer,
371
- name character varying(255) NOT NULL,
375
+ name character varying NOT NULL,
372
376
  tickets_count integer DEFAULT 0,
373
377
  completed_at timestamp without time zone,
374
378
  extended_attributes hstore DEFAULT ''::hstore NOT NULL,
@@ -434,6 +438,38 @@ CREATE SEQUENCE oauth_providers_id_seq
434
438
  ALTER SEQUENCE oauth_providers_id_seq OWNED BY oauth_providers.id;
435
439
 
436
440
 
441
+ --
442
+ -- Name: persistent_triggers; Type: TABLE; Schema: public; Owner: -; Tablespace:
443
+ --
444
+
445
+ CREATE TABLE persistent_triggers (
446
+ id integer NOT NULL,
447
+ type character varying NOT NULL,
448
+ value text NOT NULL,
449
+ params text DEFAULT '{}'::text NOT NULL,
450
+ action character varying NOT NULL
451
+ );
452
+
453
+
454
+ --
455
+ -- Name: persistent_triggers_id_seq; Type: SEQUENCE; Schema: public; Owner: -
456
+ --
457
+
458
+ CREATE SEQUENCE persistent_triggers_id_seq
459
+ START WITH 1
460
+ INCREMENT BY 1
461
+ NO MINVALUE
462
+ NO MAXVALUE
463
+ CACHE 1;
464
+
465
+
466
+ --
467
+ -- Name: persistent_triggers_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
468
+ --
469
+
470
+ ALTER SEQUENCE persistent_triggers_id_seq OWNED BY persistent_triggers.id;
471
+
472
+
437
473
  --
438
474
  -- Name: project_quotas; Type: TABLE; Schema: public; Owner: -; Tablespace:
439
475
  --
@@ -473,26 +509,25 @@ ALTER SEQUENCE project_quotas_id_seq OWNED BY project_quotas.id;
473
509
 
474
510
  CREATE TABLE projects (
475
511
  id integer NOT NULL,
476
- name character varying(255) NOT NULL,
477
- slug character varying(255) NOT NULL,
512
+ name character varying NOT NULL,
513
+ slug character varying NOT NULL,
478
514
  created_at timestamp without time zone,
479
515
  updated_at timestamp without time zone,
480
- color character varying(255) DEFAULT 'default'::character varying NOT NULL,
516
+ color character varying DEFAULT 'default'::character varying NOT NULL,
481
517
  retired_at timestamp without time zone,
482
- category character varying(255),
483
- version_control_name character varying(255) DEFAULT 'None'::character varying NOT NULL,
484
- ticket_tracker_name character varying(255) DEFAULT 'None'::character varying NOT NULL,
485
- ci_server_name character varying(255) DEFAULT 'None'::character varying NOT NULL,
486
- min_passing_verdicts integer DEFAULT 1 NOT NULL,
487
- error_tracker_name character varying(255) DEFAULT 'None'::character varying,
518
+ category character varying,
519
+ version_control_name character varying DEFAULT 'None'::character varying NOT NULL,
520
+ ticket_tracker_name character varying DEFAULT 'None'::character varying NOT NULL,
521
+ ci_server_name character varying DEFAULT 'None'::character varying NOT NULL,
522
+ error_tracker_name character varying DEFAULT 'None'::character varying,
488
523
  extended_attributes hstore DEFAULT ''::hstore NOT NULL,
489
- code_climate_repo_token character varying(255) DEFAULT ''::character varying NOT NULL,
524
+ code_climate_repo_token character varying DEFAULT ''::character varying NOT NULL,
490
525
  last_ticket_tracker_sync_at timestamp without time zone,
491
526
  ticket_tracker_sync_started_at timestamp without time zone,
492
527
  view_options hstore DEFAULT ''::hstore NOT NULL,
493
528
  feature_states hstore DEFAULT ''::hstore NOT NULL,
494
529
  selected_features text[],
495
- head_sha character varying(255),
530
+ head_sha character varying,
496
531
  props jsonb DEFAULT '{}'::jsonb
497
532
  );
498
533
 
@@ -524,18 +559,18 @@ CREATE TABLE pull_requests (
524
559
  id integer NOT NULL,
525
560
  project_id integer NOT NULL,
526
561
  user_id integer,
527
- title character varying(255) NOT NULL,
562
+ title character varying NOT NULL,
528
563
  number integer NOT NULL,
529
- repo character varying(255) NOT NULL,
530
- username character varying(255) NOT NULL,
531
- url character varying(255) NOT NULL,
532
- base_ref character varying(255) NOT NULL,
533
- base_sha character varying(255) NOT NULL,
534
- head_ref character varying(255) NOT NULL,
535
- head_sha character varying(255) NOT NULL,
564
+ repo character varying NOT NULL,
565
+ username character varying NOT NULL,
566
+ url character varying NOT NULL,
567
+ base_ref character varying NOT NULL,
568
+ base_sha character varying NOT NULL,
569
+ head_ref character varying NOT NULL,
570
+ head_sha character varying NOT NULL,
536
571
  body text,
537
572
  props jsonb DEFAULT '{}'::jsonb,
538
- avatar_url character varying(255),
573
+ avatar_url character varying,
539
574
  json_labels jsonb DEFAULT '[]'::jsonb,
540
575
  created_at timestamp without time zone,
541
576
  updated_at timestamp without time zone,
@@ -569,16 +604,16 @@ ALTER SEQUENCE pull_requests_id_seq OWNED BY pull_requests.id;
569
604
 
570
605
  CREATE TABLE releases (
571
606
  id integer NOT NULL,
572
- name character varying(255),
573
- commit0 character varying(255),
574
- commit1 character varying(255),
607
+ name character varying,
608
+ commit0 character varying,
609
+ commit1 character varying,
575
610
  created_at timestamp without time zone,
576
611
  updated_at timestamp without time zone,
577
612
  user_id integer NOT NULL,
578
613
  message text DEFAULT ''::text NOT NULL,
579
614
  deploy_id integer,
580
615
  project_id integer DEFAULT (-1) NOT NULL,
581
- environment_name character varying(255) DEFAULT 'Production'::character varying NOT NULL,
616
+ environment_name character varying DEFAULT 'Production'::character varying NOT NULL,
582
617
  release_changes text DEFAULT ''::text NOT NULL,
583
618
  commit_before_id integer,
584
619
  commit_after_id integer,
@@ -633,7 +668,7 @@ CREATE TABLE roles (
633
668
  id integer NOT NULL,
634
669
  user_id integer,
635
670
  project_id integer,
636
- name character varying(255) NOT NULL,
671
+ name character varying NOT NULL,
637
672
  created_at timestamp without time zone,
638
673
  updated_at timestamp without time zone
639
674
  );
@@ -663,7 +698,7 @@ ALTER SEQUENCE roles_id_seq OWNED BY roles.id;
663
698
  --
664
699
 
665
700
  CREATE TABLE schema_migrations (
666
- version character varying(255) NOT NULL
701
+ version character varying NOT NULL
667
702
  );
668
703
 
669
704
 
@@ -673,8 +708,8 @@ CREATE TABLE schema_migrations (
673
708
 
674
709
  CREATE TABLE settings (
675
710
  id integer NOT NULL,
676
- name character varying(255) NOT NULL,
677
- value character varying(255) NOT NULL
711
+ name character varying NOT NULL,
712
+ value character varying NOT NULL
678
713
  );
679
714
 
680
715
 
@@ -749,7 +784,7 @@ CREATE TABLE tasks (
749
784
  id integer NOT NULL,
750
785
  ticket_id integer NOT NULL,
751
786
  number integer NOT NULL,
752
- description character varying(255),
787
+ description character varying,
753
788
  effort numeric(6,2),
754
789
  first_release_at timestamp without time zone,
755
790
  first_commit_at timestamp without time zone,
@@ -786,7 +821,7 @@ ALTER SEQUENCE tasks_id_seq OWNED BY tasks.id;
786
821
 
787
822
  CREATE TABLE test_errors (
788
823
  id integer NOT NULL,
789
- sha character varying(255),
824
+ sha character varying,
790
825
  output text
791
826
  );
792
827
 
@@ -852,10 +887,10 @@ ALTER SEQUENCE test_results_id_seq OWNED BY test_results.id;
852
887
  CREATE TABLE test_runs (
853
888
  id integer NOT NULL,
854
889
  project_id integer NOT NULL,
855
- sha character varying(255) NOT NULL,
890
+ sha character varying NOT NULL,
856
891
  completed_at timestamp without time zone,
857
- results_url character varying(255),
858
- result character varying(255),
892
+ results_url character varying,
893
+ result character varying,
859
894
  duration integer DEFAULT 0 NOT NULL,
860
895
  fail_count integer DEFAULT 0 NOT NULL,
861
896
  pass_count integer DEFAULT 0 NOT NULL,
@@ -864,15 +899,15 @@ CREATE TABLE test_runs (
864
899
  updated_at timestamp without time zone,
865
900
  tests text,
866
901
  total_count integer DEFAULT 0 NOT NULL,
867
- agent_email character varying(255),
868
- branch character varying(255),
902
+ agent_email character varying,
903
+ branch character varying,
869
904
  coverage text,
870
905
  covered_percent numeric(6,5) DEFAULT 0 NOT NULL,
871
906
  covered_strength numeric(6,5) DEFAULT 0 NOT NULL,
872
907
  regression_count integer DEFAULT 0 NOT NULL,
908
+ commit_id integer,
873
909
  user_id integer,
874
- compared boolean DEFAULT false NOT NULL,
875
- commit_id integer
910
+ compared boolean DEFAULT false NOT NULL
876
911
  );
877
912
 
878
913
 
@@ -895,43 +930,6 @@ CREATE SEQUENCE test_runs_id_seq
895
930
  ALTER SEQUENCE test_runs_id_seq OWNED BY test_runs.id;
896
931
 
897
932
 
898
- --
899
- -- Name: testing_notes; Type: TABLE; Schema: public; Owner: -; Tablespace:
900
- --
901
-
902
- CREATE TABLE testing_notes (
903
- id integer NOT NULL,
904
- user_id integer,
905
- ticket_id integer,
906
- verdict character varying(255) NOT NULL,
907
- comment text DEFAULT ''::character varying NOT NULL,
908
- created_at timestamp without time zone,
909
- updated_at timestamp without time zone,
910
- expires_at timestamp without time zone,
911
- remote_id integer,
912
- project_id integer NOT NULL
913
- );
914
-
915
-
916
- --
917
- -- Name: testing_notes_id_seq; Type: SEQUENCE; Schema: public; Owner: -
918
- --
919
-
920
- CREATE SEQUENCE testing_notes_id_seq
921
- START WITH 1
922
- INCREMENT BY 1
923
- NO MINVALUE
924
- NO MAXVALUE
925
- CACHE 1;
926
-
927
-
928
- --
929
- -- Name: testing_notes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
930
- --
931
-
932
- ALTER SEQUENCE testing_notes_id_seq OWNED BY testing_notes.id;
933
-
934
-
935
933
  --
936
934
  -- Name: tests; Type: TABLE; Schema: public; Owner: -; Tablespace:
937
935
  --
@@ -939,7 +937,7 @@ ALTER SEQUENCE testing_notes_id_seq OWNED BY testing_notes.id;
939
937
  CREATE TABLE tests (
940
938
  id integer NOT NULL,
941
939
  project_id integer NOT NULL,
942
- suite character varying(255) NOT NULL,
940
+ suite character varying NOT NULL,
943
941
  name text NOT NULL
944
942
  );
945
943
 
@@ -970,7 +968,7 @@ ALTER SEQUENCE tests_id_seq OWNED BY tests.id;
970
968
  CREATE TABLE ticket_queues (
971
969
  id integer NOT NULL,
972
970
  ticket_id integer,
973
- queue character varying(255),
971
+ queue character varying,
974
972
  destroyed_at timestamp without time zone,
975
973
  created_at timestamp without time zone,
976
974
  updated_at timestamp without time zone
@@ -1004,26 +1002,26 @@ CREATE TABLE tickets (
1004
1002
  id integer NOT NULL,
1005
1003
  project_id integer,
1006
1004
  number integer NOT NULL,
1007
- summary character varying(255),
1005
+ summary character varying,
1008
1006
  description text,
1009
1007
  created_at timestamp without time zone,
1010
1008
  updated_at timestamp without time zone,
1011
1009
  remote_id integer,
1012
- deployment character varying(255),
1010
+ deployment character varying,
1013
1011
  last_release_at timestamp without time zone,
1014
1012
  expires_at timestamp without time zone,
1015
1013
  extended_attributes hstore DEFAULT ''::hstore NOT NULL,
1016
1014
  antecedents text[],
1017
- tags character varying(255)[],
1018
- type character varying(255),
1015
+ tags character varying[],
1016
+ type character varying,
1019
1017
  closed_at timestamp without time zone,
1020
- reporter_email character varying(255),
1018
+ reporter_email character varying,
1021
1019
  reporter_id integer,
1022
1020
  milestone_id integer,
1023
1021
  destroyed_at timestamp without time zone,
1024
- resolution character varying(255) DEFAULT ''::character varying NOT NULL,
1022
+ resolution character varying DEFAULT ''::character varying NOT NULL,
1025
1023
  first_release_at timestamp without time zone,
1026
- priority character varying(255) DEFAULT 'normal'::character varying NOT NULL,
1024
+ priority character varying DEFAULT 'normal'::character varying NOT NULL,
1027
1025
  reopened_at timestamp without time zone,
1028
1026
  prerequisites integer[]
1029
1027
  );
@@ -1055,8 +1053,8 @@ ALTER SEQUENCE tickets_id_seq OWNED BY tickets.id;
1055
1053
  CREATE TABLE user_credentials (
1056
1054
  id integer NOT NULL,
1057
1055
  user_id integer,
1058
- service character varying(255),
1059
- login character varying(255),
1056
+ service character varying,
1057
+ login character varying,
1060
1058
  password bytea,
1061
1059
  password_key bytea,
1062
1060
  password_iv bytea,
@@ -1090,16 +1088,16 @@ ALTER SEQUENCE user_credentials_id_seq OWNED BY user_credentials.id;
1090
1088
 
1091
1089
  CREATE TABLE users (
1092
1090
  id integer NOT NULL,
1093
- email character varying(255) DEFAULT ''::character varying NOT NULL,
1094
- encrypted_password character varying(255) DEFAULT ''::character varying,
1095
- reset_password_token character varying(255),
1091
+ email character varying DEFAULT ''::character varying NOT NULL,
1092
+ encrypted_password character varying DEFAULT ''::character varying,
1093
+ reset_password_token character varying,
1096
1094
  reset_password_sent_at timestamp without time zone,
1097
1095
  remember_created_at timestamp without time zone,
1098
1096
  sign_in_count integer DEFAULT 0,
1099
1097
  current_sign_in_at timestamp without time zone,
1100
1098
  last_sign_in_at timestamp without time zone,
1101
- current_sign_in_ip character varying(255),
1102
- last_sign_in_ip character varying(255),
1099
+ current_sign_in_ip character varying,
1100
+ last_sign_in_ip character varying,
1103
1101
  created_at timestamp without time zone,
1104
1102
  updated_at timestamp without time zone,
1105
1103
  invitation_token character varying,
@@ -1107,21 +1105,21 @@ CREATE TABLE users (
1107
1105
  invitation_accepted_at timestamp without time zone,
1108
1106
  invitation_limit integer,
1109
1107
  invited_by_id integer,
1110
- invited_by_type character varying(255),
1111
- role character varying(255) DEFAULT 'Guest'::character varying,
1112
- authentication_token character varying(255),
1108
+ invited_by_type character varying,
1109
+ role character varying DEFAULT 'Guest'::character varying,
1110
+ authentication_token character varying,
1113
1111
  administrator boolean DEFAULT false,
1114
1112
  unfuddle_id integer,
1115
- first_name character varying(255),
1116
- last_name character varying(255),
1113
+ first_name character varying,
1114
+ last_name character varying,
1117
1115
  retired_at timestamp without time zone,
1118
1116
  view_options hstore DEFAULT ''::hstore NOT NULL,
1119
1117
  email_addresses text[],
1120
1118
  invitation_created_at timestamp without time zone,
1121
- current_project_id integer,
1122
- nickname character varying(255),
1123
- username character varying(255),
1124
1119
  environments_subscribed_to text[] DEFAULT '{}'::text[] NOT NULL,
1120
+ current_project_id integer,
1121
+ nickname character varying,
1122
+ username character varying,
1125
1123
  props jsonb DEFAULT '{}'::jsonb
1126
1124
  );
1127
1125
 
@@ -1153,7 +1151,7 @@ CREATE TABLE value_statements (
1153
1151
  id integer NOT NULL,
1154
1152
  project_id integer NOT NULL,
1155
1153
  weight double precision NOT NULL,
1156
- text character varying(255) NOT NULL
1154
+ text character varying NOT NULL
1157
1155
  );
1158
1156
 
1159
1157
 
@@ -1183,14 +1181,14 @@ ALTER SEQUENCE value_statements_id_seq OWNED BY value_statements.id;
1183
1181
  CREATE TABLE versions (
1184
1182
  id integer NOT NULL,
1185
1183
  versioned_id integer,
1186
- versioned_type character varying(255),
1184
+ versioned_type character varying,
1187
1185
  user_id integer,
1188
- user_type character varying(255),
1189
- user_name character varying(255),
1186
+ user_type character varying,
1187
+ user_name character varying,
1190
1188
  modifications text,
1191
1189
  number integer,
1192
1190
  reverted_from integer,
1193
- tag character varying(255),
1191
+ tag character varying,
1194
1192
  created_at timestamp without time zone,
1195
1193
  updated_at timestamp without time zone
1196
1194
  );
@@ -1215,6 +1213,13 @@ CREATE SEQUENCE versions_id_seq
1215
1213
  ALTER SEQUENCE versions_id_seq OWNED BY versions.id;
1216
1214
 
1217
1215
 
1216
+ --
1217
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1218
+ --
1219
+
1220
+ ALTER TABLE ONLY actions ALTER COLUMN id SET DEFAULT nextval('actions_id_seq'::regclass);
1221
+
1222
+
1218
1223
  --
1219
1224
  -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1220
1225
  --
@@ -1254,28 +1259,28 @@ ALTER TABLE ONLY errors ALTER COLUMN id SET DEFAULT nextval('errors_id_seq'::reg
1254
1259
  -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1255
1260
  --
1256
1261
 
1257
- ALTER TABLE ONLY jobs ALTER COLUMN id SET DEFAULT nextval('jobs_id_seq'::regclass);
1262
+ ALTER TABLE ONLY measurements ALTER COLUMN id SET DEFAULT nextval('measurements_id_seq'::regclass);
1258
1263
 
1259
1264
 
1260
1265
  --
1261
1266
  -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1262
1267
  --
1263
1268
 
1264
- ALTER TABLE ONLY measurements ALTER COLUMN id SET DEFAULT nextval('measurements_id_seq'::regclass);
1269
+ ALTER TABLE ONLY milestones ALTER COLUMN id SET DEFAULT nextval('milestones_id_seq'::regclass);
1265
1270
 
1266
1271
 
1267
1272
  --
1268
1273
  -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1269
1274
  --
1270
1275
 
1271
- ALTER TABLE ONLY milestones ALTER COLUMN id SET DEFAULT nextval('milestones_id_seq'::regclass);
1276
+ ALTER TABLE ONLY oauth_providers ALTER COLUMN id SET DEFAULT nextval('oauth_providers_id_seq'::regclass);
1272
1277
 
1273
1278
 
1274
1279
  --
1275
1280
  -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1276
1281
  --
1277
1282
 
1278
- ALTER TABLE ONLY oauth_providers ALTER COLUMN id SET DEFAULT nextval('oauth_providers_id_seq'::regclass);
1283
+ ALTER TABLE ONLY persistent_triggers ALTER COLUMN id SET DEFAULT nextval('persistent_triggers_id_seq'::regclass);
1279
1284
 
1280
1285
 
1281
1286
  --
@@ -1355,13 +1360,6 @@ ALTER TABLE ONLY test_results ALTER COLUMN id SET DEFAULT nextval('test_results_
1355
1360
  ALTER TABLE ONLY test_runs ALTER COLUMN id SET DEFAULT nextval('test_runs_id_seq'::regclass);
1356
1361
 
1357
1362
 
1358
- --
1359
- -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1360
- --
1361
-
1362
- ALTER TABLE ONLY testing_notes ALTER COLUMN id SET DEFAULT nextval('testing_notes_id_seq'::regclass);
1363
-
1364
-
1365
1363
  --
1366
1364
  -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1367
1365
  --
@@ -1411,6 +1409,14 @@ ALTER TABLE ONLY value_statements ALTER COLUMN id SET DEFAULT nextval('value_sta
1411
1409
  ALTER TABLE ONLY versions ALTER COLUMN id SET DEFAULT nextval('versions_id_seq'::regclass);
1412
1410
 
1413
1411
 
1412
+ --
1413
+ -- Name: actions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1414
+ --
1415
+
1416
+ ALTER TABLE ONLY actions
1417
+ ADD CONSTRAINT actions_pkey PRIMARY KEY (id);
1418
+
1419
+
1414
1420
  --
1415
1421
  -- Name: authorizations_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1416
1422
  --
@@ -1451,14 +1457,6 @@ ALTER TABLE ONLY errors
1451
1457
  ADD CONSTRAINT errors_pkey PRIMARY KEY (id);
1452
1458
 
1453
1459
 
1454
- --
1455
- -- Name: jobs_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1456
- --
1457
-
1458
- ALTER TABLE ONLY jobs
1459
- ADD CONSTRAINT jobs_pkey PRIMARY KEY (id);
1460
-
1461
-
1462
1460
  --
1463
1461
  -- Name: measurements_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1464
1462
  --
@@ -1483,6 +1481,14 @@ ALTER TABLE ONLY oauth_providers
1483
1481
  ADD CONSTRAINT oauth_providers_pkey PRIMARY KEY (id);
1484
1482
 
1485
1483
 
1484
+ --
1485
+ -- Name: persistent_triggers_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1486
+ --
1487
+
1488
+ ALTER TABLE ONLY persistent_triggers
1489
+ ADD CONSTRAINT persistent_triggers_pkey PRIMARY KEY (id);
1490
+
1491
+
1486
1492
  --
1487
1493
  -- Name: project_quotas_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1488
1494
  --
@@ -1579,14 +1585,6 @@ ALTER TABLE ONLY test_runs
1579
1585
  ADD CONSTRAINT test_runs_pkey PRIMARY KEY (id);
1580
1586
 
1581
1587
 
1582
- --
1583
- -- Name: testing_notes_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1584
- --
1585
-
1586
- ALTER TABLE ONLY testing_notes
1587
- ADD CONSTRAINT testing_notes_pkey PRIMARY KEY (id);
1588
-
1589
-
1590
1588
  --
1591
1589
  -- Name: tests_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1592
1590
  --
@@ -1651,6 +1649,13 @@ ALTER TABLE ONLY versions
1651
1649
  ADD CONSTRAINT versions_pkey PRIMARY KEY (id);
1652
1650
 
1653
1651
 
1652
+ --
1653
+ -- Name: index_actions_on_name; Type: INDEX; Schema: public; Owner: -; Tablespace:
1654
+ --
1655
+
1656
+ CREATE INDEX index_actions_on_name ON actions USING btree (name);
1657
+
1658
+
1654
1659
  --
1655
1660
  -- Name: index_commits_on_project_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
1656
1661
  --
@@ -1735,13 +1740,6 @@ CREATE INDEX index_deploys_on_project_id_and_environment_name ON deploys USING b
1735
1740
  CREATE UNIQUE INDEX index_errors_on_sha ON errors USING btree (sha);
1736
1741
 
1737
1742
 
1738
- --
1739
- -- Name: index_jobs_on_name; Type: INDEX; Schema: public; Owner: -; Tablespace:
1740
- --
1741
-
1742
- CREATE INDEX index_jobs_on_name ON jobs USING btree (name);
1743
-
1744
-
1745
1743
  --
1746
1744
  -- Name: index_measurements_on_name; Type: INDEX; Schema: public; Owner: -; Tablespace:
1747
1745
  --
@@ -1925,38 +1923,24 @@ CREATE INDEX index_test_results_on_test_run_id ON test_results USING btree (test
1925
1923
 
1926
1924
 
1927
1925
  --
1928
- -- Name: index_test_runs_on_project_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
1929
- --
1930
-
1931
- CREATE INDEX index_test_runs_on_project_id ON test_runs USING btree (project_id);
1932
-
1933
-
1934
- --
1935
- -- Name: index_test_runs_on_sha; Type: INDEX; Schema: public; Owner: -; Tablespace:
1936
- --
1937
-
1938
- CREATE UNIQUE INDEX index_test_runs_on_sha ON test_runs USING btree (sha);
1939
-
1940
-
1941
- --
1942
- -- Name: index_testing_notes_on_project_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
1926
+ -- Name: index_test_runs_on_commit_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
1943
1927
  --
1944
1928
 
1945
- CREATE INDEX index_testing_notes_on_project_id ON testing_notes USING btree (project_id);
1929
+ CREATE UNIQUE INDEX index_test_runs_on_commit_id ON test_runs USING btree (commit_id);
1946
1930
 
1947
1931
 
1948
1932
  --
1949
- -- Name: index_testing_notes_on_ticket_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
1933
+ -- Name: index_test_runs_on_project_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
1950
1934
  --
1951
1935
 
1952
- CREATE INDEX index_testing_notes_on_ticket_id ON testing_notes USING btree (ticket_id);
1936
+ CREATE INDEX index_test_runs_on_project_id ON test_runs USING btree (project_id);
1953
1937
 
1954
1938
 
1955
1939
  --
1956
- -- Name: index_testing_notes_on_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
1940
+ -- Name: index_test_runs_on_sha; Type: INDEX; Schema: public; Owner: -; Tablespace:
1957
1941
  --
1958
1942
 
1959
- CREATE INDEX index_testing_notes_on_user_id ON testing_notes USING btree (user_id);
1943
+ CREATE UNIQUE INDEX index_test_runs_on_sha ON test_runs USING btree (sha);
1960
1944
 
1961
1945
 
1962
1946
  --
@@ -2122,14 +2106,8 @@ INSERT INTO schema_migrations (version) VALUES ('20120417195313');
2122
2106
 
2123
2107
  INSERT INTO schema_migrations (version) VALUES ('20120417195433');
2124
2108
 
2125
- INSERT INTO schema_migrations (version) VALUES ('20120424212706');
2126
-
2127
2109
  INSERT INTO schema_migrations (version) VALUES ('20120501230243');
2128
2110
 
2129
- INSERT INTO schema_migrations (version) VALUES ('20120501231817');
2130
-
2131
- INSERT INTO schema_migrations (version) VALUES ('20120501231948');
2132
-
2133
2111
  INSERT INTO schema_migrations (version) VALUES ('20120504143615');
2134
2112
 
2135
2113
  INSERT INTO schema_migrations (version) VALUES ('20120525013703');
@@ -2146,8 +2124,6 @@ INSERT INTO schema_migrations (version) VALUES ('20120626152020');
2146
2124
 
2147
2125
  INSERT INTO schema_migrations (version) VALUES ('20120626152949');
2148
2126
 
2149
- INSERT INTO schema_migrations (version) VALUES ('20120715230526');
2150
-
2151
2127
  INSERT INTO schema_migrations (version) VALUES ('20120715230922');
2152
2128
 
2153
2129
  INSERT INTO schema_migrations (version) VALUES ('20120716010743');
@@ -2216,8 +2192,6 @@ INSERT INTO schema_migrations (version) VALUES ('20130119212008');
2216
2192
 
2217
2193
  INSERT INTO schema_migrations (version) VALUES ('20130120182026');
2218
2194
 
2219
- INSERT INTO schema_migrations (version) VALUES ('20130211015046');
2220
-
2221
2195
  INSERT INTO schema_migrations (version) VALUES ('20130302205014');
2222
2196
 
2223
2197
  INSERT INTO schema_migrations (version) VALUES ('20130306023456');
@@ -2232,8 +2206,6 @@ INSERT INTO schema_migrations (version) VALUES ('20130407195450');
2232
2206
 
2233
2207
  INSERT INTO schema_migrations (version) VALUES ('20130407200624');
2234
2208
 
2235
- INSERT INTO schema_migrations (version) VALUES ('20130407220039');
2236
-
2237
2209
  INSERT INTO schema_migrations (version) VALUES ('20130407220937');
2238
2210
 
2239
2211
  INSERT INTO schema_migrations (version) VALUES ('20130416020627');
@@ -2362,8 +2334,6 @@ INSERT INTO schema_migrations (version) VALUES ('20140506032958');
2362
2334
 
2363
2335
  INSERT INTO schema_migrations (version) VALUES ('20140506035755');
2364
2336
 
2365
- INSERT INTO schema_migrations (version) VALUES ('20140511024021');
2366
-
2367
2337
  INSERT INTO schema_migrations (version) VALUES ('20140515174322');
2368
2338
 
2369
2339
  INSERT INTO schema_migrations (version) VALUES ('20140515200824');
@@ -2510,3 +2480,9 @@ INSERT INTO schema_migrations (version) VALUES ('20160625221840');
2510
2480
 
2511
2481
  INSERT INTO schema_migrations (version) VALUES ('20160625230420');
2512
2482
 
2483
+ INSERT INTO schema_migrations (version) VALUES ('20160711170921');
2484
+
2485
+ INSERT INTO schema_migrations (version) VALUES ('20160713204605');
2486
+
2487
+ INSERT INTO schema_migrations (version) VALUES ('20160715173039');
2488
+