houston-core 0.7.0 → 0.8.0.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +45 -45
  3. data/app/assets/javascripts/houston/app/models/ticket.coffee +7 -5
  4. data/app/assets/javascripts/houston/app/views/new_ticket_view.coffee +1 -21
  5. data/app/assets/javascripts/houston/core/handlebars_helpers.coffee +0 -6
  6. data/app/assets/stylesheets/houston/application/commit.scss +16 -0
  7. data/app/assets/stylesheets/houston/application/navigation.scss +1 -0
  8. data/app/assets/stylesheets/houston/application/new_ticket_view.scss +0 -4
  9. data/app/assets/stylesheets/houston/application/projects.css.scss +0 -14
  10. data/app/assets/stylesheets/houston/application/release_form.scss +1 -1
  11. data/app/assets/stylesheets/houston/application/teams.scss +68 -0
  12. data/app/assets/templates/tickets/index.hbs +0 -1
  13. data/app/controllers/github/pulls_controller.rb +1 -0
  14. data/app/controllers/project_tickets_controller.rb +1 -5
  15. data/app/controllers/projects_controller.rb +10 -12
  16. data/app/controllers/teams_controller.rb +60 -0
  17. data/app/controllers/users_controller.rb +12 -12
  18. data/app/helpers/commit_helper.rb +3 -5
  19. data/app/helpers/exposure_helper.rb +1 -1
  20. data/app/helpers/ticket_helper.rb +0 -13
  21. data/app/interactors/ticket_report.rb +0 -7
  22. data/app/mailers/project_notification.rb +2 -23
  23. data/app/mailers/view_mailer.rb +0 -1
  24. data/app/models/ability.rb +28 -19
  25. data/app/models/commit.rb +0 -4
  26. data/app/models/project.rb +14 -29
  27. data/app/models/release.rb +0 -18
  28. data/app/models/role.rb +0 -22
  29. data/app/models/team.rb +43 -0
  30. data/app/models/team_user.rb +68 -0
  31. data/app/models/ticket.rb +2 -22
  32. data/app/models/user.rb +21 -30
  33. data/app/views/devise/sessions/new.html.erb +9 -7
  34. data/app/views/layouts/_mobile_navigation.html.erb +5 -3
  35. data/app/views/layouts/_navigation.html.erb +11 -10
  36. data/app/views/layouts/_tester_bar.html.erb +1 -1
  37. data/app/views/layouts/application.html.erb +1 -2
  38. data/app/views/project_tickets/_tickets.html.erb +0 -1
  39. data/app/views/project_tickets/index.xls.erb +0 -35
  40. data/app/views/project_tickets/new.html.erb +1 -2
  41. data/app/views/projects/_form.html.erb +7 -12
  42. data/app/views/projects/index.html.erb +10 -17
  43. data/app/views/releases/_changelog.html.erb +11 -14
  44. data/app/views/teams/_form.html.erb +45 -0
  45. data/app/views/teams/edit.html.erb +8 -0
  46. data/app/views/teams/index.html.erb +62 -0
  47. data/app/views/teams/new.html.erb +7 -0
  48. data/app/views/users/_form.html.erb +2 -11
  49. data/app/views/users/index.html.erb +8 -20
  50. data/app/views/users/new.html.erb +1 -1
  51. data/config/initializers/inflections.rb +7 -6
  52. data/config/routes.rb +19 -17
  53. data/db/migrate/20160812233255_repurpose_users_role.rb +16 -0
  54. data/db/migrate/20160813001242_create_teams.rb +42 -0
  55. data/db/structure.sql +110 -116
  56. data/lib/houston/boot.rb +0 -1
  57. data/lib/houston/boot/configuration.rb +26 -11
  58. data/lib/houston/boot/events.rb +0 -4
  59. data/lib/houston/version.rb +1 -1
  60. data/templates/new-instance/config/abilities.rb +68 -51
  61. data/templates/new-instance/config/conversations/mentions/unfurl_tasks.rb +1 -1
  62. data/templates/new-instance/config/events/deploy/notify_deployer_when_finished.rb +24 -16
  63. data/templates/new-instance/config/events/tests/email_when_completed.rb +11 -0
  64. data/templates/new-instance/config/integrations/ldap.rb +4 -0
  65. data/templates/new-instance/config/main.rb +10 -17
  66. data/templates/new-module/test/fixtures/users.yml +1 -2
  67. data/test/acceptance/creating_a_release_test.rb +1 -1
  68. data/test/factories/project_factory.rb +1 -0
  69. data/test/factories/user_factory.rb +3 -1
  70. data/test/fixtures/teams.yml +2 -0
  71. data/test/fixtures/teams_users.yml +5 -0
  72. data/test/fixtures/users.yml +1 -2
  73. data/test/integration/ci_integration_test.rb +2 -2
  74. data/test/support/config.rb +3 -5
  75. data/test/unit/controllers/deploys_controller_test.rb +11 -5
  76. data/test/unit/controllers/users_controller_test.rb +46 -0
  77. data/test/unit/models/release_test.rb +0 -9
  78. data/test/unit/models/serializer_test.rb +0 -8
  79. data/test/unit/models/ticket_test.rb +0 -32
  80. metadata +21 -24
  81. data/app/assets/javascripts/houston/app/table_row_expander.coffee +0 -52
  82. data/app/assets/javascripts/houston/app/views/problems_view.coffee +0 -114
  83. data/app/assets/stylesheets/houston/application/follow_up.scss +0 -44
  84. data/app/controllers/project_exceptions_controller.rb +0 -36
  85. data/app/controllers/project_pretickets_controller.rb +0 -27
  86. data/app/mailers/deploy_notification.rb +0 -33
  87. data/app/models/antecedent.rb +0 -15
  88. data/app/models/ticket_antecedent.rb +0 -39
  89. data/app/models/value_statement.rb +0 -9
  90. data/app/presenters/problem_presenter.rb +0 -49
  91. data/app/presenters/tester_presenter.rb +0 -15
  92. data/app/views/project_notification/follow_up.html.erb +0 -26
  93. data/app/views/project_pretickets/show.html.erb +0 -49
  94. data/app/views/releases/_antecedents.html.erb +0 -12
  95. data/config/initializers/hard_coded_knowledge.rb +0 -141
  96. data/db/migrate/20130427223925_create_project_quotas.rb +0 -14
  97. data/db/migrate/20140506035755_create_value_statements.rb +0 -9
  98. data/lib/houston/boot/ticket_antecedent_serializer.rb +0 -21
  99. data/test/unit/models/ticket_antecedents_test.rb +0 -38
@@ -36,20 +36,11 @@
36
36
  </div>
37
37
  </div>
38
38
 
39
- <% if can?(:manage, @user) %>
39
+ <% if current_user.owner? %>
40
40
  <div class="control-group">
41
41
  <%= f.label :role, :class => "control-label" %>
42
42
  <div class="controls">
43
- <%= f.select :role, Houston.config.roles, :class => "select_field" %>
44
- </div>
45
- </div>
46
- <% end %>
47
-
48
- <% if can?(:manage, @user) %>
49
- <div class="control-group">
50
- <%= f.label :administrator, :class => "control-label" %>
51
- <div class="controls">
52
- <%= f.check_box :administrator, :class => "checkbox" %>
43
+ <%= f.select :role, User::ROLES, {class: "select_field"}, {disabled: (current_user == @user)} %>
53
44
  </div>
54
45
  </div>
55
46
  <% end %>
@@ -1,8 +1,8 @@
1
1
  <% content_for :title do %>
2
2
  <h1 class="project-banner space-below">
3
- Team
4
- <%= link_to "New Team Member", new_user_path, :class => "btn btn-primary" if can?(:create, User) %>
5
-
3
+ Users
4
+ <%= link_to "New User", new_user_path, :class => "btn btn-primary" if can?(:create, User) %>
5
+
6
6
  <%= render partial: "projects/keyboard_shortcuts" %>
7
7
  </h1>
8
8
  <% end %>
@@ -18,15 +18,11 @@
18
18
  <th class="user-email">Email</th>
19
19
  <th class="user-nickname">Nickname</th>
20
20
  <th class="user-role">Role</th>
21
- <th class="user-tickets-filed"><small>Tickets<br />Filed</small></th>
22
- <th class="user-tickets-invalid"><small>Dupicate<br />or Invalid</small></th>
23
- <th class="user-tickets-fixed"><small>Fixed</small></th>
24
- <td class="user-actions"></td>
25
21
  <td class="table-margin"></td>
26
22
  </tr>
27
23
  </thead>
28
24
  <tbody>
29
- <% @users.each do |user|; stats = @ticket_stats_by_user[user] %>
25
+ <% @users.each do |user| %>
30
26
  <tr id="user_<%= user.id %>">
31
27
  <td class="table-margin"></td>
32
28
  <td class="user-avatar"><%= avatar_for(user, size: 32) %></td>
@@ -38,15 +34,7 @@
38
34
  </td>
39
35
  <td class="user-email"><%= mail_to user.email %></td>
40
36
  <td class="user-email"><%= user.nickname %></td>
41
- <td class="user-role"><%= user.role %><%= ", Admin" if user.administrator? %></td>
42
- <td class="user-tickets-filed"><%= stats[:tickets] %></td>
43
- <td class="user-tickets-invalid">
44
- <%= number_to_percentage stats[:invalid_tickets], precision: 0 if stats[:tickets] > 0 %>
45
- </td>
46
- <td class="user-tickets-fixed">
47
- <%= number_to_percentage stats[:fixed_tickets], precision: 0 if stats[:tickets] > 0 %>
48
- </td>
49
- <td class="user-actions"></td>
37
+ <td class="user-role"><%= user.role %></td>
50
38
  <td class="table-margin"></td>
51
39
  </tr>
52
40
  <% end %>
@@ -62,15 +50,15 @@
62
50
  $.tablesorter.addParser({
63
51
  id: 'name',
64
52
  type: 'text',
65
- is: function(s) { return false; }, // return false so this parser is not auto detected
53
+ is: function(s) { return false; }, // return false so this parser is not auto detected
66
54
  format: function(s, table, td) {
67
55
  var $td = $(td),
68
56
  firstName = $td.find('.first-name').text(),
69
57
  lastName = $td.find('.last-name').text();
70
58
  return lastName + ' ' + firstName;
71
59
  }
72
- });
73
-
60
+ });
61
+
74
62
  $(function() {
75
63
  $('#users').tablesorter({
76
64
  headers: { 2: { sorter: 'name' } }
@@ -1,7 +1,7 @@
1
1
  <% content_for :title do %>
2
2
  <h1 class="project-banner space-below">
3
3
  <%= avatar_for(@user, size: 40) %>
4
- New Team Member
4
+ New User
5
5
  </h1>
6
6
  <% end %>
7
7
 
@@ -3,12 +3,13 @@
3
3
  # Add new inflection rules using the following format. Inflections
4
4
  # are locale specific, and you may define rules for as many different
5
5
  # locales as you wish. All of these examples are active by default:
6
- # ActiveSupport::Inflector.inflections(:en) do |inflect|
7
- # inflect.plural /^(ox)$/i, '\1en'
8
- # inflect.singular /^(ox)en/i, '\1'
9
- # inflect.irregular 'person', 'people'
10
- # inflect.uncountable %w( fish sheep )
11
- # end
6
+ ActiveSupport::Inflector.inflections(:en) do |inflect|
7
+ # inflect.plural /^(ox)$/i, '\1en'
8
+ # inflect.singular /^(ox)en/i, '\1'
9
+ # inflect.irregular 'person', 'people'
10
+ # inflect.uncountable %w( fish sheep )
11
+ inflect.irregular "team_user", "teams_users"
12
+ end
12
13
 
13
14
  # These inflection rules are supported but not enabled by default:
14
15
  # ActiveSupport::Inflector.inflections(:en) do |inflect|
@@ -26,39 +26,30 @@ Rails.application.routes.draw do
26
26
 
27
27
 
28
28
 
29
- # Pretickets
29
+ # Teams
30
30
 
31
- get "pretickets/by_project/:slug", to: "project_pretickets#show", :as => :project_pretickets
31
+ resources :teams
32
32
 
33
+ scope "teams/:team_id" do
34
+ resources :projects, only: [:new]
33
35
 
34
-
35
- # Exceptions
36
-
37
- post "projects/:slug/exceptions/merge_several", to: "project_exceptions#merge_several"
38
- post "projects/:slug/exceptions/unmerge_several", to: "project_exceptions#unmerge_several"
39
- post "projects/:slug/exceptions/delete_several", to: "project_exceptions#delete_several"
36
+ get "projects/new/github", to: "projects#new_from_github", as: :add_github_projects
37
+ post "projects/new/github", to: "projects#create_from_github"
38
+ end
40
39
 
41
40
 
42
41
 
43
42
  # Projects
44
43
 
45
- resources :projects do
44
+ resources :projects, except: [:new] do
46
45
  member do
47
46
  put :retire
48
47
  end
49
48
 
50
49
  post "follow", to: "project_roles#create", :as => :follow
51
50
  delete "unfollow", to: "project_roles#destroy", :as => :unfollow
52
-
53
- get "deploys/:id", to: "deploys#show", :as => :deploy
54
-
55
- post "deploy", to: "deploys#create"
56
- post "deploy/:environment", to: "deploys#create"
57
51
  end
58
52
 
59
- get "projects/new/github", to: "projects#new_from_github", as: :add_github_projects
60
- post "projects/new/github", to: "projects#create_from_github"
61
-
62
53
 
63
54
 
64
55
  # Web Hooks
@@ -75,6 +66,17 @@ Rails.application.routes.draw do
75
66
 
76
67
 
77
68
 
69
+ # Deploys
70
+
71
+ scope "projects/:project_id" do
72
+ get "deploys/:id", to: "deploys#show", :as => :deploy
73
+
74
+ post "deploy", to: "deploys#create"
75
+ post "deploy/:environment", to: "deploys#create"
76
+ end
77
+
78
+
79
+
78
80
  # Releases
79
81
 
80
82
  scope "projects/:project_id" do
@@ -0,0 +1,16 @@
1
+ class RepurposeUsersRole < ActiveRecord::Migration
2
+ def up
3
+ rename_column :users, :role, :legacy_role
4
+ rename_column :users, :administrator, :legacy_administrator
5
+
6
+ add_column :users, :role, :string, default: "Member"
7
+ User.where(legacy_administrator: true).update_all(role: "Owner")
8
+ end
9
+
10
+ def down
11
+ remove_column :users, :role
12
+
13
+ rename_column :users, :legacy_role, :role
14
+ rename_column :users, :legacy_administrator, :administrator
15
+ end
16
+ end
@@ -0,0 +1,42 @@
1
+ class CreateTeams < ActiveRecord::Migration
2
+ def up
3
+ create_table :teams do |t|
4
+ t.string :name
5
+ t.jsonb :props, default: "{}"
6
+ end
7
+
8
+ # Each project belongs to only one team
9
+ add_column :projects, :team_id, :integer
10
+
11
+ # Each user can belong to many teams
12
+ # and can have 0 or several roles on each team
13
+ create_table :teams_users do |t|
14
+ t.references :team, :user
15
+ t.string :roles, array: true
16
+
17
+ t.timestamps
18
+ t.index [:team_id, :user_id], unique: true
19
+ end
20
+ # rename_table :roles, :project_roles
21
+
22
+ # create_table :roles do |t|
23
+ # t.references :user
24
+ # t.references :team
25
+ # t.string :name, false
26
+ #
27
+ # t.timestamps
28
+ # t.index [:user_id, :team_id]
29
+ # t.index [:user_id, :team_id, :name]
30
+ # end
31
+ end
32
+
33
+ def down
34
+ drop_table :teams
35
+ # drop_table :roles
36
+ drop_table :teams_users
37
+
38
+ remove_column :projects, :team_id
39
+
40
+ # rename_table :project_roles, :roles
41
+ end
42
+ end
@@ -470,39 +470,6 @@ CREATE SEQUENCE persistent_triggers_id_seq
470
470
  ALTER SEQUENCE persistent_triggers_id_seq OWNED BY persistent_triggers.id;
471
471
 
472
472
 
473
- --
474
- -- Name: project_quotas; Type: TABLE; Schema: public; Owner: -; Tablespace:
475
- --
476
-
477
- CREATE TABLE project_quotas (
478
- id integer NOT NULL,
479
- project_id integer NOT NULL,
480
- week date NOT NULL,
481
- value integer NOT NULL,
482
- created_at timestamp without time zone,
483
- updated_at timestamp without time zone
484
- );
485
-
486
-
487
- --
488
- -- Name: project_quotas_id_seq; Type: SEQUENCE; Schema: public; Owner: -
489
- --
490
-
491
- CREATE SEQUENCE project_quotas_id_seq
492
- START WITH 1
493
- INCREMENT BY 1
494
- NO MINVALUE
495
- NO MAXVALUE
496
- CACHE 1;
497
-
498
-
499
- --
500
- -- Name: project_quotas_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
501
- --
502
-
503
- ALTER SEQUENCE project_quotas_id_seq OWNED BY project_quotas.id;
504
-
505
-
506
473
  --
507
474
  -- Name: projects; Type: TABLE; Schema: public; Owner: -; Tablespace:
508
475
  --
@@ -528,7 +495,8 @@ CREATE TABLE projects (
528
495
  feature_states hstore DEFAULT ''::hstore NOT NULL,
529
496
  selected_features text[],
530
497
  head_sha character varying,
531
- props jsonb DEFAULT '{}'::jsonb
498
+ props jsonb DEFAULT '{}'::jsonb,
499
+ team_id integer
532
500
  );
533
501
 
534
502
 
@@ -815,6 +783,69 @@ CREATE SEQUENCE tasks_id_seq
815
783
  ALTER SEQUENCE tasks_id_seq OWNED BY tasks.id;
816
784
 
817
785
 
786
+ --
787
+ -- Name: teams; Type: TABLE; Schema: public; Owner: -; Tablespace:
788
+ --
789
+
790
+ CREATE TABLE teams (
791
+ id integer NOT NULL,
792
+ name character varying,
793
+ props jsonb DEFAULT '{}'::jsonb
794
+ );
795
+
796
+
797
+ --
798
+ -- Name: teams_id_seq; Type: SEQUENCE; Schema: public; Owner: -
799
+ --
800
+
801
+ CREATE SEQUENCE teams_id_seq
802
+ START WITH 1
803
+ INCREMENT BY 1
804
+ NO MINVALUE
805
+ NO MAXVALUE
806
+ CACHE 1;
807
+
808
+
809
+ --
810
+ -- Name: teams_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
811
+ --
812
+
813
+ ALTER SEQUENCE teams_id_seq OWNED BY teams.id;
814
+
815
+
816
+ --
817
+ -- Name: teams_users; Type: TABLE; Schema: public; Owner: -; Tablespace:
818
+ --
819
+
820
+ CREATE TABLE teams_users (
821
+ id integer NOT NULL,
822
+ team_id integer,
823
+ user_id integer,
824
+ roles character varying[],
825
+ created_at timestamp without time zone,
826
+ updated_at timestamp without time zone
827
+ );
828
+
829
+
830
+ --
831
+ -- Name: teams_users_id_seq; Type: SEQUENCE; Schema: public; Owner: -
832
+ --
833
+
834
+ CREATE SEQUENCE teams_users_id_seq
835
+ START WITH 1
836
+ INCREMENT BY 1
837
+ NO MINVALUE
838
+ NO MAXVALUE
839
+ CACHE 1;
840
+
841
+
842
+ --
843
+ -- Name: teams_users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
844
+ --
845
+
846
+ ALTER SEQUENCE teams_users_id_seq OWNED BY teams_users.id;
847
+
848
+
818
849
  --
819
850
  -- Name: test_errors; Type: TABLE; Schema: public; Owner: -; Tablespace:
820
851
  --
@@ -1106,9 +1137,9 @@ CREATE TABLE users (
1106
1137
  invitation_limit integer,
1107
1138
  invited_by_id integer,
1108
1139
  invited_by_type character varying,
1109
- role character varying DEFAULT 'Guest'::character varying,
1140
+ legacy_role character varying DEFAULT 'Guest'::character varying,
1110
1141
  authentication_token character varying,
1111
- administrator boolean DEFAULT false,
1142
+ legacy_administrator boolean DEFAULT false,
1112
1143
  unfuddle_id integer,
1113
1144
  first_name character varying,
1114
1145
  last_name character varying,
@@ -1120,7 +1151,8 @@ CREATE TABLE users (
1120
1151
  current_project_id integer,
1121
1152
  nickname character varying,
1122
1153
  username character varying,
1123
- props jsonb DEFAULT '{}'::jsonb
1154
+ props jsonb DEFAULT '{}'::jsonb,
1155
+ role character varying DEFAULT 'Member'::character varying
1124
1156
  );
1125
1157
 
1126
1158
 
@@ -1143,37 +1175,6 @@ CREATE SEQUENCE users_id_seq
1143
1175
  ALTER SEQUENCE users_id_seq OWNED BY users.id;
1144
1176
 
1145
1177
 
1146
- --
1147
- -- Name: value_statements; Type: TABLE; Schema: public; Owner: -; Tablespace:
1148
- --
1149
-
1150
- CREATE TABLE value_statements (
1151
- id integer NOT NULL,
1152
- project_id integer NOT NULL,
1153
- weight double precision NOT NULL,
1154
- text character varying NOT NULL
1155
- );
1156
-
1157
-
1158
- --
1159
- -- Name: value_statements_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1160
- --
1161
-
1162
- CREATE SEQUENCE value_statements_id_seq
1163
- START WITH 1
1164
- INCREMENT BY 1
1165
- NO MINVALUE
1166
- NO MAXVALUE
1167
- CACHE 1;
1168
-
1169
-
1170
- --
1171
- -- Name: value_statements_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1172
- --
1173
-
1174
- ALTER SEQUENCE value_statements_id_seq OWNED BY value_statements.id;
1175
-
1176
-
1177
1178
  --
1178
1179
  -- Name: versions; Type: TABLE; Schema: public; Owner: -; Tablespace:
1179
1180
  --
@@ -1283,13 +1284,6 @@ ALTER TABLE ONLY oauth_providers ALTER COLUMN id SET DEFAULT nextval('oauth_prov
1283
1284
  ALTER TABLE ONLY persistent_triggers ALTER COLUMN id SET DEFAULT nextval('persistent_triggers_id_seq'::regclass);
1284
1285
 
1285
1286
 
1286
- --
1287
- -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1288
- --
1289
-
1290
- ALTER TABLE ONLY project_quotas ALTER COLUMN id SET DEFAULT nextval('project_quotas_id_seq'::regclass);
1291
-
1292
-
1293
1287
  --
1294
1288
  -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1295
1289
  --
@@ -1339,6 +1333,20 @@ ALTER TABLE ONLY sprints ALTER COLUMN id SET DEFAULT nextval('sprints_id_seq'::r
1339
1333
  ALTER TABLE ONLY tasks ALTER COLUMN id SET DEFAULT nextval('tasks_id_seq'::regclass);
1340
1334
 
1341
1335
 
1336
+ --
1337
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1338
+ --
1339
+
1340
+ ALTER TABLE ONLY teams ALTER COLUMN id SET DEFAULT nextval('teams_id_seq'::regclass);
1341
+
1342
+
1343
+ --
1344
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1345
+ --
1346
+
1347
+ ALTER TABLE ONLY teams_users ALTER COLUMN id SET DEFAULT nextval('teams_users_id_seq'::regclass);
1348
+
1349
+
1342
1350
  --
1343
1351
  -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1344
1352
  --
@@ -1395,13 +1403,6 @@ ALTER TABLE ONLY user_credentials ALTER COLUMN id SET DEFAULT nextval('user_cred
1395
1403
  ALTER TABLE ONLY users ALTER COLUMN id SET DEFAULT nextval('users_id_seq'::regclass);
1396
1404
 
1397
1405
 
1398
- --
1399
- -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1400
- --
1401
-
1402
- ALTER TABLE ONLY value_statements ALTER COLUMN id SET DEFAULT nextval('value_statements_id_seq'::regclass);
1403
-
1404
-
1405
1406
  --
1406
1407
  -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1407
1408
  --
@@ -1489,14 +1490,6 @@ ALTER TABLE ONLY persistent_triggers
1489
1490
  ADD CONSTRAINT persistent_triggers_pkey PRIMARY KEY (id);
1490
1491
 
1491
1492
 
1492
- --
1493
- -- Name: project_quotas_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1494
- --
1495
-
1496
- ALTER TABLE ONLY project_quotas
1497
- ADD CONSTRAINT project_quotas_pkey PRIMARY KEY (id);
1498
-
1499
-
1500
1493
  --
1501
1494
  -- Name: projects_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1502
1495
  --
@@ -1553,6 +1546,22 @@ ALTER TABLE ONLY tasks
1553
1546
  ADD CONSTRAINT tasks_pkey PRIMARY KEY (id);
1554
1547
 
1555
1548
 
1549
+ --
1550
+ -- Name: teams_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1551
+ --
1552
+
1553
+ ALTER TABLE ONLY teams
1554
+ ADD CONSTRAINT teams_pkey PRIMARY KEY (id);
1555
+
1556
+
1557
+ --
1558
+ -- Name: teams_users_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1559
+ --
1560
+
1561
+ ALTER TABLE ONLY teams_users
1562
+ ADD CONSTRAINT teams_users_pkey PRIMARY KEY (id);
1563
+
1564
+
1556
1565
  --
1557
1566
  -- Name: test_errors_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1558
1567
  --
@@ -1633,14 +1642,6 @@ ALTER TABLE ONLY users
1633
1642
  ADD CONSTRAINT users_pkey PRIMARY KEY (id);
1634
1643
 
1635
1644
 
1636
- --
1637
- -- Name: value_statements_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1638
- --
1639
-
1640
- ALTER TABLE ONLY value_statements
1641
- ADD CONSTRAINT value_statements_pkey PRIMARY KEY (id);
1642
-
1643
-
1644
1645
  --
1645
1646
  -- Name: versions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1646
1647
  --
@@ -1782,20 +1783,6 @@ CREATE INDEX index_milestones_on_destroyed_at ON milestones USING btree (destroy
1782
1783
  CREATE INDEX index_milestones_on_project_id ON milestones USING btree (project_id);
1783
1784
 
1784
1785
 
1785
- --
1786
- -- Name: index_project_quotas_on_project_id_and_week; Type: INDEX; Schema: public; Owner: -; Tablespace:
1787
- --
1788
-
1789
- CREATE UNIQUE INDEX index_project_quotas_on_project_id_and_week ON project_quotas USING btree (project_id, week);
1790
-
1791
-
1792
- --
1793
- -- Name: index_project_quotas_on_week; Type: INDEX; Schema: public; Owner: -; Tablespace:
1794
- --
1795
-
1796
- CREATE INDEX index_project_quotas_on_week ON project_quotas USING btree (week);
1797
-
1798
-
1799
1786
  --
1800
1787
  -- Name: index_projects_on_slug; Type: INDEX; Schema: public; Owner: -; Tablespace:
1801
1788
  --
@@ -1901,6 +1888,13 @@ CREATE UNIQUE INDEX index_sprints_tasks_on_sprint_id_and_task_id ON sprints_task
1901
1888
  CREATE UNIQUE INDEX index_tasks_on_ticket_id_and_number ON tasks USING btree (ticket_id, number);
1902
1889
 
1903
1890
 
1891
+ --
1892
+ -- Name: index_teams_users_on_team_id_and_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
1893
+ --
1894
+
1895
+ CREATE UNIQUE INDEX index_teams_users_on_team_id_and_user_id ON teams_users USING btree (team_id, user_id);
1896
+
1897
+
1904
1898
  --
1905
1899
  -- Name: index_test_errors_on_sha; Type: INDEX; Schema: public; Owner: -; Tablespace:
1906
1900
  --
@@ -2220,8 +2214,6 @@ INSERT INTO schema_migrations (version) VALUES ('20130420174002');
2220
2214
 
2221
2215
  INSERT INTO schema_migrations (version) VALUES ('20130420174126');
2222
2216
 
2223
- INSERT INTO schema_migrations (version) VALUES ('20130427223925');
2224
-
2225
2217
  INSERT INTO schema_migrations (version) VALUES ('20130428005808');
2226
2218
 
2227
2219
  INSERT INTO schema_migrations (version) VALUES ('20130504014802');
@@ -2332,8 +2324,6 @@ INSERT INTO schema_migrations (version) VALUES ('20140429000919');
2332
2324
 
2333
2325
  INSERT INTO schema_migrations (version) VALUES ('20140506032958');
2334
2326
 
2335
- INSERT INTO schema_migrations (version) VALUES ('20140506035755');
2336
-
2337
2327
  INSERT INTO schema_migrations (version) VALUES ('20140515174322');
2338
2328
 
2339
2329
  INSERT INTO schema_migrations (version) VALUES ('20140515200824');
@@ -2486,3 +2476,7 @@ INSERT INTO schema_migrations (version) VALUES ('20160713204605');
2486
2476
 
2487
2477
  INSERT INTO schema_migrations (version) VALUES ('20160715173039');
2488
2478
 
2479
+ INSERT INTO schema_migrations (version) VALUES ('20160812233255');
2480
+
2481
+ INSERT INTO schema_migrations (version) VALUES ('20160813001242');
2482
+