Read about our upcoming Code of Conduct on this issue

schema.rb 79.1 KB
Newer Older
Andrew8xx8's avatar
Andrew8xx8 committed
1
2
3
4
5
6
7
8
9
10
11
# encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
#
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
12
# It's strongly recommended that you check this file into your version control system.
Andrew8xx8's avatar
Andrew8xx8 committed
13

14
ActiveRecord::Schema.define(version: 20170828093725) do
15

Kamil Trzcinski's avatar
Kamil Trzcinski committed
16
17
  # These are extensions that must be enabled in order to support this database
  enable_extension "plpgsql"
18
  enable_extension "pg_trgm"
Kamil Trzcinski's avatar
Kamil Trzcinski committed
19

Valery Sizov's avatar
Valery Sizov committed
20
  create_table "abuse_reports", force: :cascade do |t|
21
22
23
    t.integer "reporter_id"
    t.integer "user_id"
    t.text "message"
24
25
    t.datetime "created_at"
    t.datetime "updated_at"
26
    t.text "message_html"
27
    t.integer "cached_markdown_version"
28
29
  end

30
  create_table "appearances", force: :cascade do |t|
31
32
    t.string "title", null: false
    t.text "description", null: false
33
34
35
36
    t.string "header_logo"
    t.string "logo"
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
37
    t.text "description_html"
38
    t.integer "cached_markdown_version"
39
40
  end

Valery Sizov's avatar
Valery Sizov committed
41
  create_table "application_settings", force: :cascade do |t|
42
43
44
45
    t.integer "default_projects_limit"
    t.boolean "signup_enabled"
    t.boolean "gravatar_enabled"
    t.text "sign_in_text"
46
47
    t.datetime "created_at"
    t.datetime "updated_at"
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
    t.string "home_page_url"
    t.integer "default_branch_protection", default: 2
    t.text "restricted_visibility_levels"
    t.boolean "version_check_enabled", default: true
    t.integer "max_attachment_size", default: 10, null: false
    t.integer "default_project_visibility"
    t.integer "default_snippet_visibility"
    t.text "domain_whitelist"
    t.boolean "user_oauth_applications", default: true
    t.string "after_sign_out_path"
    t.integer "session_expire_delay", default: 10080, null: false
    t.text "import_sources"
    t.text "help_page_text"
    t.string "admin_notification_email"
    t.boolean "shared_runners_enabled", default: true, null: false
    t.integer "max_artifacts_size", default: 100, null: false
    t.string "runners_registration_token"
65
    t.integer "max_pages_size", default: 100, null: false
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
    t.boolean "require_two_factor_authentication", default: false
    t.integer "two_factor_grace_period", default: 48
    t.boolean "metrics_enabled", default: false
    t.string "metrics_host", default: "localhost"
    t.integer "metrics_pool_size", default: 16
    t.integer "metrics_timeout", default: 10
    t.integer "metrics_method_call_threshold", default: 10
    t.boolean "recaptcha_enabled", default: false
    t.string "recaptcha_site_key"
    t.string "recaptcha_private_key"
    t.integer "metrics_port", default: 8089
    t.boolean "akismet_enabled", default: false
    t.string "akismet_api_key"
    t.integer "metrics_sample_interval", default: 15
    t.boolean "sentry_enabled", default: false
    t.string "sentry_dsn"
    t.boolean "email_author_in_body", default: false
    t.integer "default_group_visibility"
    t.boolean "repository_checks_enabled", default: false
    t.text "shared_runners_text"
    t.integer "metrics_packet_size", default: 1
    t.text "disabled_oauth_sign_in_sources"
    t.string "health_check_access_token"
    t.boolean "send_user_confirmation_email", default: false
    t.integer "container_registry_token_expire_delay", default: 5
    t.text "after_sign_up_text"
Valery Sizov's avatar
Valery Sizov committed
92
    t.boolean "user_default_external", default: false, null: false
93
    t.string "repository_storages", default: "default"
94
95
96
    t.string "enabled_git_access_protocol"
    t.boolean "domain_blacklist_enabled", default: false
    t.text "domain_blacklist"
97
    t.boolean "usage_ping_enabled", default: true, null: false
98
99
100
101
102
103
    t.boolean "koding_enabled"
    t.string "koding_url"
    t.text "sign_in_text_html"
    t.text "help_page_text_html"
    t.text "shared_runners_text_html"
    t.text "after_sign_up_text_html"
Jacob Vosmaer's avatar
Jacob Vosmaer committed
104
105
106
107
108
    t.boolean "housekeeping_enabled", default: true, null: false
    t.boolean "housekeeping_bitmaps_enabled", default: true, null: false
    t.integer "housekeeping_incremental_repack_period", default: 10, null: false
    t.integer "housekeeping_full_repack_period", default: 50, null: false
    t.integer "housekeeping_gc_period", default: 200, null: false
109
110
111
    t.boolean "sidekiq_throttling_enabled", default: false
    t.string "sidekiq_throttling_queues"
    t.decimal "sidekiq_throttling_factor"
112
    t.boolean "html_emails_enabled", default: true
113
114
    t.string "plantuml_url"
    t.boolean "plantuml_enabled"
115
    t.integer "terminal_max_session_time", default: 0, null: false
116
117
118
    t.integer "unique_ips_limit_per_user"
    t.integer "unique_ips_limit_time_window"
    t.boolean "unique_ips_limit_enabled", default: false, null: false
119
120
    t.string "default_artifacts_expire_in", default: "0", null: false
    t.string "uuid"
121
    t.decimal "polling_interval_multiplier", default: 1.0, null: false
122
    t.integer "cached_markdown_version"
123
124
    t.boolean "clientside_sentry_enabled", default: false, null: false
    t.string "clientside_sentry_dsn"
Pawel Chojnacki's avatar
Pawel Chojnacki committed
125
    t.boolean "prometheus_metrics_enabled", default: false, null: false
126
127
    t.boolean "help_page_hide_commercial_content", default: false
    t.string "help_page_support_url"
128
    t.boolean "password_authentication_enabled"
129
    t.integer "performance_bar_allowed_group_id"
130
    t.boolean "hashed_storage_enabled", default: false, null: false
131
132
    t.boolean "project_export_enabled", default: true, null: false
    t.boolean "auto_devops_enabled", default: false, null: false
133
134
  end

Valery Sizov's avatar
Valery Sizov committed
135
  create_table "audit_events", force: :cascade do |t|
136
137
138
139
140
    t.integer "author_id", null: false
    t.string "type", null: false
    t.integer "entity_id", null: false
    t.string "entity_type", null: false
    t.text "details"
141
142
143
144
145
146
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index "audit_events", ["entity_id", "entity_type"], name: "index_audit_events_on_entity_id_and_entity_type", using: :btree

147
  create_table "award_emoji", force: :cascade do |t|
148
149
150
151
    t.string "name"
    t.integer "user_id"
    t.integer "awardable_id"
    t.string "awardable_type"
152
153
154
155
    t.datetime "created_at"
    t.datetime "updated_at"
  end

Z.J. van de Weg's avatar
Z.J. van de Weg committed
156
  add_index "award_emoji", ["awardable_type", "awardable_id"], name: "index_award_emoji_on_awardable_type_and_awardable_id", using: :btree
157
  add_index "award_emoji", ["user_id", "name"], name: "index_award_emoji_on_user_id_and_name", using: :btree
158

Douglas Barbosa Alexandre's avatar
Douglas Barbosa Alexandre committed
159
  create_table "boards", force: :cascade do |t|
160
    t.integer "project_id", null: false
Douglas Barbosa Alexandre's avatar
Douglas Barbosa Alexandre committed
161
162
163
164
165
166
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
  end

  add_index "boards", ["project_id"], name: "index_boards_on_project_id", using: :btree

Valery Sizov's avatar
Valery Sizov committed
167
  create_table "broadcast_messages", force: :cascade do |t|
168
    t.text "message", null: false
169
170
171
172
    t.datetime "starts_at", null: false
    t.datetime "ends_at", null: false
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
173
174
    t.string "color"
    t.string "font"
175
    t.text "message_html", null: false
176
    t.integer "cached_markdown_version"
177
  end
178

179
180
  add_index "broadcast_messages", ["starts_at", "ends_at", "id"], name: "index_broadcast_messages_on_starts_at_and_ends_at_and_id", using: :btree

181
182
183
  create_table "chat_names", force: :cascade do |t|
    t.integer "user_id", null: false
    t.integer "service_id", null: false
184
    t.string "team_id", null: false
185
    t.string "team_domain"
186
    t.string "chat_id", null: false
187
    t.string "chat_name"
188
    t.datetime "last_used_at"
189
190
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
191
  end
192

193
  add_index "chat_names", ["service_id", "team_id", "chat_id"], name: "index_chat_names_on_service_id_and_team_id_and_chat_id", unique: true, using: :btree
194
195
  add_index "chat_names", ["user_id", "service_id"], name: "index_chat_names_on_user_id_and_service_id", unique: true, using: :btree

196
  create_table "chat_teams", force: :cascade do |t|
197
    t.integer "namespace_id", null: false
198
199
200
201
    t.string "team_id"
    t.string "name"
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
Douwe Maan's avatar
Douwe Maan committed
202
203
  end

204
  add_index "chat_teams", ["namespace_id"], name: "index_chat_teams_on_namespace_id", unique: true, using: :btree
205

Valery Sizov's avatar
Valery Sizov committed
206
  create_table "ci_builds", force: :cascade do |t|
207
    t.string "status"
Douwe Maan's avatar
Douwe Maan committed
208
    t.datetime "finished_at"
209
    t.text "trace"
Douwe Maan's avatar
Douwe Maan committed
210
211
212
    t.datetime "created_at"
    t.datetime "updated_at"
    t.datetime "started_at"
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
    t.integer "runner_id"
    t.float "coverage"
    t.integer "commit_id"
    t.text "commands"
    t.string "name"
    t.text "options"
    t.boolean "allow_failure", default: false, null: false
    t.string "stage"
    t.integer "trigger_request_id"
    t.integer "stage_idx"
    t.boolean "tag"
    t.string "ref"
    t.integer "user_id"
    t.string "type"
    t.string "target_url"
    t.string "description"
    t.text "artifacts_file"
Kamil Trzciński's avatar
Kamil Trzciński committed
230
    t.integer "project_id"
231
232
    t.text "artifacts_metadata"
    t.integer "erased_by_id"
233
    t.datetime "erased_at"
234
    t.datetime "artifacts_expire_at"
235
236
237
238
    t.string "environment"
    t.integer "artifacts_size", limit: 8
    t.string "when"
    t.text "yaml_variables"
239
    t.datetime "queued_at"
240
    t.string "token"
Kamil Trzcinski's avatar
Kamil Trzcinski committed
241
    t.integer "lock_version"
242
    t.string "coverage_regex"
243
    t.integer "auto_canceled_by_id"
Kamil Trzcinski's avatar
Kamil Trzcinski committed
244
    t.boolean "retried"
245
    t.integer "stage_id"
Douwe Maan's avatar
Douwe Maan committed
246
247
  end

248
  add_index "ci_builds", ["auto_canceled_by_id"], name: "index_ci_builds_on_auto_canceled_by_id", using: :btree
Kamil Trzcinski's avatar
Kamil Trzcinski committed
249
  add_index "ci_builds", ["commit_id", "stage_idx", "created_at"], name: "index_ci_builds_on_commit_id_and_stage_idx_and_created_at", using: :btree
250
  add_index "ci_builds", ["commit_id", "status", "type"], name: "index_ci_builds_on_commit_id_and_status_and_type", using: :btree
Kamil Trzcinski's avatar
Kamil Trzcinski committed
251
252
  add_index "ci_builds", ["commit_id", "type", "name", "ref"], name: "index_ci_builds_on_commit_id_and_type_and_name_and_ref", using: :btree
  add_index "ci_builds", ["commit_id", "type", "ref"], name: "index_ci_builds_on_commit_id_and_type_and_ref", using: :btree
253
  add_index "ci_builds", ["id"], name: "index_for_ci_builds_retried_migration", where: "(retried IS NULL)", using: :btree, opclasses: {"id)"=>"WHERE"}
Douwe Maan's avatar
Douwe Maan committed
254
255
  add_index "ci_builds", ["project_id"], name: "index_ci_builds_on_project_id", using: :btree
  add_index "ci_builds", ["runner_id"], name: "index_ci_builds_on_runner_id", using: :btree
256
  add_index "ci_builds", ["stage_id"], name: "index_ci_builds_on_stage_id", using: :btree
257
  add_index "ci_builds", ["status", "type", "runner_id"], name: "index_ci_builds_on_status_and_type_and_runner_id", using: :btree
258
  add_index "ci_builds", ["status"], name: "index_ci_builds_on_status", using: :btree
Kamil Trzcinski's avatar
Kamil Trzcinski committed
259
  add_index "ci_builds", ["token"], name: "index_ci_builds_on_token", unique: true, using: :btree
blackst0ne's avatar
blackst0ne committed
260
  add_index "ci_builds", ["updated_at"], name: "index_ci_builds_on_updated_at", using: :btree
blackst0ne's avatar
blackst0ne committed
261
  add_index "ci_builds", ["user_id"], name: "index_ci_builds_on_user_id", using: :btree
Douwe Maan's avatar
Douwe Maan committed
262

Shinya Maeda's avatar
fix    
Shinya Maeda committed
263
  create_table "ci_group_variables", force: :cascade do |t|
264
265
266
267
268
    t.string "key", null: false
    t.text "value"
    t.text "encrypted_value"
    t.string "encrypted_value_salt"
    t.string "encrypted_value_iv"
Shinya Maeda's avatar
fix    
Shinya Maeda committed
269
270
    t.integer "group_id", null: false
    t.boolean "protected", default: false, null: false
271
272
273
274
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
  end

Shinya Maeda's avatar
fix    
Shinya Maeda committed
275
  add_index "ci_group_variables", ["group_id", "key"], name: "index_ci_group_variables_on_group_id_and_key", unique: true, using: :btree
276

Shinya Maeda's avatar
fix    
Shinya Maeda committed
277
  create_table "ci_pipeline_schedule_variables", force: :cascade do |t|
Shinya Maeda's avatar
Shinya Maeda committed
278
279
280
281
282
    t.string "key", null: false
    t.text "value"
    t.text "encrypted_value"
    t.string "encrypted_value_salt"
    t.string "encrypted_value_iv"
Shinya Maeda's avatar
fix    
Shinya Maeda committed
283
284
285
    t.integer "pipeline_schedule_id", null: false
    t.datetime "created_at"
    t.datetime "updated_at"
Shinya Maeda's avatar
Shinya Maeda committed
286
287
  end

Shinya Maeda's avatar
fix    
Shinya Maeda committed
288
  add_index "ci_pipeline_schedule_variables", ["pipeline_schedule_id", "key"], name: "index_ci_pipeline_schedule_variables_on_schedule_id_and_key", unique: true, using: :btree
Shinya Maeda's avatar
Shinya Maeda committed
289

290
291
292
293
294
295
296
297
298
299
  create_table "ci_pipeline_schedules", force: :cascade do |t|
    t.string "description"
    t.string "ref"
    t.string "cron"
    t.string "cron_timezone"
    t.datetime "next_run_at"
    t.integer "project_id"
    t.integer "owner_id"
    t.boolean "active", default: true
    t.datetime "deleted_at"
Douwe Maan's avatar
Douwe Maan committed
300
301
302
303
    t.datetime "created_at"
    t.datetime "updated_at"
  end

304
305
  add_index "ci_pipeline_schedules", ["next_run_at", "active"], name: "index_ci_pipeline_schedules_on_next_run_at_and_active", using: :btree
  add_index "ci_pipeline_schedules", ["project_id"], name: "index_ci_pipeline_schedules_on_project_id", using: :btree
Douwe Maan's avatar
Douwe Maan committed
306

Shinya Maeda's avatar
init    
Shinya Maeda committed
307
308
309
310
311
312
313
314
315
316
317
  create_table "ci_pipeline_variables", force: :cascade do |t|
    t.string "key", null: false
    t.text "value"
    t.text "encrypted_value"
    t.string "encrypted_value_salt"
    t.string "encrypted_value_iv"
    t.integer "pipeline_id", null: false
  end

  add_index "ci_pipeline_variables", ["pipeline_id", "key"], name: "index_ci_pipeline_variables_on_pipeline_id_and_key", unique: true, using: :btree

Kamil Trzciński's avatar
Kamil Trzciński committed
318
  create_table "ci_pipelines", force: :cascade do |t|
319
320
321
    t.string "ref"
    t.string "sha"
    t.string "before_sha"
Douwe Maan's avatar
Douwe Maan committed
322
323
    t.datetime "created_at"
    t.datetime "updated_at"
324
325
    t.boolean "tag", default: false
    t.text "yaml_errors"
Douwe Maan's avatar
Douwe Maan committed
326
    t.datetime "committed_at"
Kamil Trzciński's avatar
Kamil Trzciński committed
327
    t.integer "project_id"
328
    t.string "status"
329
330
    t.datetime "started_at"
    t.datetime "finished_at"
331
332
    t.integer "duration"
    t.integer "user_id"
Kamil Trzcinski's avatar
Kamil Trzcinski committed
333
    t.integer "lock_version"
334
    t.integer "auto_canceled_by_id"
335
    t.integer "pipeline_schedule_id"
336
    t.integer "source"
Douwe Maan's avatar
Douwe Maan committed
337
338
  end

339
  add_index "ci_pipelines", ["auto_canceled_by_id"], name: "index_ci_pipelines_on_auto_canceled_by_id", using: :btree
340
  add_index "ci_pipelines", ["pipeline_schedule_id"], name: "index_ci_pipelines_on_pipeline_schedule_id", using: :btree
Kamil Trzciński's avatar
Kamil Trzciński committed
341
342
343
344
345
  add_index "ci_pipelines", ["project_id", "ref", "status"], name: "index_ci_pipelines_on_project_id_and_ref_and_status", using: :btree
  add_index "ci_pipelines", ["project_id", "sha"], name: "index_ci_pipelines_on_project_id_and_sha", using: :btree
  add_index "ci_pipelines", ["project_id"], name: "index_ci_pipelines_on_project_id", using: :btree
  add_index "ci_pipelines", ["status"], name: "index_ci_pipelines_on_status", using: :btree
  add_index "ci_pipelines", ["user_id"], name: "index_ci_pipelines_on_user_id", using: :btree
Douwe Maan's avatar
Douwe Maan committed
346

Valery Sizov's avatar
Valery Sizov committed
347
  create_table "ci_runner_projects", force: :cascade do |t|
348
    t.integer "runner_id", null: false
Douwe Maan's avatar
Douwe Maan committed
349
350
    t.datetime "created_at"
    t.datetime "updated_at"
Kamil Trzciński's avatar
Kamil Trzciński committed
351
    t.integer "project_id"
Douwe Maan's avatar
Douwe Maan committed
352
353
  end

Kamil Trzciński's avatar
Kamil Trzciński committed
354
  add_index "ci_runner_projects", ["project_id"], name: "index_ci_runner_projects_on_project_id", using: :btree
Douwe Maan's avatar
Douwe Maan committed
355
356
  add_index "ci_runner_projects", ["runner_id"], name: "index_ci_runner_projects_on_runner_id", using: :btree

Valery Sizov's avatar
Valery Sizov committed
357
  create_table "ci_runners", force: :cascade do |t|
358
    t.string "token"
Douwe Maan's avatar
Douwe Maan committed
359
360
    t.datetime "created_at"
    t.datetime "updated_at"
361
    t.string "description"
Douwe Maan's avatar
Douwe Maan committed
362
    t.datetime "contacted_at"
363
364
365
366
367
368
369
370
371
    t.boolean "active", default: true, null: false
    t.boolean "is_shared", default: false
    t.string "name"
    t.string "version"
    t.string "revision"
    t.string "platform"
    t.string "architecture"
    t.boolean "run_untagged", default: true, null: false
    t.boolean "locked", default: false, null: false
Douwe Maan's avatar
Douwe Maan committed
372
373
  end

374
  add_index "ci_runners", ["contacted_at"], name: "index_ci_runners_on_contacted_at", using: :btree
375
  add_index "ci_runners", ["is_shared"], name: "index_ci_runners_on_is_shared", using: :btree
376
  add_index "ci_runners", ["locked"], name: "index_ci_runners_on_locked", using: :btree
James Lopez's avatar
James Lopez committed
377
  add_index "ci_runners", ["token"], name: "index_ci_runners_on_token", using: :btree
378

379
380
381
  create_table "ci_stages", force: :cascade do |t|
    t.integer "project_id"
    t.integer "pipeline_id"
Douwe Maan's avatar
Douwe Maan committed
382
383
    t.datetime "created_at"
    t.datetime "updated_at"
384
    t.string "name"
385
    t.integer "status"
386
    t.integer "lock_version"
Douwe Maan's avatar
Douwe Maan committed
387
388
  end

389
  add_index "ci_stages", ["pipeline_id", "name"], name: "index_ci_stages_on_pipeline_id_and_name", using: :btree
390
391
  add_index "ci_stages", ["pipeline_id"], name: "index_ci_stages_on_pipeline_id", using: :btree
  add_index "ci_stages", ["project_id"], name: "index_ci_stages_on_project_id", using: :btree
392

Valery Sizov's avatar
Valery Sizov committed
393
  create_table "ci_trigger_requests", force: :cascade do |t|
394
395
    t.integer "trigger_id", null: false
    t.text "variables"
Douwe Maan's avatar
Douwe Maan committed
396
397
    t.datetime "created_at"
    t.datetime "updated_at"
398
    t.integer "commit_id"
Douwe Maan's avatar
Douwe Maan committed
399
400
  end

401
402
  add_index "ci_trigger_requests", ["commit_id"], name: "index_ci_trigger_requests_on_commit_id", using: :btree

Valery Sizov's avatar
Valery Sizov committed
403
  create_table "ci_triggers", force: :cascade do |t|
404
    t.string "token"
Douwe Maan's avatar
Douwe Maan committed
405
406
407
    t.datetime "deleted_at"
    t.datetime "created_at"
    t.datetime "updated_at"
Kamil Trzciński's avatar
Kamil Trzciński committed
408
    t.integer "project_id"
Kamil Trzcinski's avatar
Kamil Trzcinski committed
409
410
    t.integer "owner_id"
    t.string "description"
Shinya Maeda's avatar
Shinya Maeda committed
411
    t.string "ref"
Douwe Maan's avatar
Douwe Maan committed
412
413
  end

Kamil Trzciński's avatar
Kamil Trzciński committed
414
  add_index "ci_triggers", ["project_id"], name: "index_ci_triggers_on_project_id", using: :btree
Douwe Maan's avatar
Douwe Maan committed
415

Valery Sizov's avatar
Valery Sizov committed
416
  create_table "ci_variables", force: :cascade do |t|
417
    t.string "key", null: false
418
419
420
421
    t.text "value"
    t.text "encrypted_value"
    t.string "encrypted_value_salt"
    t.string "encrypted_value_iv"
422
    t.integer "project_id", null: false
423
    t.boolean "protected", default: false, null: false
424
    t.string "environment_scope", default: "*", null: false
Douwe Maan's avatar
Douwe Maan committed
425
426
  end

427
  add_index "ci_variables", ["project_id", "key", "environment_scope"], name: "index_ci_variables_on_project_id_and_key_and_environment_scope", unique: true, using: :btree
Douwe Maan's avatar
Douwe Maan committed
428

429
  create_table "container_repositories", force: :cascade do |t|
430
431
432
433
    t.integer "project_id", null: false
    t.string "name", null: false
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
Andre Guedes's avatar
Andre Guedes committed
434
435
  end

436
437
438
  add_index "container_repositories", ["project_id", "name"], name: "index_container_repositories_on_project_id_and_name", unique: true, using: :btree
  add_index "container_repositories", ["project_id"], name: "index_container_repositories_on_project_id", using: :btree

439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
  create_table "conversational_development_index_metrics", force: :cascade do |t|
    t.float "leader_issues", null: false
    t.float "instance_issues", null: false
    t.float "leader_notes", null: false
    t.float "instance_notes", null: false
    t.float "leader_milestones", null: false
    t.float "instance_milestones", null: false
    t.float "leader_boards", null: false
    t.float "instance_boards", null: false
    t.float "leader_merge_requests", null: false
    t.float "instance_merge_requests", null: false
    t.float "leader_ci_pipelines", null: false
    t.float "instance_ci_pipelines", null: false
    t.float "leader_environments", null: false
    t.float "instance_environments", null: false
    t.float "leader_deployments", null: false
    t.float "instance_deployments", null: false
    t.float "leader_projects_prometheus_active", null: false
    t.float "instance_projects_prometheus_active", null: false
    t.float "leader_service_desk_issues", null: false
    t.float "instance_service_desk_issues", null: false
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
462
463
464
465
466
467
468
469
470
471
    t.float "percentage_boards", default: 0.0, null: false
    t.float "percentage_ci_pipelines", default: 0.0, null: false
    t.float "percentage_deployments", default: 0.0, null: false
    t.float "percentage_environments", default: 0.0, null: false
    t.float "percentage_issues", default: 0.0, null: false
    t.float "percentage_merge_requests", default: 0.0, null: false
    t.float "percentage_milestones", default: 0.0, null: false
    t.float "percentage_notes", default: 0.0, null: false
    t.float "percentage_projects_prometheus_active", default: 0.0, null: false
    t.float "percentage_service_desk_issues", default: 0.0, null: false
472
  end
Douwe Maan's avatar
Douwe Maan committed
473

Valery Sizov's avatar
Valery Sizov committed
474
  create_table "deploy_keys_projects", force: :cascade do |t|
475
476
    t.integer "deploy_key_id", null: false
    t.integer "project_id", null: false
477
478
    t.datetime "created_at"
    t.datetime "updated_at"
479
  end
480

Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
481
  add_index "deploy_keys_projects", ["project_id"], name: "index_deploy_keys_projects_on_project_id", using: :btree
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
482

483
  create_table "deployments", force: :cascade do |t|
Valery Sizov's avatar
Valery Sizov committed
484
485
486
487
488
489
    t.integer "iid", null: false
    t.integer "project_id", null: false
    t.integer "environment_id", null: false
    t.string "ref", null: false
    t.boolean "tag", null: false
    t.string "sha", null: false
490
    t.integer "user_id"
Valery Sizov's avatar
Valery Sizov committed
491
492
    t.integer "deployable_id"
    t.string "deployable_type"
493
494
    t.datetime "created_at"
    t.datetime "updated_at"
Kamil Trzcinski's avatar
Kamil Trzcinski committed
495
    t.string "on_stop"
496
497
  end

498
  add_index "deployments", ["created_at"], name: "index_deployments_on_created_at", using: :btree
499
  add_index "deployments", ["project_id", "environment_id", "iid"], name: "index_deployments_on_project_id_and_environment_id_and_iid", using: :btree
500
  add_index "deployments", ["project_id", "iid"], name: "index_deployments_on_project_id_and_iid", unique: true, using: :btree
501

Valery Sizov's avatar
Valery Sizov committed
502
  create_table "emails", force: :cascade do |t|
503
504
    t.integer "user_id", null: false
    t.string "email", null: false
505
506
507
508
509
510
511
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index "emails", ["email"], name: "index_emails_on_email", unique: true, using: :btree
  add_index "emails", ["user_id"], name: "index_emails_on_user_id", using: :btree

512
  create_table "environments", force: :cascade do |t|
513
514
    t.integer "project_id"
    t.string "name", null: false
515
516
    t.datetime "created_at"
    t.datetime "updated_at"
517
518
    t.string "external_url"
    t.string "environment_type"
519
    t.string "state", default: "available", null: false
Nick Thomas's avatar
Nick Thomas committed
520
    t.string "slug", null: false
521
522
  end

523
  add_index "environments", ["project_id", "name"], name: "index_environments_on_project_id_and_name", unique: true, using: :btree
Nick Thomas's avatar
Nick Thomas committed
524
  add_index "environments", ["project_id", "slug"], name: "index_environments_on_project_id_and_slug", unique: true, using: :btree
525

Valery Sizov's avatar
Valery Sizov committed
526
  create_table "events", force: :cascade do |t|
527
528
529
530
531
    t.string "target_type"
    t.integer "target_id"
    t.string "title"
    t.text "data"
    t.integer "project_id"
532
533
    t.datetime "created_at"
    t.datetime "updated_at"
534
535
    t.integer "action"
    t.integer "author_id"
Andrew8xx8's avatar
Andrew8xx8 committed
536
537
  end

Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
538
539
540
  add_index "events", ["action"], name: "index_events_on_action", using: :btree
  add_index "events", ["author_id"], name: "index_events_on_author_id", using: :btree
  add_index "events", ["created_at"], name: "index_events_on_created_at", using: :btree
541
  add_index "events", ["project_id", "id"], name: "index_events_on_project_id_and_id", using: :btree
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
542
543
544
  add_index "events", ["target_id"], name: "index_events_on_target_id", using: :btree
  add_index "events", ["target_type"], name: "index_events_on_target_type", using: :btree

545
546
547
548
549
550
551
552
553
554
555
556
  create_table "events_for_migration", force: :cascade do |t|
    t.integer "project_id"
    t.integer "author_id", null: false
    t.integer "target_id"
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
    t.integer "action", limit: 2, null: false
    t.string "target_type"
  end

  add_index "events_for_migration", ["action"], name: "index_events_for_migration_on_action", using: :btree
  add_index "events_for_migration", ["author_id"], name: "index_events_for_migration_on_author_id", using: :btree
557
  add_index "events_for_migration", ["project_id", "id"], name: "index_events_for_migration_on_project_id_and_id", using: :btree
558
559
  add_index "events_for_migration", ["target_type", "target_id"], name: "index_events_for_migration_on_target_type_and_target_id", using: :btree

560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
  create_table "feature_gates", force: :cascade do |t|
    t.string "feature_key", null: false
    t.string "key", null: false
    t.string "value"
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
  end

  add_index "feature_gates", ["feature_key", "key", "value"], name: "index_feature_gates_on_feature_key_and_key_and_value", unique: true, using: :btree

  create_table "features", force: :cascade do |t|
    t.string "key", null: false
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
  end

  add_index "features", ["key"], name: "index_features_on_key", unique: true, using: :btree

Valery Sizov's avatar
Valery Sizov committed
578
  create_table "forked_project_links", force: :cascade do |t|
579
580
    t.integer "forked_to_project_id", null: false
    t.integer "forked_from_project_id", null: false
581
582
    t.datetime "created_at"
    t.datetime "updated_at"
583
584
  end

Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
585
  add_index "forked_project_links", ["forked_to_project_id"], name: "index_forked_project_links_on_forked_to_project_id", unique: true, using: :btree
586

Alexis Reigel's avatar
Alexis Reigel committed
587
588
589
  create_table "gpg_keys", force: :cascade do |t|
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
590
    t.integer "user_id"
591
592
    t.binary "primary_keyid"
    t.binary "fingerprint"
593
    t.text "key"
Alexis Reigel's avatar
Alexis Reigel committed
594
595
  end

Alexis Reigel's avatar
Alexis Reigel committed
596
597
  add_index "gpg_keys", ["fingerprint"], name: "index_gpg_keys_on_fingerprint", unique: true, using: :btree
  add_index "gpg_keys", ["primary_keyid"], name: "index_gpg_keys_on_primary_keyid", unique: true, using: :btree
Alexis Reigel's avatar
Alexis Reigel committed
598
599
  add_index "gpg_keys", ["user_id"], name: "index_gpg_keys_on_user_id", using: :btree

600
  create_table "gpg_signatures", force: :cascade do |t|
601
602
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
603
604
605
    t.integer "project_id"
    t.integer "gpg_key_id"
    t.boolean "valid_signature"
606
607
    t.binary "commit_sha"
    t.binary "gpg_key_primary_keyid"
608
609
    t.text "gpg_key_user_name"
    t.text "gpg_key_user_email"
610
611
  end

612
  add_index "gpg_signatures", ["commit_sha"], name: "index_gpg_signatures_on_commit_sha", unique: true, using: :btree
613
614
615
616
  add_index "gpg_signatures", ["gpg_key_id"], name: "index_gpg_signatures_on_gpg_key_id", using: :btree
  add_index "gpg_signatures", ["gpg_key_primary_keyid"], name: "index_gpg_signatures_on_gpg_key_primary_keyid", using: :btree
  add_index "gpg_signatures", ["project_id"], name: "index_gpg_signatures_on_project_id", using: :btree

Valery Sizov's avatar
Valery Sizov committed
617
  create_table "identities", force: :cascade do |t|
618
619
620
    t.string "extern_uid"
    t.string "provider"
    t.integer "user_id"
621
622
    t.datetime "created_at"
    t.datetime "updated_at"
623
624
625
626
  end

  add_index "identities", ["user_id"], name: "index_identities_on_user_id", using: :btree

627
  create_table "issue_assignees", id: false, force: :cascade do |t|
628
629
630
631
632
633
634
    t.integer "user_id", null: false
    t.integer "issue_id", null: false
  end

  add_index "issue_assignees", ["issue_id", "user_id"], name: "index_issue_assignees_on_issue_id_and_user_id", unique: true, using: :btree
  add_index "issue_assignees", ["user_id"], name: "index_issue_assignees_on_user_id", using: :btree

635
  create_table "issue_metrics", force: :cascade do |t|
636
    t.integer "issue_id", null: false
637
    t.datetime "first_mentioned_in_commit_at"
638
639
    t.datetime "first_associated_with_milestone_at"
    t.datetime "first_added_to_board_at"
640
641
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
642
643
644
645
  end

  add_index "issue_metrics", ["issue_id"], name: "index_issue_metrics", using: :btree

Valery Sizov's avatar
Valery Sizov committed
646
  create_table "issues", force: :cascade do |t|
647
648
649
650
    t.string "title"
    t.integer "assignee_id"
    t.integer "author_id"
    t.integer "project_id"
651
652
    t.datetime "created_at"
    t.datetime "updated_at"
653
654
655
656
657
658
659
    t.string "branch_name"
    t.text "description"
    t.integer "milestone_id"
    t.string "state"
    t.integer "iid"
    t.integer "updated_by_id"
    t.boolean "confidential", default: false
660
    t.datetime "deleted_at"
661
662
663
664
665
    t.date "due_date"
    t.integer "moved_to_id"
    t.integer "lock_version"
    t.text "title_html"
    t.text "description_html"
666
    t.integer "time_estimate"
667
    t.integer "relative_position"
Felipe Artur's avatar
Felipe Artur committed
668
    t.datetime "closed_at"
669
    t.integer "cached_markdown_version"
670
671
    t.datetime "last_edited_at"
    t.integer "last_edited_by_id"
Andrew8xx8's avatar
Andrew8xx8 committed
672
673
  end

Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
674
675
  add_index "issues", ["assignee_id"], name: "index_issues_on_assignee_id", using: :btree
  add_index "issues", ["author_id"], name: "index_issues_on_author_id", using: :btree
676
  add_index "issues", ["confidential"], name: "index_issues_on_confidential", using: :btree
Zeger-Jan van de Weg's avatar
Zeger-Jan van de Weg committed
677
  add_index "issues", ["deleted_at"], name: "index_issues_on_deleted_at", using: :btree
678
  add_index "issues", ["description"], name: "index_issues_on_description_trigram", using: :gin, opclasses: {"description"=>"gin_trgm_ops"}
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
679
  add_index "issues", ["milestone_id"], name: "index_issues_on_milestone_id", using: :btree
680
681
  add_index "issues", ["project_id", "created_at", "id", "state"], name: "index_issues_on_project_id_and_created_at_and_id_and_state", using: :btree
  add_index "issues", ["project_id", "due_date", "id", "state"], name: "index_issues_on_project_id_and_due_date_and_id_and_state", using: :btree
682
  add_index "issues", ["project_id", "iid"], name: "index_issues_on_project_id_and_iid", unique: true, using: :btree
683
  add_index "issues", ["project_id", "updated_at", "id", "state"], name: "index_issues_on_project_id_and_updated_at_and_id_and_state", using: :btree
684
  add_index "issues", ["relative_position"], name: "index_issues_on_relative_position", using: :btree
685
  add_index "issues", ["state"], name: "index_issues_on_state", using: :btree
686
  add_index "issues", ["title"], name: "index_issues_on_title_trigram", using: :gin, opclasses: {"title"=>"gin_trgm_ops"}
Andrew8xx8's avatar
Andrew8xx8 committed
687

Valery Sizov's avatar
Valery Sizov committed
688
  create_table "keys", force: :cascade do |t|
689
    t.integer "user_id"
690
691
    t.datetime "created_at"
    t.datetime "updated_at"
692
693
694
695
696
    t.text "key"
    t.string "title"
    t.string "type"
    t.string "fingerprint"
    t.boolean "public", default: false, null: false
697
    t.boolean "can_push", default: false, null: false
698
    t.datetime "last_used_at"
Andrew8xx8's avatar
Andrew8xx8 committed
699
700
  end

701
  add_index "keys", ["fingerprint"], name: "index_keys_on_fingerprint", unique: true, using: :btree
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
702
  add_index "keys", ["user_id"], name: "index_keys_on_user_id", using: :btree
Andrew8xx8's avatar
Andrew8xx8 committed
703

Valery Sizov's avatar
Valery Sizov committed
704
  create_table "label_links", force: :cascade do |t|
705
706
707
    t.integer "label_id"
    t.integer "target_id"
    t.string "target_type"
708
709
710
711
    t.datetime "created_at"
    t.datetime "updated_at"
  end

Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
712
713
714
  add_index "label_links", ["label_id"], name: "index_label_links_on_label_id", using: :btree
  add_index "label_links", ["target_id", "target_type"], name: "index_label_links_on_target_id_and_target_type", using: :btree

715
716
717
718
719
720
721
722
723
724
725
  create_table "label_priorities", force: :cascade do |t|
    t.integer "project_id", null: false
    t.integer "label_id", null: false
    t.integer "priority", null: false
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
  end

  add_index "label_priorities", ["priority"], name: "index_label_priorities_on_priority", using: :btree
  add_index "label_priorities", ["project_id", "label_id"], name: "index_label_priorities_on_project_id_and_label_id", unique: true, using: :btree

Valery Sizov's avatar
Valery Sizov committed
726
  create_table "labels", force: :cascade do |t|
727
728
729
    t.string "title"
    t.string "color"
    t.integer "project_id"
730
731
    t.datetime "created_at"
    t.datetime "updated_at"
732
733
734
    t.boolean "template", default: false
    t.string "description"
    t.text "description_html"
735
736
    t.string "type"
    t.integer "group_id"
737
    t.integer "cached_markdown_version"
738
739
  end

740
  add_index "labels", ["group_id", "project_id", "title"], name: "index_labels_on_group_id_and_project_id_and_title", unique: true, using: :btree
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
741
  add_index "labels", ["project_id"], name: "index_labels_on_project_id", using: :btree
Ahmad Sherif's avatar
Ahmad Sherif committed
742
  add_index "labels", ["title"], name: "index_labels_on_title", using: :btree
743
  add_index "labels", ["type", "project_id"], name: "index_labels_on_type_and_project_id", using: :btree
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
744

Valery Sizov's avatar
Valery Sizov committed
745
  create_table "lfs_objects", force: :cascade do |t|
746
747
    t.string "oid", null: false
    t.integer "size", limit: 8, null: false
Marin Jankovski's avatar
Marin Jankovski committed
748
749
    t.datetime "created_at"
    t.datetime "updated_at"
750
    t.string "file"
Marin Jankovski's avatar
Marin Jankovski committed
751
752
  end

753
  add_index "lfs_objects", ["oid"], name: "index_lfs_objects_on_oid", unique: true, using: :btree
Marin Jankovski's avatar
Marin Jankovski committed
754

Valery Sizov's avatar
Valery Sizov committed
755
  create_table "lfs_objects_projects", force: :cascade do |t|
756
757
    t.integer "lfs_object_id", null: false
    t.integer "project_id", null: false
Marin Jankovski's avatar
Marin Jankovski committed
758
759
760
761
762
763
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index "lfs_objects_projects", ["project_id"], name: "index_lfs_objects_projects_on_project_id", using: :btree

Douglas Barbosa Alexandre's avatar
Douglas Barbosa Alexandre committed
764
  create_table "lists", force: :cascade do |t|
765
766
767
768
769
770
    t.integer "board_id", null: false
    t.integer "label_id"
    t.integer "list_type", default: 1, null: false
    t.integer "position"
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
Douglas Barbosa Alexandre's avatar
Douglas Barbosa Alexandre committed
771
772
  end

773
  add_index "lists", ["board_id", "label_id"], name: "index_lists_on_board_id_and_label_id", unique: true, using: :btree
Douglas Barbosa Alexandre's avatar
Douglas Barbosa Alexandre committed
774
775
  add_index "lists", ["label_id"], name: "index_lists_on_label_id", using: :btree

Valery Sizov's avatar
Valery Sizov committed
776
  create_table "members", force: :cascade do |t|
777
778
779
780
781
782
    t.integer "access_level", null: false
    t.integer "source_id", null: false
    t.string "source_type", null: false
    t.integer "user_id"
    t.integer "notification_level", null: false
    t.string "type"
783
784
    t.datetime "created_at"
    t.datetime "updated_at"
785
786
787
    t.integer "created_by_id"
    t.string "invite_email"
    t.string "invite_token"
Douwe Maan's avatar
Douwe Maan committed
788
    t.datetime "invite_accepted_at"
Rémy Coutable's avatar
Rémy Coutable committed
789
    t.datetime "requested_at"
790
    t.date "expires_at"
791
792
  end

793
  add_index "members", ["access_level"], name: "index_members_on_access_level", using: :btree
Douwe Maan's avatar
Douwe Maan committed
794
  add_index "members", ["invite_token"], name: "index_members_on_invite_token", unique: true, using: :btree
795
  add_index "members", ["requested_at"], name: "index_members_on_requested_at", using: :btree
796
797
798
  add_index "members", ["source_id", "source_type"], name: "index_members_on_source_id_and_source_type", using: :btree
  add_index "members", ["user_id"], name: "index_members_on_user_id", using: :btree

799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
  create_table "merge_request_diff_commits", id: false, force: :cascade do |t|
    t.datetime "authored_date"
    t.datetime "committed_date"
    t.integer "merge_request_diff_id", null: false
    t.integer "relative_order", null: false
    t.binary "sha", null: false
    t.text "author_name"
    t.text "author_email"
    t.text "committer_name"
    t.text "committer_email"
    t.text "message"
  end

  add_index "merge_request_diff_commits", ["merge_request_diff_id", "relative_order"], name: "index_merge_request_diff_commits_on_mr_diff_id_and_order", unique: true, using: :btree

814
815
816
817
818
819
820
821
822
823
824
825
  create_table "merge_request_diff_files", id: false, force: :cascade do |t|
    t.integer "merge_request_diff_id", null: false
    t.integer "relative_order", null: false
    t.boolean "new_file", null: false
    t.boolean "renamed_file", null: false
    t.boolean "deleted_file", null: false
    t.boolean "too_large", null: false
    t.string "a_mode", null: false
    t.string "b_mode", null: false
    t.text "new_path", null: false
    t.text "old_path", null: false
    t.text "diff", null: false
826
    t.boolean "binary"
827
828
829
830
  end

  add_index "merge_request_diff_files", ["merge_request_diff_id", "relative_order"], name: "index_merge_request_diff_files_on_mr_diff_id_and_order", unique: true, using: :btree

Valery Sizov's avatar
Valery Sizov committed
831
  create_table "merge_request_diffs", force: :cascade do |t|
832
833
834
835
    t.string "state"
    t.text "st_commits"
    t.text "st_diffs"
    t.integer "merge_request_id", null: false
836
837
    t.datetime "created_at"
    t.datetime "updated_at"
838
839
840
841
    t.string "base_commit_sha"
    t.string "real_size"
    t.string "head_commit_sha"
    t.string "start_commit_sha"
842
843
  end

844
  add_index "merge_request_diffs", ["merge_request_id"], name: "index_merge_request_diffs_on_merge_request_id", using: :btree
845

846
  create_table "merge_request_metrics", force: :cascade do |t|
847
    t.integer "merge_request_id", null: false
848
849
    t.datetime "latest_build_started_at"
    t.datetime "latest_build_finished_at"
Timothy Andrew's avatar
Timothy Andrew committed
850
851
    t.datetime "first_deployed_to_production_at"
    t.datetime "merged_at"
852
853
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
854
    t.integer "pipeline_id"
855
856
  end

857
  add_index "merge_request_metrics", ["first_deployed_to_production_at"], name: "index_merge_request_metrics_on_first_deployed_to_production_at", using: :btree
858
  add_index "merge_request_metrics", ["merge_request_id"], name: "index_merge_request_metrics", using: :btree
859
  add_index "merge_request_metrics", ["pipeline_id"], name: "index_merge_request_metrics_on_pipeline_id", using: :btree
860

Valery Sizov's avatar
Valery Sizov committed
861
  create_table "merge_requests", force: :cascade do |t|
862
863
864
865
866
867
    t.string "target_branch", null: false
    t.string "source_branch", null: false
    t.integer "source_project_id", null: false
    t.integer "author_id"
    t.integer "assignee_id"
    t.string "title"
868
869
    t.datetime "created_at"
    t.datetime "updated_at"
870
871
872
873
874
875
876
877
878
    t.integer "milestone_id"
    t.string "state"
    t.string "merge_status"
    t.integer "target_project_id", null: false
    t.integer "iid"
    t.text "description"
    t.integer "updated_by_id"
    t.text "merge_error"
    t.text "merge_params"
879
    t.boolean "merge_when_pipeline_succeeds", default: false, null: false
880
881
    t.integer "merge_user_id"
    t.string "merge_commit_sha"
Zeger-Jan van de Weg's avatar
Zeger-Jan van de Weg committed
882
    t.datetime "deleted_at"
883
    t.string "in_progress_merge_commit_sha"
Valery Sizov's avatar
Valery Sizov committed
884
    t.integer "lock_version"
885
886
    t.text "title_html"
    t.text "description_html"
887
    t.integer "time_estimate"
888
    t.integer "cached_markdown_version"
889
890
    t.datetime "last_edited_at"
    t.integer "last_edited_by_id"
891
    t.integer "head_pipeline_id"
892
    t.boolean "ref_fetched"
893
    t.string "merge_jid"
Andrew8xx8's avatar
Andrew8xx8 committed
894
  end
tiagonbotelho's avatar
tiagonbotelho committed
895

Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
896
897
898
  add_index "merge_requests", ["assignee_id"], name: "index_merge_requests_on_assignee_id", using: :btree
  add_index "merge_requests", ["author_id"], name: "index_merge_requests_on_author_id", using: :btree
  add_index "merge_requests", ["created_at"], name: "index_merge_requests_on_created_at", using: :btree
Zeger-Jan van de Weg's avatar
Zeger-Jan van de Weg committed
899
  add_index "merge_requests", ["deleted_at"], name: "index_merge_requests_on_deleted_at", using: :btree
900
  add_index "merge_requests", ["description"], name: "index_merge_requests_on_description_trigram", using: :gin, opclasses: {"description"=>"gin_trgm_ops"}
901
  add_index "merge_requests", ["head_pipeline_id"], name: "index_merge_requests_on_head_pipeline_id", using: :btree
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
902
903
  add_index "merge_requests", ["milestone_id"], name: "index_merge_requests_on_milestone_id", using: :btree
  add_index "merge_requests", ["source_branch"], name: "index_merge_requests_on_source_branch", using: :btree
904
  add_index "merge_requests", ["source_project_id"], name: "index_merge_requests_on_source_project_id", using: :btree
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
905
  add_index "merge_requests", ["target_branch"], name: "index_merge_requests_on_target_branch", using: :btree
906
  add_index "merge_requests", ["target_project_id", "iid"], name: "index_merge_requests_on_target_project_id_and_iid", unique: true, using: :btree
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
907
  add_index "merge_requests", ["title"], name: "index_merge_requests_on_title", using: :btree
908
  add_index "merge_requests", ["title"], name: "index_merge_requests_on_title_trigram", using: :gin, opclasses: {"title"=>"gin_trgm_ops"}
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
909

910
  create_table "merge_requests_closing_issues", force: :cascade do |t|
911
912
913
914
    t.integer "merge_request_id", null: false
    t.integer "issue_id", null: false
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
915
916
  end

Timothy Andrew's avatar
Timothy Andrew committed
917
918
919
  add_index "merge_requests_closing_issues", ["issue_id"], name: "index_merge_requests_closing_issues_on_issue_id", using: :btree
  add_index "merge_requests_closing_issues", ["merge_request_id"], name: "index_merge_requests_closing_issues_on_merge_request_id", using: :btree

Valery Sizov's avatar
Valery Sizov committed
920
  create_table "milestones", force: :cascade do |t|
921
    t.string "title", null: false
Felipe Artur's avatar
Felipe Artur committed
922
    t.integer "project_id"
923
924
    t.text "description"
    t.date "due_date"
925
926
    t.datetime "created_at"
    t.datetime "updated_at"
927
928
929
930
    t.string "state"
    t.integer "iid"
    t.text "title_html"
    t.text "description_html"
931
    t.date "start_date"
932
    t.integer "cached_markdown_version"
Felipe Artur's avatar
Felipe Artur committed
933
    t.integer "group_id"
Andrew8xx8's avatar
Andrew8xx8 committed
934
935
  end

936
  add_index "milestones", ["description"], name: "index_milestones_on_description_trigram", using: :gin, opclasses: {"description"=>"gin_trgm_ops"}
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
937
  add_index "milestones", ["due_date"], name: "index_milestones_on_due_date", using: :btree
Felipe Artur's avatar
Felipe Artur committed
938
  add_index "milestones", ["group_id"], name: "index_milestones_on_group_id", using: :btree
939
  add_index "milestones", ["project_id", "iid"], name: "index_milestones_on_project_id_and_iid", unique: true, using: :btree
940
  add_index "milestones", ["title"], name: "index_milestones_on_title", using: :btree
941
  add_index "milestones", ["title"], name: "index_milestones_on_title_trigram", using: :gin,