kuroko2 0.2.3 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/kuroko2/definition_linker.js +1 -1
  3. data/app/assets/stylesheets/kuroko2/application.scss +4 -0
  4. data/app/controllers/kuroko2/api/job_instances_controller.rb +3 -2
  5. data/app/controllers/kuroko2/dashboard_controller.rb +1 -1
  6. data/app/controllers/kuroko2/job_definitions_controller.rb +2 -2
  7. data/app/controllers/kuroko2/job_instances_controller.rb +8 -18
  8. data/app/controllers/kuroko2/tokens_controller.rb +3 -3
  9. data/app/controllers/kuroko2/users_controller.rb +17 -1
  10. data/app/models/kuroko2/job_definition.rb +11 -0
  11. data/app/models/kuroko2/job_instance.rb +19 -2
  12. data/app/models/kuroko2/job_schedule.rb +3 -6
  13. data/app/models/kuroko2/job_suspend_schedule.rb +1 -1
  14. data/app/models/kuroko2/token.rb +8 -0
  15. data/app/views/kuroko2/execution_logs/index.json.jbuilder +1 -1
  16. data/app/views/kuroko2/job_definitions/_form.html.slim +6 -1
  17. data/app/views/kuroko2/job_definitions/_list.html.slim +12 -5
  18. data/app/views/kuroko2/job_definitions/_search_results.html.slim +10 -3
  19. data/app/views/kuroko2/job_definitions/show.html.slim +5 -3
  20. data/app/views/kuroko2/job_timelines/dataset.json.jbuilder +1 -1
  21. data/app/views/kuroko2/logs/index.html.slim +6 -6
  22. data/app/views/kuroko2/tokens/index.html.slim +2 -2
  23. data/app/views/kuroko2/users/edit.html.slim +37 -0
  24. data/app/views/kuroko2/users/show.html.slim +8 -4
  25. data/db/migrate/026_add_webhook_url_to_job_definitions.rb +5 -0
  26. data/lib/autoload/kuroko2/workflow/engine.rb +4 -6
  27. data/lib/autoload/kuroko2/workflow/notifier/concerns/chat_message_builder.rb +12 -0
  28. data/lib/autoload/kuroko2/workflow/notifier/hipchat.rb +30 -4
  29. data/lib/autoload/kuroko2/workflow/notifier/mail.rb +9 -1
  30. data/lib/autoload/kuroko2/workflow/notifier/slack.rb +31 -4
  31. data/lib/autoload/kuroko2/workflow/notifier/webhook.rb +173 -0
  32. data/lib/autoload/kuroko2/workflow/task/queue.rb +2 -2
  33. data/lib/autoload/kuroko2/workflow/task/sub_process.rb +2 -4
  34. data/lib/kuroko2/version.rb +1 -1
  35. data/spec/controllers/users_controller_spec.rb +51 -2
  36. data/spec/dummy/config/kuroko2.yml +2 -0
  37. data/spec/dummy/db/schema.rb +76 -92
  38. data/spec/dummy/log/development.log +1143 -0
  39. data/spec/dummy/log/test.log +271238 -0
  40. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/-Q/-QhKaYdB1JJGAsq6Ih7uQZJD46XkY5Gw0-38DBDVg3Y.cache +1 -0
  41. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/-h/-h4P8jVHGGfJVwG36J8kBUkHFa3HHGNiJQz0936uaxg.cache +1 -0
  42. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/24/24laeo7m53bkbst3Gxu4hlJY-EbnK-rQxH-DA4ujzwY.cache +1 -0
  43. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/2e/2eEFzw4UUZHJizptl3nT5jVv3IL25_RdYImr3lAVlJ4.cache +1 -0
  44. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/2z/2z8OmZrK1FFsPb8zq9RFli2IVM0gOna92hieZ4cK36c.cache +0 -0
  45. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/4K/4Ky9Fg4qo8d_i8bJF6NOhDpxHuJ5kIX8n0w6C8wdHDU.cache +3 -0
  46. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Di/Di9ZEIp2OLO96tkqFN21AWfdoAhc0OCBOJb3o8RUk1I.cache +0 -0
  47. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ex/ExgjnrLZM8Hc_uT_sWVaQSNR26tGYCGUsbJDXs9GYO0.cache +1 -0
  48. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/FJ/FJW4oZDLKhsjg_UHdycQAY88BFtnMeeLCuArx6HIMdM.cache +0 -0
  49. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Iq/IqSpSELRWrOQtOK8F6mGZFPvfafM4yn8gB_VquH9E50.cache +1 -0
  50. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/JJ/JJ2dvNSAjiGkZZs_1Dz2TMWDJs4HypQ95b26cHN13I0.cache +1 -0
  51. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/LJ/LJsVKu6GCC14s20BfJEDXwajK6-xWF72ANX5ONOTX1w.cache +1 -0
  52. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/LL/LLCxb9El_km568UsA8DDOe8Vh3pPKE8IU6ZNww9ie8s.cache +1 -0
  53. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Pq/pqeS6zqHUdv-_25W2PSQMm31ql_cIpaK1iqEcfiNyUQ.cache +0 -0
  54. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Q9/Q9TwXzoqqs8Dm9v25gjZxYIkZW1UKm2X8g2koo5aYhQ.cache +1 -0
  55. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/QJ/QJNiKbGgll2T_0mhQus6ZL9a2SM4Xqz7vs2V2KbELPw.cache +1 -0
  56. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/QV/QVVeFw88kC-7HfzOk_dCVoFBnz9W_7-gmJFYh-Xlh-0.cache +0 -0
  57. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Qs/QsTn160WUaI8_u8tE8rz37XiSV9qLvSxiXAR-tCtV3Y.cache +0 -0
  58. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/V2/V2QhbjrEGa7in5Uj1P-3E1Ziw2AGno_ADefUhPNHw_A.cache +0 -0
  59. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Vj/VjICw6h8uQ_278ekFlu1znnPR8Gz1vWF_mRgy0KjZXs.cache +1 -0
  60. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/dH/dHFrKzzqtF3aoKs2wAI8z0CNHZoNuytfiHur9Zgz9z0.cache +1 -0
  61. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/fE/fEFAQG1Uqt2e58VitSFoPsjVjntfPtgL9RKoKHUTS9U.cache +1 -0
  62. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/fM/FMdA_jabowoG5SAWE93G7Hu8A-5GhfzC9Gjy3EJp1Ts.cache +1 -0
  63. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/hI/hIIciXZzgFWXdW0lamhs4r5zFFr4hnXvWAuOihCS5qI.cache +0 -0
  64. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/hW/hWOkA9ZbQJy1YfEXThjYPOiXRDVRgAeW8TmLm-uQCYk.cache +1 -0
  65. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/iv/ivrIChCv2olhH20VXJQTJgVWlx3t9ncsYxV0QfLT0Bs.cache +0 -0
  66. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/k3/k31T18tx4gR2rhpmDMYMLUa8KPDt7QRIR_qRK56LOdE.cache +0 -0
  67. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/oB/oB0c7AuqQVdgqJDgphXXOHw3SXqbDUYfZWxxm9-v_is.cache +0 -0
  68. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ou/ouMQatdL-PPhPVPw5o0xm5EBkVeVWLti06EUEVmfOBo.cache +1 -0
  69. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/qM/qMZbagtANt1BI7qOJXWEpzxx1qa-IKMkyOy6EKEIIbE.cache +0 -0
  70. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/rc/rcceqGk009vh5_tK6Y-i1dvbYQwuUtRF888xZcnZrj8.cache +1 -0
  71. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/sJ/sJOLo6McRe1YhfgIaGhcDaAoulIdYY7Rs07TAKmrSoY.cache +0 -0
  72. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/sh/shGRyWpXjqxMTGB3As4Vibs8VGS0bZHHd4s0qabhwXI.cache +1 -0
  73. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/sr/SRfo3vCtDVy0qd-OB9dv5a-xIVTHkJZDn8XwY_ymy7g.cache +1 -0
  74. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/vV/vV3Loym0NolgPoXFEVPOr5rDgB_Q5kvUA3InuEEvEvQ.cache +1 -0
  75. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/wK/wK5S37PPHfwFm-4mrLMMPdOZ29-H75zo1T2gmErWjLI.cache +0 -0
  76. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/wm/wm_qI7_LCxbnH6p7BK1Pqcocl-6TcULzTERICGZIdL0.cache +1 -0
  77. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/zC/zCYIl3BglB_fMHME2oqK30CF97CBUG09R0ICLpE-pIM.cache +0 -0
  78. data/spec/features/dashborad_spec.rb +10 -3
  79. data/spec/features/users_spec.rb +20 -4
  80. data/spec/models/job_instance_spec.rb +1 -1
  81. data/spec/models/token_spec.rb +38 -0
  82. data/spec/workflow/notifier/hipchat_spec.rb +91 -0
  83. data/spec/workflow/notifier/mail_spec.rb +18 -2
  84. data/spec/workflow/notifier/slack_spec.rb +85 -0
  85. data/spec/workflow/notifier/webhook_spec.rb +187 -0
  86. data/spec/workflow/task/queue_spec.rb +11 -0
  87. metadata +93 -16
@@ -13,8 +13,8 @@ module Kuroko2
13
13
  end
14
14
 
15
15
  def validate
16
- unless /\A[\w_-]{1,180}\z/ === option
17
- raise Workflow::AssertionError, "Queue name must be match with /\A[\w_-]{1,255}\z/: #{option}"
16
+ unless /\A\@?[\w_-]{1,180}\z/ === option
17
+ raise Workflow::AssertionError, "Queue name must be match with /\A\@?[\w_-]{1,255}\z/: #{option}"
18
18
  end
19
19
 
20
20
  unless Worker.where(queue: option, working: true).exists?
@@ -29,13 +29,11 @@ module Kuroko2
29
29
  end
30
30
  else
31
31
  definition = JobDefinition.find(@node.option)
32
- instance = definition.job_instances.create
33
-
34
- instance.logs.info("Launched by '##{token.job_definition.id} #{token.job_definition.name}' instance##{token.job_definition.id}/#{token.job_instance.id}.")
32
+ launched_by = "'##{token.job_definition.id} #{token.job_definition.name}' instance##{token.job_definition.id}/#{token.job_instance.id}"
33
+ instance = definition.create_instance(launched_by: launched_by)
35
34
  token.job_instance.logs.info("(token #{token.uuid}) Launched '##{instance.job_definition.id} #{instance.job_definition.name}' instance##{instance.job_definition.id}/#{instance.id} as a sub process.")
36
35
 
37
36
  token.context['sub_process_id'] = instance.id
38
-
39
37
  :pass
40
38
  end
41
39
  rescue ActiveRecord::RecordNotFound
@@ -1,3 +1,3 @@
1
1
  module Kuroko2
2
- VERSION = '0.2.3'
2
+ VERSION = '0.3.0'
3
3
  end
@@ -39,13 +39,62 @@ describe Kuroko2::UsersController do
39
39
  it { expect(response).to redirect_to(users_path) }
40
40
  end
41
41
 
42
+ describe '#edit' do
43
+ let(:name) { 'Test Users' }
44
+ let(:email) { 'test@example.com' }
45
+
46
+ let(:provider) { Kuroko2::User::GROUP_PROVIDER }
47
+ let(:user) do
48
+ create(
49
+ :user,
50
+ name: 'name',
51
+ email: 'initial@example.com',
52
+ provider: provider,
53
+ )
54
+ end
55
+
56
+ before { put(:update, params: { id: user.id, user: { name: name, email: email } }) }
57
+
58
+ it 'edits the name/email' do
59
+ user = assigns(:user).reload
60
+ expect(user.name).to eq(name)
61
+ expect(user.email).to eq(email)
62
+ expect(response).to redirect_to(user_path(user))
63
+ end
64
+
65
+ context 'if user is google account' do
66
+ let(:provider) { Kuroko2::User::GOOGLE_OAUTH2_PROVIDER }
67
+
68
+ it 'returns bad request' do
69
+ expect(response).to have_http_status(:bad_request)
70
+ end
71
+ end
72
+ end
73
+
42
74
  describe '#destroy' do
43
- let(:user) { users.last }
44
- subject! { delete(:destroy, params: { id: user.id }) }
75
+ let(:provider) { Kuroko2::User::GROUP_PROVIDER }
76
+ let(:user) do
77
+ create(
78
+ :user,
79
+ name: 'name',
80
+ email: 'initial@example.com',
81
+ provider: provider,
82
+ )
83
+ end
84
+
85
+ before { delete(:destroy, params: { id: user.id }) }
45
86
 
46
87
  it do
47
88
  expect(response).to redirect_to(users_path)
48
89
  expect(Kuroko2::User.exists?(user.id)).to be_falsey
49
90
  end
91
+
92
+ context 'if user is google account' do
93
+ let(:provider) { Kuroko2::User::GOOGLE_OAUTH2_PROVIDER }
94
+
95
+ it 'returns bad request' do
96
+ expect(response).to have_http_status(:bad_request)
97
+ end
98
+ end
50
99
  end
51
100
  end
@@ -14,6 +14,8 @@ default: &default
14
14
  webhook_url: 'https://localhost/test/slack'
15
15
  hipchat:
16
16
  api_token: 'token'
17
+ webhook:
18
+ secret_token: 'secret_token'
17
19
  api_basic_authentication_applications:
18
20
  test_client_name: 'secret_key'
19
21
  app_authentication:
@@ -1,4 +1,3 @@
1
- # encoding: UTF-8
2
1
  # This file is auto-generated from the current state of the database. Instead
3
2
  # of editing this file, please use the migrations feature of Active Record to
4
3
  # incrementally modify your database, and then regenerate this schema definition.
@@ -11,27 +10,26 @@
11
10
  #
12
11
  # It's strongly recommended that you check this file into your version control system.
13
12
 
14
- ActiveRecord::Schema.define(version: 25) do
13
+ ActiveRecord::Schema.define(version: 26) do
15
14
 
16
- create_table "admin_assignments", force: :cascade do |t|
17
- t.integer "user_id", limit: 4, null: false
18
- t.integer "job_definition_id", limit: 4, null: false
15
+ create_table "admin_assignments", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4" do |t|
16
+ t.integer "user_id", null: false
17
+ t.integer "job_definition_id", null: false
19
18
  t.datetime "created_at"
20
19
  t.datetime "updated_at"
20
+ t.index ["user_id", "job_definition_id"], name: "user_id", unique: true, using: :btree
21
21
  end
22
22
 
23
- add_index "admin_assignments", ["user_id", "job_definition_id"], name: "user_id", unique: true, using: :btree
24
-
25
- create_table "executions", force: :cascade do |t|
23
+ create_table "executions", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4" do |t|
26
24
  t.string "uuid", limit: 36, null: false
27
- t.integer "job_definition_id", limit: 4
28
- t.integer "job_definition_version", limit: 4
29
- t.integer "job_instance_id", limit: 4
30
- t.integer "token_id", limit: 4
25
+ t.integer "job_definition_id"
26
+ t.integer "job_definition_version"
27
+ t.integer "job_instance_id"
28
+ t.integer "token_id"
31
29
  t.string "queue", limit: 180, default: "@default", null: false
32
30
  t.text "shell", limit: 65535, null: false
33
31
  t.text "context", limit: 65535, null: false
34
- t.integer "pid", limit: 4
32
+ t.integer "pid"
35
33
  t.text "output", limit: 4294967295
36
34
  t.integer "exit_status", limit: 1
37
35
  t.integer "term_signal", limit: 1
@@ -40,28 +38,26 @@ ActiveRecord::Schema.define(version: 25) do
40
38
  t.datetime "mailed_at"
41
39
  t.datetime "created_at"
42
40
  t.datetime "updated_at"
41
+ t.index ["job_definition_id", "token_id"], name: "index_kuroko2_executions_on_job_definition_id_and_token_id", unique: true, using: :btree
42
+ t.index ["started_at"], name: "started_at", using: :btree
43
43
  end
44
44
 
45
- add_index "executions", ["job_definition_id", "token_id"], name: "job_definition_id", unique: true, using: :btree
46
- add_index "executions", ["started_at"], name: "started_at", using: :btree
47
-
48
- create_table "job_definition_tags", force: :cascade do |t|
49
- t.integer "job_definition_id", limit: 4, null: false
50
- t.integer "tag_id", limit: 4, null: false
51
- t.datetime "created_at", null: false
52
- t.datetime "updated_at", null: false
45
+ create_table "job_definition_tags", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4" do |t|
46
+ t.integer "job_definition_id", null: false
47
+ t.integer "tag_id", null: false
48
+ t.datetime "created_at", null: false
49
+ t.datetime "updated_at", null: false
50
+ t.index ["job_definition_id", "tag_id"], name: "kuroko2_definition_tag_idx", unique: true, using: :btree
51
+ t.index ["tag_id"], name: "job_definition_tags_tag_id", using: :btree
53
52
  end
54
53
 
55
- add_index "job_definition_tags", ["job_definition_id", "tag_id"], name: "job_definition_id", unique: true, using: :btree
56
- add_index "job_definition_tags", ["tag_id"], name: "job_definition_tags_tag_id", using: :btree
57
-
58
- create_table "job_definitions", force: :cascade do |t|
59
- t.integer "version", limit: 4, default: 0, null: false
54
+ create_table "job_definitions", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4" do |t|
55
+ t.integer "version", default: 0, null: false
60
56
  t.string "name", limit: 180, null: false
61
57
  t.text "description", limit: 65535, null: false
62
58
  t.text "script", limit: 65535, null: false
63
59
  t.boolean "suspended", default: false, null: false
64
- t.integer "prevent_multi", limit: 4, default: 1, null: false
60
+ t.integer "prevent_multi", default: 1, null: false
65
61
  t.boolean "notify_cancellation", default: true, null: false
66
62
  t.string "hipchat_room", limit: 180, default: "", null: false
67
63
  t.boolean "hipchat_notify_finished", default: true, null: false
@@ -70,122 +66,112 @@ ActiveRecord::Schema.define(version: 25) do
70
66
  t.boolean "api_allowed", default: false, null: false
71
67
  t.datetime "created_at"
72
68
  t.datetime "updated_at"
69
+ t.text "webhook_url", limit: 65535
70
+ t.index ["name"], name: "name", using: :btree
73
71
  end
74
72
 
75
- add_index "job_definitions", ["name"], name: "name", using: :btree
76
-
77
- create_table "job_instances", force: :cascade do |t|
78
- t.integer "job_definition_id", limit: 4
79
- t.integer "job_definition_version", limit: 4
73
+ create_table "job_instances", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4" do |t|
74
+ t.integer "job_definition_id"
75
+ t.integer "job_definition_version"
80
76
  t.text "script", limit: 65535
81
77
  t.datetime "finished_at"
82
78
  t.datetime "canceled_at"
83
79
  t.datetime "error_at"
84
80
  t.datetime "created_at"
85
81
  t.datetime "updated_at"
82
+ t.index ["finished_at", "canceled_at", "job_definition_id"], name: "job_instance_idx", using: :btree
83
+ t.index ["job_definition_id"], name: "index_kuroko2_job_instances_on_job_definition_id", using: :btree
86
84
  end
87
85
 
88
- add_index "job_instances", ["finished_at", "canceled_at", "job_definition_id"], name: "finished_at", using: :btree
89
- add_index "job_instances", ["job_definition_id"], name: "job_definition_id", using: :btree
90
-
91
- create_table "job_schedules", force: :cascade do |t|
92
- t.integer "job_definition_id", limit: 4
86
+ create_table "job_schedules", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4" do |t|
87
+ t.integer "job_definition_id"
93
88
  t.string "cron", limit: 180
94
89
  t.datetime "created_at"
95
90
  t.datetime "updated_at"
91
+ t.index ["job_definition_id", "cron"], name: "kuroko2_schedules_definition_id_cron_idx", unique: true, using: :btree
96
92
  end
97
93
 
98
- add_index "job_schedules", ["job_definition_id", "cron"], name: "job_definition_id", unique: true, using: :btree
99
-
100
- create_table "job_suspend_schedules", force: :cascade do |t|
101
- t.integer "job_definition_id", limit: 4
94
+ create_table "job_suspend_schedules", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4" do |t|
95
+ t.integer "job_definition_id"
102
96
  t.string "cron", limit: 180
103
97
  t.datetime "created_at", null: false
104
98
  t.datetime "updated_at", null: false
99
+ t.index ["job_definition_id", "cron"], name: "kuroko2_suspend_schedules_definition_id_cron_idx", unique: true, using: :btree
105
100
  end
106
101
 
107
- add_index "job_suspend_schedules", ["job_definition_id", "cron"], name: "job_definition_id", unique: true, using: :btree
108
-
109
- create_table "logs", force: :cascade do |t|
110
- t.integer "job_instance_id", limit: 4
102
+ create_table "logs", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4" do |t|
103
+ t.integer "job_instance_id"
111
104
  t.string "level", limit: 10
112
105
  t.text "message", limit: 4294967295
113
106
  t.datetime "created_at"
114
107
  t.datetime "updated_at"
108
+ t.index ["job_instance_id"], name: "job_instance_id", using: :btree
115
109
  end
116
110
 
117
- add_index "logs", ["job_instance_id"], name: "job_instance_id", using: :btree
118
-
119
- create_table "memory_consumption_logs", force: :cascade do |t|
120
- t.integer "job_instance_id", limit: 4
121
- t.integer "value", limit: 4, null: false
122
- t.datetime "created_at", null: false
123
- t.datetime "updated_at", null: false
111
+ create_table "memory_consumption_logs", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4" do |t|
112
+ t.integer "job_instance_id"
113
+ t.integer "value", null: false
114
+ t.datetime "created_at", null: false
115
+ t.datetime "updated_at", null: false
116
+ t.index ["job_instance_id"], name: "index_kuroko2_memory_consumption_logs_on_job_instance_id", using: :btree
124
117
  end
125
118
 
126
- add_index "memory_consumption_logs", ["job_instance_id"], name: "index_memory_consumption_logs_on_job_instance_id", using: :btree
127
-
128
- create_table "memory_expectancies", force: :cascade do |t|
129
- t.integer "expected_value", limit: 4, default: 0, null: false
130
- t.integer "job_definition_id", limit: 4
131
- t.datetime "created_at", null: false
132
- t.datetime "updated_at", null: false
119
+ create_table "memory_expectancies", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4" do |t|
120
+ t.integer "expected_value", default: 0, null: false
121
+ t.integer "job_definition_id"
122
+ t.datetime "created_at", null: false
123
+ t.datetime "updated_at", null: false
124
+ t.index ["job_definition_id"], name: "index_kuroko2_memory_expectancies_on_job_definition_id", using: :btree
133
125
  end
134
126
 
135
- add_index "memory_expectancies", ["job_definition_id"], name: "index_memory_expectancies_on_job_definition_id", using: :btree
136
-
137
- create_table "process_signals", force: :cascade do |t|
127
+ create_table "process_signals", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4" do |t|
138
128
  t.string "hostname", limit: 180, default: "", null: false
139
- t.integer "pid", limit: 4, null: false
129
+ t.integer "pid", null: false
140
130
  t.integer "number", limit: 1, default: 15, null: false
141
131
  t.datetime "started_at"
142
132
  t.datetime "created_at"
143
133
  t.datetime "updated_at"
144
134
  t.text "message", limit: 65535
135
+ t.index ["hostname", "started_at"], name: "hostname_started_at", using: :btree
145
136
  end
146
137
 
147
- add_index "process_signals", ["hostname", "started_at"], name: "hostname_started_at", using: :btree
148
-
149
- create_table "stars", force: :cascade do |t|
150
- t.integer "user_id", limit: 4, null: false
151
- t.integer "job_definition_id", limit: 4, null: false
138
+ create_table "stars", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4" do |t|
139
+ t.integer "user_id", null: false
140
+ t.integer "job_definition_id", null: false
152
141
  t.datetime "created_at"
153
142
  t.datetime "updated_at"
143
+ t.index ["user_id", "job_definition_id"], name: "index_kuroko2_stars_on_user_id_and_job_definition_id", unique: true, using: :btree
154
144
  end
155
145
 
156
- add_index "stars", ["user_id", "job_definition_id"], name: "user_id", unique: true, using: :btree
157
-
158
- create_table "tags", force: :cascade do |t|
146
+ create_table "tags", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4" do |t|
159
147
  t.string "name", limit: 100, null: false
160
148
  t.datetime "created_at", null: false
161
149
  t.datetime "updated_at", null: false
150
+ t.index ["name"], name: "index_kuroko2_tags_on_name", unique: true, using: :btree
162
151
  end
163
152
 
164
- add_index "tags", ["name"], name: "name", unique: true, using: :btree
165
-
166
- create_table "ticks", force: :cascade do |t|
153
+ create_table "ticks", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4" do |t|
167
154
  t.datetime "at"
168
155
  end
169
156
 
170
- create_table "tokens", force: :cascade do |t|
157
+ create_table "tokens", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4" do |t|
171
158
  t.string "uuid", limit: 36, null: false
172
- t.integer "job_definition_id", limit: 4
173
- t.integer "job_definition_version", limit: 4
174
- t.integer "job_instance_id", limit: 4
175
- t.integer "parent_id", limit: 4
159
+ t.integer "job_definition_id"
160
+ t.integer "job_definition_version"
161
+ t.integer "job_instance_id"
162
+ t.integer "parent_id"
176
163
  t.text "script", limit: 65535, null: false
177
164
  t.string "path", limit: 180, default: "/", null: false
178
- t.integer "status", limit: 4, default: 0, null: false
165
+ t.integer "status", default: 0, null: false
179
166
  t.text "message", limit: 65535, null: false
180
167
  t.text "context", limit: 65535, null: false
181
168
  t.datetime "created_at"
182
169
  t.datetime "updated_at"
170
+ t.index ["parent_id"], name: "parent_id", using: :btree
171
+ t.index ["status"], name: "status", using: :btree
183
172
  end
184
173
 
185
- add_index "tokens", ["parent_id"], name: "parent_id", using: :btree
186
- add_index "tokens", ["status"], name: "status", using: :btree
187
-
188
- create_table "users", force: :cascade do |t|
174
+ create_table "users", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4" do |t|
189
175
  t.string "provider", limit: 180, default: "google_oauth2", null: false
190
176
  t.string "uid", limit: 180, null: false
191
177
  t.string "name", limit: 180, default: "", null: false
@@ -196,22 +182,20 @@ ActiveRecord::Schema.define(version: 25) do
196
182
  t.datetime "suspended_at"
197
183
  t.datetime "created_at"
198
184
  t.datetime "updated_at"
185
+ t.index ["email"], name: "email", unique: true, using: :btree
186
+ t.index ["uid", "suspended_at"], name: "uid_2", using: :btree
187
+ t.index ["uid"], name: "uid", unique: true, using: :btree
199
188
  end
200
189
 
201
- add_index "users", ["email"], name: "email", unique: true, using: :btree
202
- add_index "users", ["uid", "suspended_at"], name: "uid_2", using: :btree
203
- add_index "users", ["uid"], name: "uid", unique: true, using: :btree
204
-
205
- create_table "workers", force: :cascade do |t|
190
+ create_table "workers", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4" do |t|
206
191
  t.string "hostname", limit: 180, null: false
207
192
  t.integer "worker_id", limit: 1, null: false
208
193
  t.string "queue", limit: 180, default: "@default", null: false
209
194
  t.boolean "working", default: false, null: false
210
- t.integer "execution_id", limit: 4
195
+ t.integer "execution_id"
211
196
  t.datetime "created_at"
212
197
  t.datetime "updated_at"
198
+ t.index ["hostname", "worker_id"], name: "hostname", unique: true, using: :btree
213
199
  end
214
200
 
215
- add_index "workers", ["hostname", "worker_id"], name: "hostname", unique: true, using: :btree
216
-
217
201
  end
@@ -679,4 +679,1147 @@ FROM information_schema.key_column_usage fk
679
679
  WHERE fk.referenced_column_name is not null
680
680
  AND fk.table_schema = 'kuroko2_dummy_development'
681
681
  AND fk.table_name = 'kuroko2_workers'
682
+ 
683
+  (0.3ms) SELECT DATABASE() as db
684
+  (0.3ms) SELECT GET_LOCK('4015707761482352670', 0);
685
+ ActiveRecord::SchemaMigration Load (15.0ms) SELECT `kuroko2_schema_migrations`.* FROM `kuroko2_schema_migrations`
686
+ Migrating to AddWebhookUrlToJobDefinitions (26)
687
+ DEPRECATION WARNING: Directly inheriting from ActiveRecord::Migration is deprecated. Please specify the Rails release the migration was written for:
688
+
689
+ class AddWebhookUrlToJobDefinitions < ActiveRecord::Migration[4.2] (called from require at bin/rails:13)
690
+  (44.4ms) ALTER TABLE `kuroko2_job_definitions` ADD `webhook_url` text
691
+  (0.2ms) BEGIN
692
+ SQL (0.3ms) INSERT INTO `kuroko2_schema_migrations` (`version`) VALUES ('26')
693
+  (0.4ms) COMMIT
694
+ ActiveRecord::InternalMetadata Load (0.3ms) SELECT `kuroko2_ar_internal_metadata`.* FROM `kuroko2_ar_internal_metadata` WHERE `kuroko2_ar_internal_metadata`.`key` = 'environment' LIMIT 1
695
+  (0.2ms) BEGIN
696
+  (0.2ms) COMMIT
697
+  (0.2ms) SELECT RELEASE_LOCK('4015707761482352670')
698
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT `kuroko2_schema_migrations`.* FROM `kuroko2_schema_migrations`
699
+  (0.3ms) SHOW CREATE TABLE `kuroko2_admin_assignments`
700
+  (0.2ms) SHOW CREATE TABLE `kuroko2_executions`
701
+  (0.5ms) SHOW TABLE STATUS LIKE 'kuroko2_executions'
702
+  (0.2ms) SHOW CREATE TABLE `kuroko2_job_definition_tags`
703
+  (0.3ms) SHOW CREATE TABLE `kuroko2_job_definitions`
704
+  (0.4ms) SHOW TABLE STATUS LIKE 'kuroko2_job_definitions'
705
+  (0.2ms) SHOW CREATE TABLE `kuroko2_job_instances`
706
+  (0.5ms) SHOW TABLE STATUS LIKE 'kuroko2_job_instances'
707
+  (0.2ms) SHOW CREATE TABLE `kuroko2_job_schedules`
708
+  (0.5ms) SHOW TABLE STATUS LIKE 'kuroko2_job_schedules'
709
+  (0.2ms) SHOW CREATE TABLE `kuroko2_job_suspend_schedules`
710
+  (1.8ms) SHOW TABLE STATUS LIKE 'kuroko2_job_suspend_schedules'
711
+  (0.2ms) SHOW CREATE TABLE `kuroko2_logs`
712
+  (0.5ms) SHOW TABLE STATUS LIKE 'kuroko2_logs'
713
+  (0.2ms) SHOW CREATE TABLE `kuroko2_memory_consumption_logs`
714
+  (0.3ms) SHOW CREATE TABLE `kuroko2_memory_expectancies`
715
+  (0.2ms) SHOW CREATE TABLE `kuroko2_process_signals`
716
+  (1.7ms) SHOW TABLE STATUS LIKE 'kuroko2_process_signals'
717
+  (0.3ms) SHOW CREATE TABLE `kuroko2_stars`
718
+  (0.3ms) SHOW CREATE TABLE `kuroko2_tags`
719
+  (1.6ms) SHOW TABLE STATUS LIKE 'kuroko2_tags'
720
+  (0.2ms) SHOW CREATE TABLE `kuroko2_ticks`
721
+  (0.2ms) SHOW CREATE TABLE `kuroko2_tokens`
722
+  (0.5ms) SHOW TABLE STATUS LIKE 'kuroko2_tokens'
723
+  (0.2ms) SHOW CREATE TABLE `kuroko2_users`
724
+  (1.7ms) SHOW TABLE STATUS LIKE 'kuroko2_users'
725
+  (0.4ms) SHOW CREATE TABLE `kuroko2_workers`
726
+  (0.5ms) SHOW TABLE STATUS LIKE 'kuroko2_workers'
727
+  (0.4ms) SELECT fk.referenced_table_name as 'to_table'
728
+ ,fk.referenced_column_name as 'primary_key'
729
+ ,fk.column_name as 'column'
730
+ ,fk.constraint_name as 'name'
731
+ FROM information_schema.key_column_usage fk
732
+ WHERE fk.referenced_column_name is not null
733
+ AND fk.table_schema = 'kuroko2_dummy_development'
734
+ AND fk.table_name = 'kuroko2_admin_assignments'
735
+ 
736
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
737
+ ,fk.referenced_column_name as 'primary_key'
738
+ ,fk.column_name as 'column'
739
+ ,fk.constraint_name as 'name'
740
+ FROM information_schema.key_column_usage fk
741
+ WHERE fk.referenced_column_name is not null
742
+ AND fk.table_schema = 'kuroko2_dummy_development'
743
+ AND fk.table_name = 'kuroko2_executions'
744
+ 
745
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
746
+ ,fk.referenced_column_name as 'primary_key'
747
+ ,fk.column_name as 'column'
748
+ ,fk.constraint_name as 'name'
749
+ FROM information_schema.key_column_usage fk
750
+ WHERE fk.referenced_column_name is not null
751
+ AND fk.table_schema = 'kuroko2_dummy_development'
752
+ AND fk.table_name = 'kuroko2_job_definition_tags'
753
+ 
754
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
755
+ ,fk.referenced_column_name as 'primary_key'
756
+ ,fk.column_name as 'column'
757
+ ,fk.constraint_name as 'name'
758
+ FROM information_schema.key_column_usage fk
759
+ WHERE fk.referenced_column_name is not null
760
+ AND fk.table_schema = 'kuroko2_dummy_development'
761
+ AND fk.table_name = 'kuroko2_job_definitions'
762
+ 
763
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
764
+ ,fk.referenced_column_name as 'primary_key'
765
+ ,fk.column_name as 'column'
766
+ ,fk.constraint_name as 'name'
767
+ FROM information_schema.key_column_usage fk
768
+ WHERE fk.referenced_column_name is not null
769
+ AND fk.table_schema = 'kuroko2_dummy_development'
770
+ AND fk.table_name = 'kuroko2_job_instances'
771
+ 
772
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
773
+ ,fk.referenced_column_name as 'primary_key'
774
+ ,fk.column_name as 'column'
775
+ ,fk.constraint_name as 'name'
776
+ FROM information_schema.key_column_usage fk
777
+ WHERE fk.referenced_column_name is not null
778
+ AND fk.table_schema = 'kuroko2_dummy_development'
779
+ AND fk.table_name = 'kuroko2_job_schedules'
780
+ 
781
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
782
+ ,fk.referenced_column_name as 'primary_key'
783
+ ,fk.column_name as 'column'
784
+ ,fk.constraint_name as 'name'
785
+ FROM information_schema.key_column_usage fk
786
+ WHERE fk.referenced_column_name is not null
787
+ AND fk.table_schema = 'kuroko2_dummy_development'
788
+ AND fk.table_name = 'kuroko2_job_suspend_schedules'
789
+ 
790
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
791
+ ,fk.referenced_column_name as 'primary_key'
792
+ ,fk.column_name as 'column'
793
+ ,fk.constraint_name as 'name'
794
+ FROM information_schema.key_column_usage fk
795
+ WHERE fk.referenced_column_name is not null
796
+ AND fk.table_schema = 'kuroko2_dummy_development'
797
+ AND fk.table_name = 'kuroko2_logs'
798
+ 
799
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
800
+ ,fk.referenced_column_name as 'primary_key'
801
+ ,fk.column_name as 'column'
802
+ ,fk.constraint_name as 'name'
803
+ FROM information_schema.key_column_usage fk
804
+ WHERE fk.referenced_column_name is not null
805
+ AND fk.table_schema = 'kuroko2_dummy_development'
806
+ AND fk.table_name = 'kuroko2_memory_consumption_logs'
807
+ 
808
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
809
+ ,fk.referenced_column_name as 'primary_key'
810
+ ,fk.column_name as 'column'
811
+ ,fk.constraint_name as 'name'
812
+ FROM information_schema.key_column_usage fk
813
+ WHERE fk.referenced_column_name is not null
814
+ AND fk.table_schema = 'kuroko2_dummy_development'
815
+ AND fk.table_name = 'kuroko2_memory_expectancies'
816
+ 
817
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
818
+ ,fk.referenced_column_name as 'primary_key'
819
+ ,fk.column_name as 'column'
820
+ ,fk.constraint_name as 'name'
821
+ FROM information_schema.key_column_usage fk
822
+ WHERE fk.referenced_column_name is not null
823
+ AND fk.table_schema = 'kuroko2_dummy_development'
824
+ AND fk.table_name = 'kuroko2_process_signals'
825
+ 
826
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
827
+ ,fk.referenced_column_name as 'primary_key'
828
+ ,fk.column_name as 'column'
829
+ ,fk.constraint_name as 'name'
830
+ FROM information_schema.key_column_usage fk
831
+ WHERE fk.referenced_column_name is not null
832
+ AND fk.table_schema = 'kuroko2_dummy_development'
833
+ AND fk.table_name = 'kuroko2_stars'
834
+ 
835
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
836
+ ,fk.referenced_column_name as 'primary_key'
837
+ ,fk.column_name as 'column'
838
+ ,fk.constraint_name as 'name'
839
+ FROM information_schema.key_column_usage fk
840
+ WHERE fk.referenced_column_name is not null
841
+ AND fk.table_schema = 'kuroko2_dummy_development'
842
+ AND fk.table_name = 'kuroko2_tags'
843
+ 
844
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
845
+ ,fk.referenced_column_name as 'primary_key'
846
+ ,fk.column_name as 'column'
847
+ ,fk.constraint_name as 'name'
848
+ FROM information_schema.key_column_usage fk
849
+ WHERE fk.referenced_column_name is not null
850
+ AND fk.table_schema = 'kuroko2_dummy_development'
851
+ AND fk.table_name = 'kuroko2_ticks'
852
+ 
853
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
854
+ ,fk.referenced_column_name as 'primary_key'
855
+ ,fk.column_name as 'column'
856
+ ,fk.constraint_name as 'name'
857
+ FROM information_schema.key_column_usage fk
858
+ WHERE fk.referenced_column_name is not null
859
+ AND fk.table_schema = 'kuroko2_dummy_development'
860
+ AND fk.table_name = 'kuroko2_tokens'
861
+ 
862
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
863
+ ,fk.referenced_column_name as 'primary_key'
864
+ ,fk.column_name as 'column'
865
+ ,fk.constraint_name as 'name'
866
+ FROM information_schema.key_column_usage fk
867
+ WHERE fk.referenced_column_name is not null
868
+ AND fk.table_schema = 'kuroko2_dummy_development'
869
+ AND fk.table_name = 'kuroko2_users'
870
+ 
871
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
872
+ ,fk.referenced_column_name as 'primary_key'
873
+ ,fk.column_name as 'column'
874
+ ,fk.constraint_name as 'name'
875
+ FROM information_schema.key_column_usage fk
876
+ WHERE fk.referenced_column_name is not null
877
+ AND fk.table_schema = 'kuroko2_dummy_development'
878
+ AND fk.table_name = 'kuroko2_workers'
879
+ 
880
+  (13.3ms) CREATE TABLE `kuroko2_schema_migrations` (`version` varchar(255) COLLATE utf8_general_ci PRIMARY KEY) ENGINE=InnoDB
881
+  (26.0ms) CREATE TABLE `kuroko2_ar_internal_metadata` (`key` varchar(255) COLLATE utf8_general_ci PRIMARY KEY, `value` varchar(255), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
882
+  (1.6ms) SELECT DATABASE() as db
883
+  (0.3ms) SELECT GET_LOCK('4015707761482352670', 0);
884
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT `kuroko2_schema_migrations`.* FROM `kuroko2_schema_migrations`
885
+ Migrating to CreateJobDefinitions (1)
886
+ DEPRECATION WARNING: Directly inheriting from ActiveRecord::Migration is deprecated. Please specify the Rails release the migration was written for:
887
+
888
+ class CreateJobDefinitions < ActiveRecord::Migration[4.2] (called from load at /Users/eisuke-oishi/.rbenv/versions/2.3/bin/rake:23)
889
+  (37.0ms) CREATE TABLE `kuroko2_job_definitions` (`id` int AUTO_INCREMENT PRIMARY KEY, `version` int DEFAULT 0 NOT NULL, `name` varchar(180) NOT NULL, `description` text NOT NULL, `script` text NOT NULL, `suspended` tinyint(1) DEFAULT 0 NOT NULL, `prevent_multi` int DEFAULT 1 NOT NULL, `notify_cancellation` tinyint(1) DEFAULT 1 NOT NULL, `hipchat_room` varchar(180) DEFAULT '' NOT NULL, `hipchat_notify_finished` tinyint(1) DEFAULT 1 NOT NULL, `hipchat_additional_text` varchar(180), `slack_channel` varchar(180) DEFAULT '' NOT NULL, `api_allowed` tinyint(1) DEFAULT 0 NOT NULL, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
890
+  (23.9ms) CREATE INDEX `name` USING btree ON `kuroko2_job_definitions` (`name`) 
891
+  (0.2ms) BEGIN
892
+ SQL (0.3ms) INSERT INTO `kuroko2_schema_migrations` (`version`) VALUES ('1')
893
+  (0.4ms) COMMIT
894
+ Migrating to CreateJobInstances (2)
895
+ DEPRECATION WARNING: Directly inheriting from ActiveRecord::Migration is deprecated. Please specify the Rails release the migration was written for:
896
+
897
+ class CreateJobInstances < ActiveRecord::Migration[4.2] (called from load at /Users/eisuke-oishi/.rbenv/versions/2.3/bin/rake:23)
898
+  (40.3ms) CREATE TABLE `kuroko2_job_instances` (`id` int AUTO_INCREMENT PRIMARY KEY, `job_definition_id` int, `job_definition_version` int, `script` text, `finished_at` datetime, `canceled_at` datetime, `error_at` datetime, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
899
+  (12.9ms) CREATE INDEX `job_instance_idx` USING btree ON `kuroko2_job_instances` (`finished_at`, `canceled_at`, `job_definition_id`) 
900
+  (29.6ms) CREATE INDEX `index_kuroko2_job_instances_on_job_definition_id` USING btree ON `kuroko2_job_instances` (`job_definition_id`) 
901
+  (0.2ms) BEGIN
902
+ SQL (0.3ms) INSERT INTO `kuroko2_schema_migrations` (`version`) VALUES ('2')
903
+  (0.5ms) COMMIT
904
+ Migrating to CreateJobSchedules (3)
905
+ DEPRECATION WARNING: Directly inheriting from ActiveRecord::Migration is deprecated. Please specify the Rails release the migration was written for:
906
+
907
+ class CreateJobSchedules < ActiveRecord::Migration[4.2] (called from load at /Users/eisuke-oishi/.rbenv/versions/2.3/bin/rake:23)
908
+  (48.5ms) CREATE TABLE `kuroko2_job_schedules` (`id` int AUTO_INCREMENT PRIMARY KEY, `job_definition_id` int, `cron` varchar(180), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
909
+  (11.6ms) CREATE UNIQUE INDEX `kuroko2_schedules_definition_id_cron_idx` USING btree ON `kuroko2_job_schedules` (`job_definition_id`, `cron`) 
910
+  (0.2ms) BEGIN
911
+ SQL (0.3ms) INSERT INTO `kuroko2_schema_migrations` (`version`) VALUES ('3')
912
+  (0.4ms) COMMIT
913
+ Migrating to CreateTicks (4)
914
+ DEPRECATION WARNING: Directly inheriting from ActiveRecord::Migration is deprecated. Please specify the Rails release the migration was written for:
915
+
916
+ class CreateTicks < ActiveRecord::Migration[4.2] (called from load at /Users/eisuke-oishi/.rbenv/versions/2.3/bin/rake:23)
917
+  (31.0ms) CREATE TABLE `kuroko2_ticks` (`id` int AUTO_INCREMENT PRIMARY KEY, `at` datetime) ENGINE=InnoDB
918
+  (0.2ms) BEGIN
919
+ SQL (0.3ms) INSERT INTO `kuroko2_schema_migrations` (`version`) VALUES ('4')
920
+  (0.4ms) COMMIT
921
+ Migrating to CreateLogs (5)
922
+ DEPRECATION WARNING: Directly inheriting from ActiveRecord::Migration is deprecated. Please specify the Rails release the migration was written for:
923
+
924
+ class CreateLogs < ActiveRecord::Migration[4.2] (called from load at /Users/eisuke-oishi/.rbenv/versions/2.3/bin/rake:23)
925
+  (28.4ms) CREATE TABLE `kuroko2_logs` (`id` int AUTO_INCREMENT PRIMARY KEY, `job_instance_id` int, `level` varchar(10), `message` longtext, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
926
+  (10.3ms) CREATE INDEX `job_instance_id` USING btree ON `kuroko2_logs` (`job_instance_id`) 
927
+  (0.1ms) BEGIN
928
+ SQL (0.3ms) INSERT INTO `kuroko2_schema_migrations` (`version`) VALUES ('5')
929
+  (0.3ms) COMMIT
930
+ Migrating to CreateTokens (6)
931
+ DEPRECATION WARNING: Directly inheriting from ActiveRecord::Migration is deprecated. Please specify the Rails release the migration was written for:
932
+
933
+ class CreateTokens < ActiveRecord::Migration[4.2] (called from load at /Users/eisuke-oishi/.rbenv/versions/2.3/bin/rake:23)
934
+  (27.3ms) CREATE TABLE `kuroko2_tokens` (`id` int AUTO_INCREMENT PRIMARY KEY, `uuid` varchar(36) NOT NULL, `job_definition_id` int, `job_definition_version` int, `job_instance_id` int, `parent_id` int, `script` text NOT NULL, `path` varchar(180) DEFAULT '/' NOT NULL, `status` int DEFAULT 0 NOT NULL, `message` text NOT NULL, `context` text NOT NULL, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
935
+  (14.6ms) CREATE INDEX `parent_id` USING btree ON `kuroko2_tokens` (`parent_id`) 
936
+  (11.7ms) CREATE INDEX `status` USING btree ON `kuroko2_tokens` (`status`) 
937
+  (0.2ms) BEGIN
938
+ SQL (0.2ms) INSERT INTO `kuroko2_schema_migrations` (`version`) VALUES ('6')
939
+  (0.3ms) COMMIT
940
+ Migrating to CreateExecutions (7)
941
+ DEPRECATION WARNING: Directly inheriting from ActiveRecord::Migration is deprecated. Please specify the Rails release the migration was written for:
942
+
943
+ class CreateExecutions < ActiveRecord::Migration[4.2] (called from load at /Users/eisuke-oishi/.rbenv/versions/2.3/bin/rake:23)
944
+  (43.1ms) CREATE TABLE `kuroko2_executions` (`id` int AUTO_INCREMENT PRIMARY KEY, `uuid` varchar(36) NOT NULL, `job_definition_id` int, `job_definition_version` int, `job_instance_id` int, `token_id` int, `queue` varchar(180) DEFAULT '@default' NOT NULL, `shell` text NOT NULL, `context` text NOT NULL, `pid` int, `output` longtext, `exit_status` tinyint, `term_signal` tinyint, `started_at` datetime, `finished_at` datetime, `mailed_at` datetime, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
945
+  (11.1ms) CREATE UNIQUE INDEX `index_kuroko2_executions_on_job_definition_id_and_token_id` USING btree ON `kuroko2_executions` (`job_definition_id`, `token_id`) 
946
+  (36.9ms) CREATE INDEX `started_at` USING btree ON `kuroko2_executions` (`started_at`) 
947
+  (0.3ms) BEGIN
948
+ SQL (0.4ms) INSERT INTO `kuroko2_schema_migrations` (`version`) VALUES ('7')
949
+  (0.4ms) COMMIT
950
+ Migrating to CreateProcessSignals (8)
951
+ DEPRECATION WARNING: Directly inheriting from ActiveRecord::Migration is deprecated. Please specify the Rails release the migration was written for:
952
+
953
+ class CreateProcessSignals < ActiveRecord::Migration[4.2] (called from load at /Users/eisuke-oishi/.rbenv/versions/2.3/bin/rake:23)
954
+  (46.4ms) CREATE TABLE `kuroko2_process_signals` (`id` int AUTO_INCREMENT PRIMARY KEY, `hostname` varchar(180) DEFAULT '' NOT NULL, `pid` int NOT NULL, `number` tinyint DEFAULT 15 NOT NULL, `started_at` datetime, `created_at` datetime, `updated_at` datetime, `message` text) ENGINE=InnoDB
955
+  (13.7ms) CREATE INDEX `hostname_started_at` USING btree ON `kuroko2_process_signals` (`hostname`, `started_at`) 
956
+  (0.2ms) BEGIN
957
+ SQL (0.2ms) INSERT INTO `kuroko2_schema_migrations` (`version`) VALUES ('8')
958
+  (0.4ms) COMMIT
959
+ Migrating to CreateUsers (9)
960
+ DEPRECATION WARNING: Directly inheriting from ActiveRecord::Migration is deprecated. Please specify the Rails release the migration was written for:
961
+
962
+ class CreateUsers < ActiveRecord::Migration[4.2] (called from load at /Users/eisuke-oishi/.rbenv/versions/2.3/bin/rake:23)
963
+  (28.7ms) CREATE TABLE `kuroko2_users` (`id` int AUTO_INCREMENT PRIMARY KEY, `provider` varchar(180) DEFAULT 'google_oauth2' NOT NULL, `uid` varchar(180) NOT NULL, `name` varchar(180) DEFAULT '' NOT NULL, `email` varchar(180) NOT NULL, `first_name` varchar(180) DEFAULT '' NOT NULL, `last_name` varchar(180) DEFAULT '' NOT NULL, `image` varchar(180) DEFAULT '' NOT NULL, `suspended_at` datetime, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
964
+  (14.2ms) CREATE UNIQUE INDEX `email` USING btree ON `kuroko2_users` (`email`) 
965
+  (35.0ms) CREATE INDEX `uid_2` USING btree ON `kuroko2_users` (`uid`, `suspended_at`) 
966
+  (13.2ms) CREATE UNIQUE INDEX `uid` USING btree ON `kuroko2_users` (`uid`) 
967
+  (0.2ms) BEGIN
968
+ SQL (0.2ms) INSERT INTO `kuroko2_schema_migrations` (`version`) VALUES ('9')
969
+  (0.3ms) COMMIT
970
+ Migrating to CreateAdminAssignments (10)
971
+ DEPRECATION WARNING: Directly inheriting from ActiveRecord::Migration is deprecated. Please specify the Rails release the migration was written for:
972
+
973
+ class CreateAdminAssignments < ActiveRecord::Migration[4.2] (called from load at /Users/eisuke-oishi/.rbenv/versions/2.3/bin/rake:23)
974
+  (29.1ms) CREATE TABLE `kuroko2_admin_assignments` (`id` int AUTO_INCREMENT PRIMARY KEY, `user_id` int NOT NULL, `job_definition_id` int NOT NULL, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
975
+  (13.5ms) CREATE UNIQUE INDEX `user_id` USING btree ON `kuroko2_admin_assignments` (`user_id`, `job_definition_id`) 
976
+  (0.2ms) BEGIN
977
+ SQL (0.3ms) INSERT INTO `kuroko2_schema_migrations` (`version`) VALUES ('10')
978
+  (0.3ms) COMMIT
979
+ Migrating to CreateStars (11)
980
+ DEPRECATION WARNING: Directly inheriting from ActiveRecord::Migration is deprecated. Please specify the Rails release the migration was written for:
981
+
982
+ class CreateStars < ActiveRecord::Migration[4.2] (called from load at /Users/eisuke-oishi/.rbenv/versions/2.3/bin/rake:23)
983
+  (33.4ms) CREATE TABLE `kuroko2_stars` (`id` int AUTO_INCREMENT PRIMARY KEY, `user_id` int NOT NULL, `job_definition_id` int NOT NULL, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
984
+  (13.2ms) CREATE UNIQUE INDEX `index_kuroko2_stars_on_user_id_and_job_definition_id` USING btree ON `kuroko2_stars` (`user_id`, `job_definition_id`) 
985
+  (0.2ms) BEGIN
986
+ SQL (0.2ms) INSERT INTO `kuroko2_schema_migrations` (`version`) VALUES ('11')
987
+  (0.3ms) COMMIT
988
+ Migrating to CreateWorkers (12)
989
+ DEPRECATION WARNING: Directly inheriting from ActiveRecord::Migration is deprecated. Please specify the Rails release the migration was written for:
990
+
991
+ class CreateWorkers < ActiveRecord::Migration[4.2] (called from load at /Users/eisuke-oishi/.rbenv/versions/2.3/bin/rake:23)
992
+  (28.3ms) CREATE TABLE `kuroko2_workers` (`id` int AUTO_INCREMENT PRIMARY KEY, `hostname` varchar(180) NOT NULL, `worker_id` tinyint NOT NULL, `queue` varchar(180) DEFAULT '@default' NOT NULL, `working` tinyint(1) DEFAULT 0 NOT NULL, `execution_id` int, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
993
+  (15.4ms) CREATE UNIQUE INDEX `hostname` USING btree ON `kuroko2_workers` (`hostname`, `worker_id`) 
994
+  (0.2ms) BEGIN
995
+ SQL (0.2ms) INSERT INTO `kuroko2_schema_migrations` (`version`) VALUES ('12')
996
+  (0.4ms) COMMIT
997
+ Migrating to CreateJobDefinitionTags (18)
998
+ DEPRECATION WARNING: Directly inheriting from ActiveRecord::Migration is deprecated. Please specify the Rails release the migration was written for:
999
+
1000
+ class CreateJobDefinitionTags < ActiveRecord::Migration[4.2] (called from load at /Users/eisuke-oishi/.rbenv/versions/2.3/bin/rake:23)
1001
+  (35.9ms) CREATE TABLE `kuroko2_job_definition_tags` (`id` int AUTO_INCREMENT PRIMARY KEY, `job_definition_id` int NOT NULL, `tag_id` int NOT NULL, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
1002
+  (15.6ms) CREATE UNIQUE INDEX `kuroko2_definition_tag_idx` USING btree ON `kuroko2_job_definition_tags` (`job_definition_id`, `tag_id`) 
1003
+  (12.5ms) CREATE INDEX `job_definition_tags_tag_id` USING btree ON `kuroko2_job_definition_tags` (`tag_id`) 
1004
+  (0.3ms) BEGIN
1005
+ SQL (0.3ms) INSERT INTO `kuroko2_schema_migrations` (`version`) VALUES ('18')
1006
+  (0.3ms) COMMIT
1007
+ Migrating to CreateTags (19)
1008
+ DEPRECATION WARNING: Directly inheriting from ActiveRecord::Migration is deprecated. Please specify the Rails release the migration was written for:
1009
+
1010
+ class CreateTags < ActiveRecord::Migration[4.2] (called from load at /Users/eisuke-oishi/.rbenv/versions/2.3/bin/rake:23)
1011
+  (25.9ms) CREATE TABLE `kuroko2_tags` (`id` int AUTO_INCREMENT PRIMARY KEY, `name` varchar(100) NOT NULL, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
1012
+  (32.4ms) CREATE UNIQUE INDEX `index_kuroko2_tags_on_name` USING btree ON `kuroko2_tags` (`name`) 
1013
+  (0.2ms) BEGIN
1014
+ SQL (0.3ms) INSERT INTO `kuroko2_schema_migrations` (`version`) VALUES ('19')
1015
+  (0.5ms) COMMIT
1016
+ Migrating to CreateMemoryExpectancies (21)
1017
+ DEPRECATION WARNING: Directly inheriting from ActiveRecord::Migration is deprecated. Please specify the Rails release the migration was written for:
1018
+
1019
+ class CreateMemoryExpectancies < ActiveRecord::Migration[4.2] (called from load at /Users/eisuke-oishi/.rbenv/versions/2.3/bin/rake:23)
1020
+  (37.1ms) CREATE TABLE `kuroko2_memory_expectancies` (`id` int AUTO_INCREMENT PRIMARY KEY, `expected_value` int DEFAULT 0 NOT NULL, `job_definition_id` int, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, INDEX `index_kuroko2_memory_expectancies_on_job_definition_id` (`job_definition_id`)) ENGINE=InnoDB
1021
+  (7.6ms) CREATE TABLE `kuroko2_memory_consumption_logs` (`id` int AUTO_INCREMENT PRIMARY KEY, `job_instance_id` int, `value` int NOT NULL, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, INDEX `index_kuroko2_memory_consumption_logs_on_job_instance_id` (`job_instance_id`)) ENGINE=InnoDB
1022
+  (0.2ms) BEGIN
1023
+ SQL (0.2ms) INSERT INTO `kuroko2_schema_migrations` (`version`) VALUES ('21')
1024
+  (0.3ms) COMMIT
1025
+ Migrating to CreateJobSuspendSchedules (25)
1026
+ DEPRECATION WARNING: Directly inheriting from ActiveRecord::Migration is deprecated. Please specify the Rails release the migration was written for:
1027
+
1028
+ class CreateJobSuspendSchedules < ActiveRecord::Migration[4.2] (called from load at /Users/eisuke-oishi/.rbenv/versions/2.3/bin/rake:23)
1029
+  (29.1ms) CREATE TABLE `kuroko2_job_suspend_schedules` (`id` int AUTO_INCREMENT PRIMARY KEY, `job_definition_id` int, `cron` varchar(180), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
1030
+  (12.0ms) CREATE UNIQUE INDEX `kuroko2_suspend_schedules_definition_id_cron_idx` USING btree ON `kuroko2_job_suspend_schedules` (`job_definition_id`, `cron`) 
1031
+  (0.2ms) BEGIN
1032
+ SQL (0.2ms) INSERT INTO `kuroko2_schema_migrations` (`version`) VALUES ('25')
1033
+  (0.3ms) COMMIT
1034
+ Migrating to AddWebhookUrlToJobDefinitions (26)
1035
+ DEPRECATION WARNING: Directly inheriting from ActiveRecord::Migration is deprecated. Please specify the Rails release the migration was written for:
1036
+
1037
+ class AddWebhookUrlToJobDefinitions < ActiveRecord::Migration[4.2] (called from load at /Users/eisuke-oishi/.rbenv/versions/2.3/bin/rake:23)
1038
+  (36.8ms) ALTER TABLE `kuroko2_job_definitions` ADD `webhook_url` text
1039
+  (0.2ms) BEGIN
1040
+ SQL (0.3ms) INSERT INTO `kuroko2_schema_migrations` (`version`) VALUES ('26')
1041
+  (0.4ms) COMMIT
1042
+ ActiveRecord::InternalMetadata Load (0.2ms) SELECT `kuroko2_ar_internal_metadata`.* FROM `kuroko2_ar_internal_metadata` WHERE `kuroko2_ar_internal_metadata`.`key` = 'environment' LIMIT 1
1043
+  (0.2ms) BEGIN
1044
+ SQL (0.2ms) INSERT INTO `kuroko2_ar_internal_metadata` (`key`, `value`, `created_at`, `updated_at`) VALUES ('environment', 'development', '2016-12-06 09:27:55', '2016-12-06 09:27:55')
1045
+  (0.4ms) COMMIT
1046
+  (0.2ms) SELECT RELEASE_LOCK('4015707761482352670')
1047
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT `kuroko2_schema_migrations`.* FROM `kuroko2_schema_migrations`
1048
+  (0.3ms) SHOW CREATE TABLE `kuroko2_admin_assignments`
1049
+  (0.2ms) SHOW CREATE TABLE `kuroko2_executions`
1050
+  (0.3ms) SHOW TABLE STATUS LIKE 'kuroko2_executions'
1051
+  (0.2ms) SHOW CREATE TABLE `kuroko2_job_definition_tags`
1052
+  (0.2ms) SHOW CREATE TABLE `kuroko2_job_definitions`
1053
+  (0.3ms) SHOW TABLE STATUS LIKE 'kuroko2_job_definitions'
1054
+  (0.2ms) SHOW CREATE TABLE `kuroko2_job_instances`
1055
+  (0.3ms) SHOW TABLE STATUS LIKE 'kuroko2_job_instances'
1056
+  (0.2ms) SHOW CREATE TABLE `kuroko2_job_schedules`
1057
+  (0.3ms) SHOW TABLE STATUS LIKE 'kuroko2_job_schedules'
1058
+  (0.2ms) SHOW CREATE TABLE `kuroko2_job_suspend_schedules`
1059
+  (0.3ms) SHOW TABLE STATUS LIKE 'kuroko2_job_suspend_schedules'
1060
+  (0.2ms) SHOW CREATE TABLE `kuroko2_logs`
1061
+  (0.3ms) SHOW TABLE STATUS LIKE 'kuroko2_logs'
1062
+  (0.2ms) SHOW CREATE TABLE `kuroko2_memory_consumption_logs`
1063
+  (0.2ms) SHOW CREATE TABLE `kuroko2_memory_expectancies`
1064
+  (0.2ms) SHOW CREATE TABLE `kuroko2_process_signals`
1065
+  (0.3ms) SHOW TABLE STATUS LIKE 'kuroko2_process_signals'
1066
+  (0.2ms) SHOW CREATE TABLE `kuroko2_stars`
1067
+  (0.2ms) SHOW CREATE TABLE `kuroko2_tags`
1068
+  (0.3ms) SHOW TABLE STATUS LIKE 'kuroko2_tags'
1069
+  (0.2ms) SHOW CREATE TABLE `kuroko2_ticks`
1070
+  (0.2ms) SHOW CREATE TABLE `kuroko2_tokens`
1071
+  (0.3ms) SHOW TABLE STATUS LIKE 'kuroko2_tokens'
1072
+  (0.2ms) SHOW CREATE TABLE `kuroko2_users`
1073
+  (0.3ms) SHOW TABLE STATUS LIKE 'kuroko2_users'
1074
+  (0.2ms) SHOW CREATE TABLE `kuroko2_workers`
1075
+  (0.3ms) SHOW TABLE STATUS LIKE 'kuroko2_workers'
1076
+  (0.4ms) SELECT fk.referenced_table_name as 'to_table'
1077
+ ,fk.referenced_column_name as 'primary_key'
1078
+ ,fk.column_name as 'column'
1079
+ ,fk.constraint_name as 'name'
1080
+ FROM information_schema.key_column_usage fk
1081
+ WHERE fk.referenced_column_name is not null
1082
+ AND fk.table_schema = 'kuroko2_dummy_development'
1083
+ AND fk.table_name = 'kuroko2_admin_assignments'
1084
+ 
1085
+  (0.4ms) SELECT fk.referenced_table_name as 'to_table'
1086
+ ,fk.referenced_column_name as 'primary_key'
1087
+ ,fk.column_name as 'column'
1088
+ ,fk.constraint_name as 'name'
1089
+ FROM information_schema.key_column_usage fk
1090
+ WHERE fk.referenced_column_name is not null
1091
+ AND fk.table_schema = 'kuroko2_dummy_development'
1092
+ AND fk.table_name = 'kuroko2_executions'
1093
+ 
1094
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
1095
+ ,fk.referenced_column_name as 'primary_key'
1096
+ ,fk.column_name as 'column'
1097
+ ,fk.constraint_name as 'name'
1098
+ FROM information_schema.key_column_usage fk
1099
+ WHERE fk.referenced_column_name is not null
1100
+ AND fk.table_schema = 'kuroko2_dummy_development'
1101
+ AND fk.table_name = 'kuroko2_job_definition_tags'
1102
+ 
1103
+  (0.4ms) SELECT fk.referenced_table_name as 'to_table'
1104
+ ,fk.referenced_column_name as 'primary_key'
1105
+ ,fk.column_name as 'column'
1106
+ ,fk.constraint_name as 'name'
1107
+ FROM information_schema.key_column_usage fk
1108
+ WHERE fk.referenced_column_name is not null
1109
+ AND fk.table_schema = 'kuroko2_dummy_development'
1110
+ AND fk.table_name = 'kuroko2_job_definitions'
1111
+ 
1112
+  (0.4ms) SELECT fk.referenced_table_name as 'to_table'
1113
+ ,fk.referenced_column_name as 'primary_key'
1114
+ ,fk.column_name as 'column'
1115
+ ,fk.constraint_name as 'name'
1116
+ FROM information_schema.key_column_usage fk
1117
+ WHERE fk.referenced_column_name is not null
1118
+ AND fk.table_schema = 'kuroko2_dummy_development'
1119
+ AND fk.table_name = 'kuroko2_job_instances'
1120
+ 
1121
+  (0.4ms) SELECT fk.referenced_table_name as 'to_table'
1122
+ ,fk.referenced_column_name as 'primary_key'
1123
+ ,fk.column_name as 'column'
1124
+ ,fk.constraint_name as 'name'
1125
+ FROM information_schema.key_column_usage fk
1126
+ WHERE fk.referenced_column_name is not null
1127
+ AND fk.table_schema = 'kuroko2_dummy_development'
1128
+ AND fk.table_name = 'kuroko2_job_schedules'
1129
+ 
1130
+  (0.4ms) SELECT fk.referenced_table_name as 'to_table'
1131
+ ,fk.referenced_column_name as 'primary_key'
1132
+ ,fk.column_name as 'column'
1133
+ ,fk.constraint_name as 'name'
1134
+ FROM information_schema.key_column_usage fk
1135
+ WHERE fk.referenced_column_name is not null
1136
+ AND fk.table_schema = 'kuroko2_dummy_development'
1137
+ AND fk.table_name = 'kuroko2_job_suspend_schedules'
1138
+ 
1139
+  (0.4ms) SELECT fk.referenced_table_name as 'to_table'
1140
+ ,fk.referenced_column_name as 'primary_key'
1141
+ ,fk.column_name as 'column'
1142
+ ,fk.constraint_name as 'name'
1143
+ FROM information_schema.key_column_usage fk
1144
+ WHERE fk.referenced_column_name is not null
1145
+ AND fk.table_schema = 'kuroko2_dummy_development'
1146
+ AND fk.table_name = 'kuroko2_logs'
1147
+ 
1148
+  (0.5ms) SELECT fk.referenced_table_name as 'to_table'
1149
+ ,fk.referenced_column_name as 'primary_key'
1150
+ ,fk.column_name as 'column'
1151
+ ,fk.constraint_name as 'name'
1152
+ FROM information_schema.key_column_usage fk
1153
+ WHERE fk.referenced_column_name is not null
1154
+ AND fk.table_schema = 'kuroko2_dummy_development'
1155
+ AND fk.table_name = 'kuroko2_memory_consumption_logs'
1156
+ 
1157
+  (0.4ms) SELECT fk.referenced_table_name as 'to_table'
1158
+ ,fk.referenced_column_name as 'primary_key'
1159
+ ,fk.column_name as 'column'
1160
+ ,fk.constraint_name as 'name'
1161
+ FROM information_schema.key_column_usage fk
1162
+ WHERE fk.referenced_column_name is not null
1163
+ AND fk.table_schema = 'kuroko2_dummy_development'
1164
+ AND fk.table_name = 'kuroko2_memory_expectancies'
1165
+ 
1166
+  (0.4ms) SELECT fk.referenced_table_name as 'to_table'
1167
+ ,fk.referenced_column_name as 'primary_key'
1168
+ ,fk.column_name as 'column'
1169
+ ,fk.constraint_name as 'name'
1170
+ FROM information_schema.key_column_usage fk
1171
+ WHERE fk.referenced_column_name is not null
1172
+ AND fk.table_schema = 'kuroko2_dummy_development'
1173
+ AND fk.table_name = 'kuroko2_process_signals'
1174
+ 
1175
+  (0.4ms) SELECT fk.referenced_table_name as 'to_table'
1176
+ ,fk.referenced_column_name as 'primary_key'
1177
+ ,fk.column_name as 'column'
1178
+ ,fk.constraint_name as 'name'
1179
+ FROM information_schema.key_column_usage fk
1180
+ WHERE fk.referenced_column_name is not null
1181
+ AND fk.table_schema = 'kuroko2_dummy_development'
1182
+ AND fk.table_name = 'kuroko2_stars'
1183
+ 
1184
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
1185
+ ,fk.referenced_column_name as 'primary_key'
1186
+ ,fk.column_name as 'column'
1187
+ ,fk.constraint_name as 'name'
1188
+ FROM information_schema.key_column_usage fk
1189
+ WHERE fk.referenced_column_name is not null
1190
+ AND fk.table_schema = 'kuroko2_dummy_development'
1191
+ AND fk.table_name = 'kuroko2_tags'
1192
+ 
1193
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
1194
+ ,fk.referenced_column_name as 'primary_key'
1195
+ ,fk.column_name as 'column'
1196
+ ,fk.constraint_name as 'name'
1197
+ FROM information_schema.key_column_usage fk
1198
+ WHERE fk.referenced_column_name is not null
1199
+ AND fk.table_schema = 'kuroko2_dummy_development'
1200
+ AND fk.table_name = 'kuroko2_ticks'
1201
+ 
1202
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
1203
+ ,fk.referenced_column_name as 'primary_key'
1204
+ ,fk.column_name as 'column'
1205
+ ,fk.constraint_name as 'name'
1206
+ FROM information_schema.key_column_usage fk
1207
+ WHERE fk.referenced_column_name is not null
1208
+ AND fk.table_schema = 'kuroko2_dummy_development'
1209
+ AND fk.table_name = 'kuroko2_tokens'
1210
+ 
1211
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
1212
+ ,fk.referenced_column_name as 'primary_key'
1213
+ ,fk.column_name as 'column'
1214
+ ,fk.constraint_name as 'name'
1215
+ FROM information_schema.key_column_usage fk
1216
+ WHERE fk.referenced_column_name is not null
1217
+ AND fk.table_schema = 'kuroko2_dummy_development'
1218
+ AND fk.table_name = 'kuroko2_users'
1219
+ 
1220
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
1221
+ ,fk.referenced_column_name as 'primary_key'
1222
+ ,fk.column_name as 'column'
1223
+ ,fk.constraint_name as 'name'
1224
+ FROM information_schema.key_column_usage fk
1225
+ WHERE fk.referenced_column_name is not null
1226
+ AND fk.table_schema = 'kuroko2_dummy_development'
1227
+ AND fk.table_name = 'kuroko2_workers'
1228
+ 
1229
+  (70.1ms) DROP DATABASE IF EXISTS `kuroko2_dummy_development`
1230
+  (52.7ms) DROP DATABASE IF EXISTS `kuroko2_dummy_test`
1231
+  (0.4ms) CREATE DATABASE `kuroko2_dummy_development` DEFAULT CHARACTER SET `utf8mb4` COLLATE `utf8mb4_general_ci`
1232
+  (0.5ms) CREATE DATABASE `kuroko2_dummy_test` DEFAULT CHARACTER SET `utf8mb4` COLLATE `utf8mb4_general_ci`
1233
+  (28.4ms) CREATE TABLE `admin_assignments` (`id` int AUTO_INCREMENT PRIMARY KEY, `user_id` int NOT NULL, `job_definition_id` int NOT NULL, `created_at` datetime, `updated_at` datetime, UNIQUE INDEX `user_id` USING btree (`user_id`, `job_definition_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
1234
+  (11.0ms) CREATE TABLE `executions` (`id` int AUTO_INCREMENT PRIMARY KEY, `uuid` varchar(36) NOT NULL, `job_definition_id` int, `job_definition_version` int, `job_instance_id` int, `token_id` int, `queue` varchar(180) DEFAULT '@default' NOT NULL, `shell` text NOT NULL, `context` text NOT NULL, `pid` int, `output` longtext, `exit_status` tinyint, `term_signal` tinyint, `started_at` datetime, `finished_at` datetime, `mailed_at` datetime, `created_at` datetime, `updated_at` datetime, UNIQUE INDEX `index_kuroko2_executions_on_job_definition_id_and_token_id` USING btree (`job_definition_id`, `token_id`), INDEX `started_at` USING btree (`started_at`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
1235
+  (30.6ms) CREATE TABLE `job_definition_tags` (`id` int AUTO_INCREMENT PRIMARY KEY, `job_definition_id` int NOT NULL, `tag_id` int NOT NULL, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, UNIQUE INDEX `kuroko2_definition_tag_idx` USING btree (`job_definition_id`, `tag_id`), INDEX `job_definition_tags_tag_id` USING btree (`tag_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
1236
+  (9.5ms) CREATE TABLE `job_definitions` (`id` int AUTO_INCREMENT PRIMARY KEY, `version` int DEFAULT 0 NOT NULL, `name` varchar(180) NOT NULL, `description` text NOT NULL, `script` text NOT NULL, `suspended` tinyint(1) DEFAULT 0 NOT NULL, `prevent_multi` int DEFAULT 1 NOT NULL, `notify_cancellation` tinyint(1) DEFAULT 1 NOT NULL, `hipchat_room` varchar(180) DEFAULT '' NOT NULL, `hipchat_notify_finished` tinyint(1) DEFAULT 1 NOT NULL, `hipchat_additional_text` varchar(180), `slack_channel` varchar(180) DEFAULT '' NOT NULL, `api_allowed` tinyint(1) DEFAULT 0 NOT NULL, `created_at` datetime, `updated_at` datetime, `webhook_url` text, INDEX `name` USING btree (`name`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
1237
+  (9.6ms) CREATE TABLE `job_instances` (`id` int AUTO_INCREMENT PRIMARY KEY, `job_definition_id` int, `job_definition_version` int, `script` text, `finished_at` datetime, `canceled_at` datetime, `error_at` datetime, `created_at` datetime, `updated_at` datetime, INDEX `job_instance_idx` USING btree (`finished_at`, `canceled_at`, `job_definition_id`), INDEX `index_kuroko2_job_instances_on_job_definition_id` USING btree (`job_definition_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
1238
+  (33.8ms) CREATE TABLE `job_schedules` (`id` int AUTO_INCREMENT PRIMARY KEY, `job_definition_id` int, `cron` varchar(180), `created_at` datetime, `updated_at` datetime, UNIQUE INDEX `kuroko2_schedules_definition_id_cron_idx` USING btree (`job_definition_id`, `cron`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
1239
+  (7.7ms) CREATE TABLE `job_suspend_schedules` (`id` int AUTO_INCREMENT PRIMARY KEY, `job_definition_id` int, `cron` varchar(180), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, UNIQUE INDEX `kuroko2_suspend_schedules_definition_id_cron_idx` USING btree (`job_definition_id`, `cron`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
1240
+  (56.2ms) CREATE TABLE `logs` (`id` int AUTO_INCREMENT PRIMARY KEY, `job_instance_id` int, `level` varchar(10), `message` longtext, `created_at` datetime, `updated_at` datetime, INDEX `job_instance_id` USING btree (`job_instance_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
1241
+  (9.0ms) CREATE TABLE `memory_consumption_logs` (`id` int AUTO_INCREMENT PRIMARY KEY, `job_instance_id` int, `value` int NOT NULL, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, INDEX `index_kuroko2_memory_consumption_logs_on_job_instance_id` USING btree (`job_instance_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
1242
+  (8.3ms) CREATE TABLE `memory_expectancies` (`id` int AUTO_INCREMENT PRIMARY KEY, `expected_value` int DEFAULT 0 NOT NULL, `job_definition_id` int, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, INDEX `index_kuroko2_memory_expectancies_on_job_definition_id` USING btree (`job_definition_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
1243
+  (8.2ms) CREATE TABLE `process_signals` (`id` int AUTO_INCREMENT PRIMARY KEY, `hostname` varchar(180) DEFAULT '' NOT NULL, `pid` int NOT NULL, `number` tinyint DEFAULT 15 NOT NULL, `started_at` datetime, `created_at` datetime, `updated_at` datetime, `message` text, INDEX `hostname_started_at` USING btree (`hostname`, `started_at`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
1244
+  (8.0ms) CREATE TABLE `stars` (`id` int AUTO_INCREMENT PRIMARY KEY, `user_id` int NOT NULL, `job_definition_id` int NOT NULL, `created_at` datetime, `updated_at` datetime, UNIQUE INDEX `index_kuroko2_stars_on_user_id_and_job_definition_id` USING btree (`user_id`, `job_definition_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
1245
+  (33.8ms) CREATE TABLE `tags` (`id` int AUTO_INCREMENT PRIMARY KEY, `name` varchar(100) NOT NULL, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, UNIQUE INDEX `index_kuroko2_tags_on_name` USING btree (`name`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
1246
+  (9.4ms) CREATE TABLE `ticks` (`id` int AUTO_INCREMENT PRIMARY KEY, `at` datetime) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
1247
+  (9.0ms) CREATE TABLE `tokens` (`id` int AUTO_INCREMENT PRIMARY KEY, `uuid` varchar(36) NOT NULL, `job_definition_id` int, `job_definition_version` int, `job_instance_id` int, `parent_id` int, `script` text NOT NULL, `path` varchar(180) DEFAULT '/' NOT NULL, `status` int DEFAULT 0 NOT NULL, `message` text NOT NULL, `context` text NOT NULL, `created_at` datetime, `updated_at` datetime, INDEX `parent_id` USING btree (`parent_id`), INDEX `status` USING btree (`status`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
1248
+  (8.3ms) CREATE TABLE `users` (`id` int AUTO_INCREMENT PRIMARY KEY, `provider` varchar(180) DEFAULT 'google_oauth2' NOT NULL, `uid` varchar(180) NOT NULL, `name` varchar(180) DEFAULT '' NOT NULL, `email` varchar(180) NOT NULL, `first_name` varchar(180) DEFAULT '' NOT NULL, `last_name` varchar(180) DEFAULT '' NOT NULL, `image` varchar(180) DEFAULT '' NOT NULL, `suspended_at` datetime, `created_at` datetime, `updated_at` datetime, UNIQUE INDEX `email` USING btree (`email`), INDEX `uid_2` USING btree (`uid`, `suspended_at`), UNIQUE INDEX `uid` USING btree (`uid`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
1249
+  (8.0ms) CREATE TABLE `workers` (`id` int AUTO_INCREMENT PRIMARY KEY, `hostname` varchar(180) NOT NULL, `worker_id` tinyint NOT NULL, `queue` varchar(180) DEFAULT '@default' NOT NULL, `working` tinyint(1) DEFAULT 0 NOT NULL, `execution_id` int, `created_at` datetime, `updated_at` datetime, UNIQUE INDEX `hostname` USING btree (`hostname`, `worker_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
1250
+  (8.1ms) CREATE TABLE `schema_migrations` (`version` varchar(255) COLLATE utf8_general_ci PRIMARY KEY) ENGINE=InnoDB
1251
+  (0.7ms) SELECT version FROM `schema_migrations`
1252
+  (0.4ms) INSERT INTO `schema_migrations` (version) VALUES ('26')
1253
+  (0.5ms) INSERT INTO schema_migrations (version) VALUES ('1'), ('2'), ('3'), ('4'), ('5'), ('6'), ('7'), ('8'), ('9'), ('10'), ('11'), ('12'), ('18'), ('19'), ('21'), ('25');
1254
+
1255
+ 
1256
+  (40.6ms) CREATE TABLE `ar_internal_metadata` (`key` varchar(255) COLLATE utf8_general_ci PRIMARY KEY, `value` varchar(255), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
1257
+ ActiveRecord::InternalMetadata Load (0.3ms) SELECT `ar_internal_metadata`.* FROM `ar_internal_metadata` WHERE `ar_internal_metadata`.`key` = 'environment' LIMIT 1
1258
+  (0.2ms) BEGIN
1259
+ SQL (0.3ms) INSERT INTO `ar_internal_metadata` (`key`, `value`, `created_at`, `updated_at`) VALUES ('environment', 'development', '2016-12-06 09:28:39', '2016-12-06 09:28:39')
1260
+  (6.0ms) COMMIT
1261
+ ActiveRecord::InternalMetadata Load (0.3ms) SELECT `ar_internal_metadata`.* FROM `ar_internal_metadata` WHERE `ar_internal_metadata`.`key` = 'environment' LIMIT 1
1262
+  (0.2ms) BEGIN
1263
+  (0.2ms) COMMIT
1264
+  (25.6ms) CREATE TABLE `admin_assignments` (`id` int AUTO_INCREMENT PRIMARY KEY, `user_id` int NOT NULL, `job_definition_id` int NOT NULL, `created_at` datetime, `updated_at` datetime, UNIQUE INDEX `user_id` USING btree (`user_id`, `job_definition_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
1265
+  (9.5ms) CREATE TABLE `executions` (`id` int AUTO_INCREMENT PRIMARY KEY, `uuid` varchar(36) NOT NULL, `job_definition_id` int, `job_definition_version` int, `job_instance_id` int, `token_id` int, `queue` varchar(180) DEFAULT '@default' NOT NULL, `shell` text NOT NULL, `context` text NOT NULL, `pid` int, `output` longtext, `exit_status` tinyint, `term_signal` tinyint, `started_at` datetime, `finished_at` datetime, `mailed_at` datetime, `created_at` datetime, `updated_at` datetime, UNIQUE INDEX `index_kuroko2_executions_on_job_definition_id_and_token_id` USING btree (`job_definition_id`, `token_id`), INDEX `started_at` USING btree (`started_at`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
1266
+  (9.7ms) CREATE TABLE `job_definition_tags` (`id` int AUTO_INCREMENT PRIMARY KEY, `job_definition_id` int NOT NULL, `tag_id` int NOT NULL, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, UNIQUE INDEX `kuroko2_definition_tag_idx` USING btree (`job_definition_id`, `tag_id`), INDEX `job_definition_tags_tag_id` USING btree (`tag_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
1267
+  (8.4ms) CREATE TABLE `job_definitions` (`id` int AUTO_INCREMENT PRIMARY KEY, `version` int DEFAULT 0 NOT NULL, `name` varchar(180) NOT NULL, `description` text NOT NULL, `script` text NOT NULL, `suspended` tinyint(1) DEFAULT 0 NOT NULL, `prevent_multi` int DEFAULT 1 NOT NULL, `notify_cancellation` tinyint(1) DEFAULT 1 NOT NULL, `hipchat_room` varchar(180) DEFAULT '' NOT NULL, `hipchat_notify_finished` tinyint(1) DEFAULT 1 NOT NULL, `hipchat_additional_text` varchar(180), `slack_channel` varchar(180) DEFAULT '' NOT NULL, `api_allowed` tinyint(1) DEFAULT 0 NOT NULL, `created_at` datetime, `updated_at` datetime, `webhook_url` text, INDEX `name` USING btree (`name`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
1268
+  (7.5ms) CREATE TABLE `job_instances` (`id` int AUTO_INCREMENT PRIMARY KEY, `job_definition_id` int, `job_definition_version` int, `script` text, `finished_at` datetime, `canceled_at` datetime, `error_at` datetime, `created_at` datetime, `updated_at` datetime, INDEX `job_instance_idx` USING btree (`finished_at`, `canceled_at`, `job_definition_id`), INDEX `index_kuroko2_job_instances_on_job_definition_id` USING btree (`job_definition_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
1269
+  (7.5ms) CREATE TABLE `job_schedules` (`id` int AUTO_INCREMENT PRIMARY KEY, `job_definition_id` int, `cron` varchar(180), `created_at` datetime, `updated_at` datetime, UNIQUE INDEX `kuroko2_schedules_definition_id_cron_idx` USING btree (`job_definition_id`, `cron`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
1270
+  (8.2ms) CREATE TABLE `job_suspend_schedules` (`id` int AUTO_INCREMENT PRIMARY KEY, `job_definition_id` int, `cron` varchar(180), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, UNIQUE INDEX `kuroko2_suspend_schedules_definition_id_cron_idx` USING btree (`job_definition_id`, `cron`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
1271
+  (8.5ms) CREATE TABLE `logs` (`id` int AUTO_INCREMENT PRIMARY KEY, `job_instance_id` int, `level` varchar(10), `message` longtext, `created_at` datetime, `updated_at` datetime, INDEX `job_instance_id` USING btree (`job_instance_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
1272
+  (8.0ms) CREATE TABLE `memory_consumption_logs` (`id` int AUTO_INCREMENT PRIMARY KEY, `job_instance_id` int, `value` int NOT NULL, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, INDEX `index_kuroko2_memory_consumption_logs_on_job_instance_id` USING btree (`job_instance_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
1273
+  (7.2ms) CREATE TABLE `memory_expectancies` (`id` int AUTO_INCREMENT PRIMARY KEY, `expected_value` int DEFAULT 0 NOT NULL, `job_definition_id` int, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, INDEX `index_kuroko2_memory_expectancies_on_job_definition_id` USING btree (`job_definition_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
1274
+  (7.4ms) CREATE TABLE `process_signals` (`id` int AUTO_INCREMENT PRIMARY KEY, `hostname` varchar(180) DEFAULT '' NOT NULL, `pid` int NOT NULL, `number` tinyint DEFAULT 15 NOT NULL, `started_at` datetime, `created_at` datetime, `updated_at` datetime, `message` text, INDEX `hostname_started_at` USING btree (`hostname`, `started_at`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
1275
+  (7.8ms) CREATE TABLE `stars` (`id` int AUTO_INCREMENT PRIMARY KEY, `user_id` int NOT NULL, `job_definition_id` int NOT NULL, `created_at` datetime, `updated_at` datetime, UNIQUE INDEX `index_kuroko2_stars_on_user_id_and_job_definition_id` USING btree (`user_id`, `job_definition_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
1276
+  (7.7ms) CREATE TABLE `tags` (`id` int AUTO_INCREMENT PRIMARY KEY, `name` varchar(100) NOT NULL, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, UNIQUE INDEX `index_kuroko2_tags_on_name` USING btree (`name`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
1277
+  (7.3ms) CREATE TABLE `ticks` (`id` int AUTO_INCREMENT PRIMARY KEY, `at` datetime) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
1278
+  (8.6ms) CREATE TABLE `tokens` (`id` int AUTO_INCREMENT PRIMARY KEY, `uuid` varchar(36) NOT NULL, `job_definition_id` int, `job_definition_version` int, `job_instance_id` int, `parent_id` int, `script` text NOT NULL, `path` varchar(180) DEFAULT '/' NOT NULL, `status` int DEFAULT 0 NOT NULL, `message` text NOT NULL, `context` text NOT NULL, `created_at` datetime, `updated_at` datetime, INDEX `parent_id` USING btree (`parent_id`), INDEX `status` USING btree (`status`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
1279
+  (7.0ms) CREATE TABLE `users` (`id` int AUTO_INCREMENT PRIMARY KEY, `provider` varchar(180) DEFAULT 'google_oauth2' NOT NULL, `uid` varchar(180) NOT NULL, `name` varchar(180) DEFAULT '' NOT NULL, `email` varchar(180) NOT NULL, `first_name` varchar(180) DEFAULT '' NOT NULL, `last_name` varchar(180) DEFAULT '' NOT NULL, `image` varchar(180) DEFAULT '' NOT NULL, `suspended_at` datetime, `created_at` datetime, `updated_at` datetime, UNIQUE INDEX `email` USING btree (`email`), INDEX `uid_2` USING btree (`uid`, `suspended_at`), UNIQUE INDEX `uid` USING btree (`uid`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
1280
+  (7.0ms) CREATE TABLE `workers` (`id` int AUTO_INCREMENT PRIMARY KEY, `hostname` varchar(180) NOT NULL, `worker_id` tinyint NOT NULL, `queue` varchar(180) DEFAULT '@default' NOT NULL, `working` tinyint(1) DEFAULT 0 NOT NULL, `execution_id` int, `created_at` datetime, `updated_at` datetime, UNIQUE INDEX `hostname` USING btree (`hostname`, `worker_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
1281
+  (8.5ms) CREATE TABLE `schema_migrations` (`version` varchar(255) COLLATE utf8_general_ci PRIMARY KEY) ENGINE=InnoDB
1282
+  (0.6ms) SELECT version FROM `schema_migrations`
1283
+  (0.4ms) INSERT INTO `schema_migrations` (version) VALUES ('26')
1284
+  (0.5ms) INSERT INTO schema_migrations (version) VALUES ('1'), ('2'), ('3'), ('4'), ('5'), ('6'), ('7'), ('8'), ('9'), ('10'), ('11'), ('12'), ('18'), ('19'), ('21'), ('25');
1285
+
1286
+ 
1287
+  (7.9ms) CREATE TABLE `ar_internal_metadata` (`key` varchar(255) COLLATE utf8_general_ci PRIMARY KEY, `value` varchar(255), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
1288
+ ActiveRecord::InternalMetadata Load (0.6ms) SELECT `ar_internal_metadata`.* FROM `ar_internal_metadata` WHERE `ar_internal_metadata`.`key` = 'environment' LIMIT 1
1289
+  (0.2ms) BEGIN
1290
+ SQL (0.3ms) INSERT INTO `ar_internal_metadata` (`key`, `value`, `created_at`, `updated_at`) VALUES ('environment', 'development', '2016-12-06 09:28:39', '2016-12-06 09:28:39')
1291
+  (0.3ms) COMMIT
1292
+ ActiveRecord::InternalMetadata Load (0.3ms) SELECT `ar_internal_metadata`.* FROM `ar_internal_metadata` WHERE `ar_internal_metadata`.`key` = 'environment' LIMIT 1
1293
+  (0.2ms) BEGIN
1294
+  (0.2ms) COMMIT
1295
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT `schema_migrations`.* FROM `schema_migrations`
1296
+  (11.5ms) CREATE TABLE `kuroko2_schema_migrations` (`version` varchar(255) COLLATE utf8_general_ci PRIMARY KEY) ENGINE=InnoDB
1297
+  (9.6ms) CREATE TABLE `kuroko2_ar_internal_metadata` (`key` varchar(255) COLLATE utf8_general_ci PRIMARY KEY, `value` varchar(255), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
1298
+  (0.2ms) SELECT DATABASE() as db
1299
+  (0.2ms) SELECT GET_LOCK('4015707761482352670', 0);
1300
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT `kuroko2_schema_migrations`.* FROM `kuroko2_schema_migrations`
1301
+ Migrating to CreateJobDefinitions (1)
1302
+ DEPRECATION WARNING: Directly inheriting from ActiveRecord::Migration is deprecated. Please specify the Rails release the migration was written for:
1303
+
1304
+ class CreateJobDefinitions < ActiveRecord::Migration[4.2] (called from load at /Users/eisuke-oishi/.rbenv/versions/2.3/bin/rake:23)
1305
+  (8.4ms) CREATE TABLE `kuroko2_job_definitions` (`id` int AUTO_INCREMENT PRIMARY KEY, `version` int DEFAULT 0 NOT NULL, `name` varchar(180) NOT NULL, `description` text NOT NULL, `script` text NOT NULL, `suspended` tinyint(1) DEFAULT 0 NOT NULL, `prevent_multi` int DEFAULT 1 NOT NULL, `notify_cancellation` tinyint(1) DEFAULT 1 NOT NULL, `hipchat_room` varchar(180) DEFAULT '' NOT NULL, `hipchat_notify_finished` tinyint(1) DEFAULT 1 NOT NULL, `hipchat_additional_text` varchar(180), `slack_channel` varchar(180) DEFAULT '' NOT NULL, `api_allowed` tinyint(1) DEFAULT 0 NOT NULL, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
1306
+  (11.7ms) CREATE INDEX `name` USING btree ON `kuroko2_job_definitions` (`name`) 
1307
+  (0.2ms) BEGIN
1308
+ SQL (0.3ms) INSERT INTO `kuroko2_schema_migrations` (`version`) VALUES ('1')
1309
+  (0.4ms) COMMIT
1310
+ Migrating to CreateJobInstances (2)
1311
+ DEPRECATION WARNING: Directly inheriting from ActiveRecord::Migration is deprecated. Please specify the Rails release the migration was written for:
1312
+
1313
+ class CreateJobInstances < ActiveRecord::Migration[4.2] (called from load at /Users/eisuke-oishi/.rbenv/versions/2.3/bin/rake:23)
1314
+  (10.7ms) CREATE TABLE `kuroko2_job_instances` (`id` int AUTO_INCREMENT PRIMARY KEY, `job_definition_id` int, `job_definition_version` int, `script` text, `finished_at` datetime, `canceled_at` datetime, `error_at` datetime, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
1315
+  (11.5ms) CREATE INDEX `job_instance_idx` USING btree ON `kuroko2_job_instances` (`finished_at`, `canceled_at`, `job_definition_id`) 
1316
+  (14.4ms) CREATE INDEX `index_kuroko2_job_instances_on_job_definition_id` USING btree ON `kuroko2_job_instances` (`job_definition_id`) 
1317
+  (0.3ms) BEGIN
1318
+ SQL (0.2ms) INSERT INTO `kuroko2_schema_migrations` (`version`) VALUES ('2')
1319
+  (0.4ms) COMMIT
1320
+ Migrating to CreateJobSchedules (3)
1321
+ DEPRECATION WARNING: Directly inheriting from ActiveRecord::Migration is deprecated. Please specify the Rails release the migration was written for:
1322
+
1323
+ class CreateJobSchedules < ActiveRecord::Migration[4.2] (called from load at /Users/eisuke-oishi/.rbenv/versions/2.3/bin/rake:23)
1324
+  (15.4ms) CREATE TABLE `kuroko2_job_schedules` (`id` int AUTO_INCREMENT PRIMARY KEY, `job_definition_id` int, `cron` varchar(180), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
1325
+  (34.6ms) CREATE UNIQUE INDEX `kuroko2_schedules_definition_id_cron_idx` USING btree ON `kuroko2_job_schedules` (`job_definition_id`, `cron`) 
1326
+  (0.2ms) BEGIN
1327
+ SQL (0.2ms) INSERT INTO `kuroko2_schema_migrations` (`version`) VALUES ('3')
1328
+  (0.4ms) COMMIT
1329
+ Migrating to CreateTicks (4)
1330
+ DEPRECATION WARNING: Directly inheriting from ActiveRecord::Migration is deprecated. Please specify the Rails release the migration was written for:
1331
+
1332
+ class CreateTicks < ActiveRecord::Migration[4.2] (called from load at /Users/eisuke-oishi/.rbenv/versions/2.3/bin/rake:23)
1333
+  (10.8ms) CREATE TABLE `kuroko2_ticks` (`id` int AUTO_INCREMENT PRIMARY KEY, `at` datetime) ENGINE=InnoDB
1334
+  (0.2ms) BEGIN
1335
+ SQL (0.3ms) INSERT INTO `kuroko2_schema_migrations` (`version`) VALUES ('4')
1336
+  (0.5ms) COMMIT
1337
+ Migrating to CreateLogs (5)
1338
+ DEPRECATION WARNING: Directly inheriting from ActiveRecord::Migration is deprecated. Please specify the Rails release the migration was written for:
1339
+
1340
+ class CreateLogs < ActiveRecord::Migration[4.2] (called from load at /Users/eisuke-oishi/.rbenv/versions/2.3/bin/rake:23)
1341
+  (35.2ms) CREATE TABLE `kuroko2_logs` (`id` int AUTO_INCREMENT PRIMARY KEY, `job_instance_id` int, `level` varchar(10), `message` longtext, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
1342
+  (12.4ms) CREATE INDEX `job_instance_id` USING btree ON `kuroko2_logs` (`job_instance_id`) 
1343
+  (0.2ms) BEGIN
1344
+ SQL (0.2ms) INSERT INTO `kuroko2_schema_migrations` (`version`) VALUES ('5')
1345
+  (0.3ms) COMMIT
1346
+ Migrating to CreateTokens (6)
1347
+ DEPRECATION WARNING: Directly inheriting from ActiveRecord::Migration is deprecated. Please specify the Rails release the migration was written for:
1348
+
1349
+ class CreateTokens < ActiveRecord::Migration[4.2] (called from load at /Users/eisuke-oishi/.rbenv/versions/2.3/bin/rake:23)
1350
+  (9.6ms) CREATE TABLE `kuroko2_tokens` (`id` int AUTO_INCREMENT PRIMARY KEY, `uuid` varchar(36) NOT NULL, `job_definition_id` int, `job_definition_version` int, `job_instance_id` int, `parent_id` int, `script` text NOT NULL, `path` varchar(180) DEFAULT '/' NOT NULL, `status` int DEFAULT 0 NOT NULL, `message` text NOT NULL, `context` text NOT NULL, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
1351
+  (12.4ms) CREATE INDEX `parent_id` USING btree ON `kuroko2_tokens` (`parent_id`) 
1352
+  (10.2ms) CREATE INDEX `status` USING btree ON `kuroko2_tokens` (`status`) 
1353
+  (0.2ms) BEGIN
1354
+ SQL (0.2ms) INSERT INTO `kuroko2_schema_migrations` (`version`) VALUES ('6')
1355
+  (0.3ms) COMMIT
1356
+ Migrating to CreateExecutions (7)
1357
+ DEPRECATION WARNING: Directly inheriting from ActiveRecord::Migration is deprecated. Please specify the Rails release the migration was written for:
1358
+
1359
+ class CreateExecutions < ActiveRecord::Migration[4.2] (called from load at /Users/eisuke-oishi/.rbenv/versions/2.3/bin/rake:23)
1360
+  (10.0ms) CREATE TABLE `kuroko2_executions` (`id` int AUTO_INCREMENT PRIMARY KEY, `uuid` varchar(36) NOT NULL, `job_definition_id` int, `job_definition_version` int, `job_instance_id` int, `token_id` int, `queue` varchar(180) DEFAULT '@default' NOT NULL, `shell` text NOT NULL, `context` text NOT NULL, `pid` int, `output` longtext, `exit_status` tinyint, `term_signal` tinyint, `started_at` datetime, `finished_at` datetime, `mailed_at` datetime, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
1361
+  (12.5ms) CREATE UNIQUE INDEX `index_kuroko2_executions_on_job_definition_id_and_token_id` USING btree ON `kuroko2_executions` (`job_definition_id`, `token_id`) 
1362
+  (12.5ms) CREATE INDEX `started_at` USING btree ON `kuroko2_executions` (`started_at`) 
1363
+  (0.2ms) BEGIN
1364
+ SQL (0.2ms) INSERT INTO `kuroko2_schema_migrations` (`version`) VALUES ('7')
1365
+  (0.3ms) COMMIT
1366
+ Migrating to CreateProcessSignals (8)
1367
+ DEPRECATION WARNING: Directly inheriting from ActiveRecord::Migration is deprecated. Please specify the Rails release the migration was written for:
1368
+
1369
+ class CreateProcessSignals < ActiveRecord::Migration[4.2] (called from load at /Users/eisuke-oishi/.rbenv/versions/2.3/bin/rake:23)
1370
+  (8.2ms) CREATE TABLE `kuroko2_process_signals` (`id` int AUTO_INCREMENT PRIMARY KEY, `hostname` varchar(180) DEFAULT '' NOT NULL, `pid` int NOT NULL, `number` tinyint DEFAULT 15 NOT NULL, `started_at` datetime, `created_at` datetime, `updated_at` datetime, `message` text) ENGINE=InnoDB
1371
+  (12.6ms) CREATE INDEX `hostname_started_at` USING btree ON `kuroko2_process_signals` (`hostname`, `started_at`) 
1372
+  (0.2ms) BEGIN
1373
+ SQL (0.2ms) INSERT INTO `kuroko2_schema_migrations` (`version`) VALUES ('8')
1374
+  (0.4ms) COMMIT
1375
+ Migrating to CreateUsers (9)
1376
+ DEPRECATION WARNING: Directly inheriting from ActiveRecord::Migration is deprecated. Please specify the Rails release the migration was written for:
1377
+
1378
+ class CreateUsers < ActiveRecord::Migration[4.2] (called from load at /Users/eisuke-oishi/.rbenv/versions/2.3/bin/rake:23)
1379
+  (9.1ms) CREATE TABLE `kuroko2_users` (`id` int AUTO_INCREMENT PRIMARY KEY, `provider` varchar(180) DEFAULT 'google_oauth2' NOT NULL, `uid` varchar(180) NOT NULL, `name` varchar(180) DEFAULT '' NOT NULL, `email` varchar(180) NOT NULL, `first_name` varchar(180) DEFAULT '' NOT NULL, `last_name` varchar(180) DEFAULT '' NOT NULL, `image` varchar(180) DEFAULT '' NOT NULL, `suspended_at` datetime, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
1380
+  (14.0ms) CREATE UNIQUE INDEX `email` USING btree ON `kuroko2_users` (`email`) 
1381
+  (10.7ms) CREATE INDEX `uid_2` USING btree ON `kuroko2_users` (`uid`, `suspended_at`) 
1382
+  (10.5ms) CREATE UNIQUE INDEX `uid` USING btree ON `kuroko2_users` (`uid`) 
1383
+  (0.1ms) BEGIN
1384
+ SQL (0.2ms) INSERT INTO `kuroko2_schema_migrations` (`version`) VALUES ('9')
1385
+  (0.4ms) COMMIT
1386
+ Migrating to CreateAdminAssignments (10)
1387
+ DEPRECATION WARNING: Directly inheriting from ActiveRecord::Migration is deprecated. Please specify the Rails release the migration was written for:
1388
+
1389
+ class CreateAdminAssignments < ActiveRecord::Migration[4.2] (called from load at /Users/eisuke-oishi/.rbenv/versions/2.3/bin/rake:23)
1390
+  (8.0ms) CREATE TABLE `kuroko2_admin_assignments` (`id` int AUTO_INCREMENT PRIMARY KEY, `user_id` int NOT NULL, `job_definition_id` int NOT NULL, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
1391
+  (14.1ms) CREATE UNIQUE INDEX `user_id` USING btree ON `kuroko2_admin_assignments` (`user_id`, `job_definition_id`) 
1392
+  (0.2ms) BEGIN
1393
+ SQL (0.3ms) INSERT INTO `kuroko2_schema_migrations` (`version`) VALUES ('10')
1394
+  (0.3ms) COMMIT
1395
+ Migrating to CreateStars (11)
1396
+ DEPRECATION WARNING: Directly inheriting from ActiveRecord::Migration is deprecated. Please specify the Rails release the migration was written for:
1397
+
1398
+ class CreateStars < ActiveRecord::Migration[4.2] (called from load at /Users/eisuke-oishi/.rbenv/versions/2.3/bin/rake:23)
1399
+  (9.7ms) CREATE TABLE `kuroko2_stars` (`id` int AUTO_INCREMENT PRIMARY KEY, `user_id` int NOT NULL, `job_definition_id` int NOT NULL, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
1400
+  (12.0ms) CREATE UNIQUE INDEX `index_kuroko2_stars_on_user_id_and_job_definition_id` USING btree ON `kuroko2_stars` (`user_id`, `job_definition_id`) 
1401
+  (0.2ms) BEGIN
1402
+ SQL (0.2ms) INSERT INTO `kuroko2_schema_migrations` (`version`) VALUES ('11')
1403
+  (0.3ms) COMMIT
1404
+ Migrating to CreateWorkers (12)
1405
+ DEPRECATION WARNING: Directly inheriting from ActiveRecord::Migration is deprecated. Please specify the Rails release the migration was written for:
1406
+
1407
+ class CreateWorkers < ActiveRecord::Migration[4.2] (called from load at /Users/eisuke-oishi/.rbenv/versions/2.3/bin/rake:23)
1408
+  (9.2ms) CREATE TABLE `kuroko2_workers` (`id` int AUTO_INCREMENT PRIMARY KEY, `hostname` varchar(180) NOT NULL, `worker_id` tinyint NOT NULL, `queue` varchar(180) DEFAULT '@default' NOT NULL, `working` tinyint(1) DEFAULT 0 NOT NULL, `execution_id` int, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
1409
+  (13.4ms) CREATE UNIQUE INDEX `hostname` USING btree ON `kuroko2_workers` (`hostname`, `worker_id`) 
1410
+  (0.1ms) BEGIN
1411
+ SQL (0.2ms) INSERT INTO `kuroko2_schema_migrations` (`version`) VALUES ('12')
1412
+  (0.3ms) COMMIT
1413
+ Migrating to CreateJobDefinitionTags (18)
1414
+ DEPRECATION WARNING: Directly inheriting from ActiveRecord::Migration is deprecated. Please specify the Rails release the migration was written for:
1415
+
1416
+ class CreateJobDefinitionTags < ActiveRecord::Migration[4.2] (called from load at /Users/eisuke-oishi/.rbenv/versions/2.3/bin/rake:23)
1417
+  (8.4ms) CREATE TABLE `kuroko2_job_definition_tags` (`id` int AUTO_INCREMENT PRIMARY KEY, `job_definition_id` int NOT NULL, `tag_id` int NOT NULL, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
1418
+  (12.5ms) CREATE UNIQUE INDEX `kuroko2_definition_tag_idx` USING btree ON `kuroko2_job_definition_tags` (`job_definition_id`, `tag_id`) 
1419
+  (10.9ms) CREATE INDEX `job_definition_tags_tag_id` USING btree ON `kuroko2_job_definition_tags` (`tag_id`) 
1420
+  (0.2ms) BEGIN
1421
+ SQL (0.2ms) INSERT INTO `kuroko2_schema_migrations` (`version`) VALUES ('18')
1422
+  (0.3ms) COMMIT
1423
+ Migrating to CreateTags (19)
1424
+ DEPRECATION WARNING: Directly inheriting from ActiveRecord::Migration is deprecated. Please specify the Rails release the migration was written for:
1425
+
1426
+ class CreateTags < ActiveRecord::Migration[4.2] (called from load at /Users/eisuke-oishi/.rbenv/versions/2.3/bin/rake:23)
1427
+  (9.4ms) CREATE TABLE `kuroko2_tags` (`id` int AUTO_INCREMENT PRIMARY KEY, `name` varchar(100) NOT NULL, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
1428
+  (10.2ms) CREATE UNIQUE INDEX `index_kuroko2_tags_on_name` USING btree ON `kuroko2_tags` (`name`) 
1429
+  (0.2ms) BEGIN
1430
+ SQL (0.2ms) INSERT INTO `kuroko2_schema_migrations` (`version`) VALUES ('19')
1431
+  (0.4ms) COMMIT
1432
+ Migrating to CreateMemoryExpectancies (21)
1433
+ DEPRECATION WARNING: Directly inheriting from ActiveRecord::Migration is deprecated. Please specify the Rails release the migration was written for:
1434
+
1435
+ class CreateMemoryExpectancies < ActiveRecord::Migration[4.2] (called from load at /Users/eisuke-oishi/.rbenv/versions/2.3/bin/rake:23)
1436
+  (9.5ms) CREATE TABLE `kuroko2_memory_expectancies` (`id` int AUTO_INCREMENT PRIMARY KEY, `expected_value` int DEFAULT 0 NOT NULL, `job_definition_id` int, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, INDEX `index_kuroko2_memory_expectancies_on_job_definition_id` (`job_definition_id`)) ENGINE=InnoDB
1437
+  (8.8ms) CREATE TABLE `kuroko2_memory_consumption_logs` (`id` int AUTO_INCREMENT PRIMARY KEY, `job_instance_id` int, `value` int NOT NULL, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, INDEX `index_kuroko2_memory_consumption_logs_on_job_instance_id` (`job_instance_id`)) ENGINE=InnoDB
1438
+  (0.2ms) BEGIN
1439
+ SQL (0.2ms) INSERT INTO `kuroko2_schema_migrations` (`version`) VALUES ('21')
1440
+  (0.4ms) COMMIT
1441
+ Migrating to CreateJobSuspendSchedules (25)
1442
+ DEPRECATION WARNING: Directly inheriting from ActiveRecord::Migration is deprecated. Please specify the Rails release the migration was written for:
1443
+
1444
+ class CreateJobSuspendSchedules < ActiveRecord::Migration[4.2] (called from load at /Users/eisuke-oishi/.rbenv/versions/2.3/bin/rake:23)
1445
+  (8.6ms) CREATE TABLE `kuroko2_job_suspend_schedules` (`id` int AUTO_INCREMENT PRIMARY KEY, `job_definition_id` int, `cron` varchar(180), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
1446
+  (10.0ms) CREATE UNIQUE INDEX `kuroko2_suspend_schedules_definition_id_cron_idx` USING btree ON `kuroko2_job_suspend_schedules` (`job_definition_id`, `cron`) 
1447
+  (0.2ms) BEGIN
1448
+ SQL (0.2ms) INSERT INTO `kuroko2_schema_migrations` (`version`) VALUES ('25')
1449
+  (0.3ms) COMMIT
1450
+ Migrating to AddWebhookUrlToJobDefinitions (26)
1451
+ DEPRECATION WARNING: Directly inheriting from ActiveRecord::Migration is deprecated. Please specify the Rails release the migration was written for:
1452
+
1453
+ class AddWebhookUrlToJobDefinitions < ActiveRecord::Migration[4.2] (called from load at /Users/eisuke-oishi/.rbenv/versions/2.3/bin/rake:23)
1454
+  (19.2ms) ALTER TABLE `kuroko2_job_definitions` ADD `webhook_url` text
1455
+  (0.2ms) BEGIN
1456
+ SQL (0.2ms) INSERT INTO `kuroko2_schema_migrations` (`version`) VALUES ('26')
1457
+  (0.6ms) COMMIT
1458
+ ActiveRecord::InternalMetadata Load (0.3ms) SELECT `kuroko2_ar_internal_metadata`.* FROM `kuroko2_ar_internal_metadata` WHERE `kuroko2_ar_internal_metadata`.`key` = 'environment' LIMIT 1
1459
+  (0.1ms) BEGIN
1460
+ SQL (0.2ms) INSERT INTO `kuroko2_ar_internal_metadata` (`key`, `value`, `created_at`, `updated_at`) VALUES ('environment', 'development', '2016-12-06 09:29:01', '2016-12-06 09:29:01')
1461
+  (0.4ms) COMMIT
1462
+  (0.2ms) SELECT RELEASE_LOCK('4015707761482352670')
1463
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT `kuroko2_schema_migrations`.* FROM `kuroko2_schema_migrations`
1464
+  (0.2ms) SHOW CREATE TABLE `admin_assignments`
1465
+  (0.3ms) SHOW CREATE TABLE `executions`
1466
+  (0.3ms) SHOW TABLE STATUS LIKE 'executions'
1467
+  (0.2ms) SHOW CREATE TABLE `job_definition_tags`
1468
+  (0.2ms) SHOW CREATE TABLE `job_definitions`
1469
+  (0.3ms) SHOW TABLE STATUS LIKE 'job_definitions'
1470
+  (0.2ms) SHOW CREATE TABLE `job_instances`
1471
+  (0.3ms) SHOW TABLE STATUS LIKE 'job_instances'
1472
+  (0.2ms) SHOW CREATE TABLE `job_schedules`
1473
+  (0.4ms) SHOW TABLE STATUS LIKE 'job_schedules'
1474
+  (0.2ms) SHOW CREATE TABLE `job_suspend_schedules`
1475
+  (0.5ms) SHOW TABLE STATUS LIKE 'job_suspend_schedules'
1476
+  (0.2ms) SHOW CREATE TABLE `kuroko2_admin_assignments`
1477
+  (0.2ms) SHOW CREATE TABLE `kuroko2_executions`
1478
+  (0.3ms) SHOW TABLE STATUS LIKE 'kuroko2_executions'
1479
+  (0.2ms) SHOW CREATE TABLE `kuroko2_job_definition_tags`
1480
+  (0.3ms) SHOW CREATE TABLE `kuroko2_job_definitions`
1481
+  (0.4ms) SHOW TABLE STATUS LIKE 'kuroko2_job_definitions'
1482
+  (0.3ms) SHOW CREATE TABLE `kuroko2_job_instances`
1483
+  (0.3ms) SHOW TABLE STATUS LIKE 'kuroko2_job_instances'
1484
+  (0.2ms) SHOW CREATE TABLE `kuroko2_job_schedules`
1485
+  (0.4ms) SHOW TABLE STATUS LIKE 'kuroko2_job_schedules'
1486
+  (0.3ms) SHOW CREATE TABLE `kuroko2_job_suspend_schedules`
1487
+  (0.3ms) SHOW TABLE STATUS LIKE 'kuroko2_job_suspend_schedules'
1488
+  (0.2ms) SHOW CREATE TABLE `kuroko2_logs`
1489
+  (0.3ms) SHOW TABLE STATUS LIKE 'kuroko2_logs'
1490
+  (0.2ms) SHOW CREATE TABLE `kuroko2_memory_consumption_logs`
1491
+  (0.3ms) SHOW CREATE TABLE `kuroko2_memory_expectancies`
1492
+  (0.2ms) SHOW CREATE TABLE `kuroko2_process_signals`
1493
+  (0.3ms) SHOW TABLE STATUS LIKE 'kuroko2_process_signals'
1494
+  (0.2ms) SHOW CREATE TABLE `kuroko2_stars`
1495
+  (0.2ms) SHOW CREATE TABLE `kuroko2_tags`
1496
+  (0.3ms) SHOW TABLE STATUS LIKE 'kuroko2_tags'
1497
+  (0.2ms) SHOW CREATE TABLE `kuroko2_ticks`
1498
+  (0.2ms) SHOW CREATE TABLE `kuroko2_tokens`
1499
+  (0.4ms) SHOW TABLE STATUS LIKE 'kuroko2_tokens'
1500
+  (0.2ms) SHOW CREATE TABLE `kuroko2_users`
1501
+  (0.4ms) SHOW TABLE STATUS LIKE 'kuroko2_users'
1502
+  (0.2ms) SHOW CREATE TABLE `kuroko2_workers`
1503
+  (0.4ms) SHOW TABLE STATUS LIKE 'kuroko2_workers'
1504
+  (0.2ms) SHOW CREATE TABLE `logs`
1505
+  (0.3ms) SHOW TABLE STATUS LIKE 'logs'
1506
+  (0.3ms) SHOW CREATE TABLE `memory_consumption_logs`
1507
+  (0.2ms) SHOW CREATE TABLE `memory_expectancies`
1508
+  (0.3ms) SHOW CREATE TABLE `process_signals`
1509
+  (0.3ms) SHOW TABLE STATUS LIKE 'process_signals'
1510
+  (0.2ms) SHOW CREATE TABLE `stars`
1511
+  (0.2ms) SHOW CREATE TABLE `tags`
1512
+  (0.3ms) SHOW TABLE STATUS LIKE 'tags'
1513
+  (0.2ms) SHOW CREATE TABLE `ticks`
1514
+  (0.2ms) SHOW CREATE TABLE `tokens`
1515
+  (0.3ms) SHOW TABLE STATUS LIKE 'tokens'
1516
+  (0.2ms) SHOW CREATE TABLE `users`
1517
+  (0.3ms) SHOW TABLE STATUS LIKE 'users'
1518
+  (0.2ms) SHOW CREATE TABLE `workers`
1519
+  (0.3ms) SHOW TABLE STATUS LIKE 'workers'
1520
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
1521
+ ,fk.referenced_column_name as 'primary_key'
1522
+ ,fk.column_name as 'column'
1523
+ ,fk.constraint_name as 'name'
1524
+ FROM information_schema.key_column_usage fk
1525
+ WHERE fk.referenced_column_name is not null
1526
+ AND fk.table_schema = 'kuroko2_dummy_development'
1527
+ AND fk.table_name = 'admin_assignments'
1528
+ 
1529
+  (0.4ms) SELECT fk.referenced_table_name as 'to_table'
1530
+ ,fk.referenced_column_name as 'primary_key'
1531
+ ,fk.column_name as 'column'
1532
+ ,fk.constraint_name as 'name'
1533
+ FROM information_schema.key_column_usage fk
1534
+ WHERE fk.referenced_column_name is not null
1535
+ AND fk.table_schema = 'kuroko2_dummy_development'
1536
+ AND fk.table_name = 'executions'
1537
+ 
1538
+  (0.4ms) SELECT fk.referenced_table_name as 'to_table'
1539
+ ,fk.referenced_column_name as 'primary_key'
1540
+ ,fk.column_name as 'column'
1541
+ ,fk.constraint_name as 'name'
1542
+ FROM information_schema.key_column_usage fk
1543
+ WHERE fk.referenced_column_name is not null
1544
+ AND fk.table_schema = 'kuroko2_dummy_development'
1545
+ AND fk.table_name = 'job_definition_tags'
1546
+ 
1547
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
1548
+ ,fk.referenced_column_name as 'primary_key'
1549
+ ,fk.column_name as 'column'
1550
+ ,fk.constraint_name as 'name'
1551
+ FROM information_schema.key_column_usage fk
1552
+ WHERE fk.referenced_column_name is not null
1553
+ AND fk.table_schema = 'kuroko2_dummy_development'
1554
+ AND fk.table_name = 'job_definitions'
1555
+ 
1556
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
1557
+ ,fk.referenced_column_name as 'primary_key'
1558
+ ,fk.column_name as 'column'
1559
+ ,fk.constraint_name as 'name'
1560
+ FROM information_schema.key_column_usage fk
1561
+ WHERE fk.referenced_column_name is not null
1562
+ AND fk.table_schema = 'kuroko2_dummy_development'
1563
+ AND fk.table_name = 'job_instances'
1564
+ 
1565
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
1566
+ ,fk.referenced_column_name as 'primary_key'
1567
+ ,fk.column_name as 'column'
1568
+ ,fk.constraint_name as 'name'
1569
+ FROM information_schema.key_column_usage fk
1570
+ WHERE fk.referenced_column_name is not null
1571
+ AND fk.table_schema = 'kuroko2_dummy_development'
1572
+ AND fk.table_name = 'job_schedules'
1573
+ 
1574
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
1575
+ ,fk.referenced_column_name as 'primary_key'
1576
+ ,fk.column_name as 'column'
1577
+ ,fk.constraint_name as 'name'
1578
+ FROM information_schema.key_column_usage fk
1579
+ WHERE fk.referenced_column_name is not null
1580
+ AND fk.table_schema = 'kuroko2_dummy_development'
1581
+ AND fk.table_name = 'job_suspend_schedules'
1582
+ 
1583
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
1584
+ ,fk.referenced_column_name as 'primary_key'
1585
+ ,fk.column_name as 'column'
1586
+ ,fk.constraint_name as 'name'
1587
+ FROM information_schema.key_column_usage fk
1588
+ WHERE fk.referenced_column_name is not null
1589
+ AND fk.table_schema = 'kuroko2_dummy_development'
1590
+ AND fk.table_name = 'kuroko2_admin_assignments'
1591
+ 
1592
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
1593
+ ,fk.referenced_column_name as 'primary_key'
1594
+ ,fk.column_name as 'column'
1595
+ ,fk.constraint_name as 'name'
1596
+ FROM information_schema.key_column_usage fk
1597
+ WHERE fk.referenced_column_name is not null
1598
+ AND fk.table_schema = 'kuroko2_dummy_development'
1599
+ AND fk.table_name = 'kuroko2_executions'
1600
+ 
1601
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
1602
+ ,fk.referenced_column_name as 'primary_key'
1603
+ ,fk.column_name as 'column'
1604
+ ,fk.constraint_name as 'name'
1605
+ FROM information_schema.key_column_usage fk
1606
+ WHERE fk.referenced_column_name is not null
1607
+ AND fk.table_schema = 'kuroko2_dummy_development'
1608
+ AND fk.table_name = 'kuroko2_job_definition_tags'
1609
+ 
1610
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
1611
+ ,fk.referenced_column_name as 'primary_key'
1612
+ ,fk.column_name as 'column'
1613
+ ,fk.constraint_name as 'name'
1614
+ FROM information_schema.key_column_usage fk
1615
+ WHERE fk.referenced_column_name is not null
1616
+ AND fk.table_schema = 'kuroko2_dummy_development'
1617
+ AND fk.table_name = 'kuroko2_job_definitions'
1618
+ 
1619
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
1620
+ ,fk.referenced_column_name as 'primary_key'
1621
+ ,fk.column_name as 'column'
1622
+ ,fk.constraint_name as 'name'
1623
+ FROM information_schema.key_column_usage fk
1624
+ WHERE fk.referenced_column_name is not null
1625
+ AND fk.table_schema = 'kuroko2_dummy_development'
1626
+ AND fk.table_name = 'kuroko2_job_instances'
1627
+ 
1628
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
1629
+ ,fk.referenced_column_name as 'primary_key'
1630
+ ,fk.column_name as 'column'
1631
+ ,fk.constraint_name as 'name'
1632
+ FROM information_schema.key_column_usage fk
1633
+ WHERE fk.referenced_column_name is not null
1634
+ AND fk.table_schema = 'kuroko2_dummy_development'
1635
+ AND fk.table_name = 'kuroko2_job_schedules'
1636
+ 
1637
+  (0.4ms) SELECT fk.referenced_table_name as 'to_table'
1638
+ ,fk.referenced_column_name as 'primary_key'
1639
+ ,fk.column_name as 'column'
1640
+ ,fk.constraint_name as 'name'
1641
+ FROM information_schema.key_column_usage fk
1642
+ WHERE fk.referenced_column_name is not null
1643
+ AND fk.table_schema = 'kuroko2_dummy_development'
1644
+ AND fk.table_name = 'kuroko2_job_suspend_schedules'
1645
+ 
1646
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
1647
+ ,fk.referenced_column_name as 'primary_key'
1648
+ ,fk.column_name as 'column'
1649
+ ,fk.constraint_name as 'name'
1650
+ FROM information_schema.key_column_usage fk
1651
+ WHERE fk.referenced_column_name is not null
1652
+ AND fk.table_schema = 'kuroko2_dummy_development'
1653
+ AND fk.table_name = 'kuroko2_logs'
1654
+ 
1655
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
1656
+ ,fk.referenced_column_name as 'primary_key'
1657
+ ,fk.column_name as 'column'
1658
+ ,fk.constraint_name as 'name'
1659
+ FROM information_schema.key_column_usage fk
1660
+ WHERE fk.referenced_column_name is not null
1661
+ AND fk.table_schema = 'kuroko2_dummy_development'
1662
+ AND fk.table_name = 'kuroko2_memory_consumption_logs'
1663
+ 
1664
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
1665
+ ,fk.referenced_column_name as 'primary_key'
1666
+ ,fk.column_name as 'column'
1667
+ ,fk.constraint_name as 'name'
1668
+ FROM information_schema.key_column_usage fk
1669
+ WHERE fk.referenced_column_name is not null
1670
+ AND fk.table_schema = 'kuroko2_dummy_development'
1671
+ AND fk.table_name = 'kuroko2_memory_expectancies'
1672
+ 
1673
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
1674
+ ,fk.referenced_column_name as 'primary_key'
1675
+ ,fk.column_name as 'column'
1676
+ ,fk.constraint_name as 'name'
1677
+ FROM information_schema.key_column_usage fk
1678
+ WHERE fk.referenced_column_name is not null
1679
+ AND fk.table_schema = 'kuroko2_dummy_development'
1680
+ AND fk.table_name = 'kuroko2_process_signals'
1681
+ 
1682
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
1683
+ ,fk.referenced_column_name as 'primary_key'
1684
+ ,fk.column_name as 'column'
1685
+ ,fk.constraint_name as 'name'
1686
+ FROM information_schema.key_column_usage fk
1687
+ WHERE fk.referenced_column_name is not null
1688
+ AND fk.table_schema = 'kuroko2_dummy_development'
1689
+ AND fk.table_name = 'kuroko2_stars'
1690
+ 
1691
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
1692
+ ,fk.referenced_column_name as 'primary_key'
1693
+ ,fk.column_name as 'column'
1694
+ ,fk.constraint_name as 'name'
1695
+ FROM information_schema.key_column_usage fk
1696
+ WHERE fk.referenced_column_name is not null
1697
+ AND fk.table_schema = 'kuroko2_dummy_development'
1698
+ AND fk.table_name = 'kuroko2_tags'
1699
+ 
1700
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
1701
+ ,fk.referenced_column_name as 'primary_key'
1702
+ ,fk.column_name as 'column'
1703
+ ,fk.constraint_name as 'name'
1704
+ FROM information_schema.key_column_usage fk
1705
+ WHERE fk.referenced_column_name is not null
1706
+ AND fk.table_schema = 'kuroko2_dummy_development'
1707
+ AND fk.table_name = 'kuroko2_ticks'
1708
+ 
1709
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
1710
+ ,fk.referenced_column_name as 'primary_key'
1711
+ ,fk.column_name as 'column'
1712
+ ,fk.constraint_name as 'name'
1713
+ FROM information_schema.key_column_usage fk
1714
+ WHERE fk.referenced_column_name is not null
1715
+ AND fk.table_schema = 'kuroko2_dummy_development'
1716
+ AND fk.table_name = 'kuroko2_tokens'
1717
+ 
1718
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
1719
+ ,fk.referenced_column_name as 'primary_key'
1720
+ ,fk.column_name as 'column'
1721
+ ,fk.constraint_name as 'name'
1722
+ FROM information_schema.key_column_usage fk
1723
+ WHERE fk.referenced_column_name is not null
1724
+ AND fk.table_schema = 'kuroko2_dummy_development'
1725
+ AND fk.table_name = 'kuroko2_users'
1726
+ 
1727
+  (0.4ms) SELECT fk.referenced_table_name as 'to_table'
1728
+ ,fk.referenced_column_name as 'primary_key'
1729
+ ,fk.column_name as 'column'
1730
+ ,fk.constraint_name as 'name'
1731
+ FROM information_schema.key_column_usage fk
1732
+ WHERE fk.referenced_column_name is not null
1733
+ AND fk.table_schema = 'kuroko2_dummy_development'
1734
+ AND fk.table_name = 'kuroko2_workers'
1735
+ 
1736
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
1737
+ ,fk.referenced_column_name as 'primary_key'
1738
+ ,fk.column_name as 'column'
1739
+ ,fk.constraint_name as 'name'
1740
+ FROM information_schema.key_column_usage fk
1741
+ WHERE fk.referenced_column_name is not null
1742
+ AND fk.table_schema = 'kuroko2_dummy_development'
1743
+ AND fk.table_name = 'logs'
1744
+ 
1745
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
1746
+ ,fk.referenced_column_name as 'primary_key'
1747
+ ,fk.column_name as 'column'
1748
+ ,fk.constraint_name as 'name'
1749
+ FROM information_schema.key_column_usage fk
1750
+ WHERE fk.referenced_column_name is not null
1751
+ AND fk.table_schema = 'kuroko2_dummy_development'
1752
+ AND fk.table_name = 'memory_consumption_logs'
1753
+ 
1754
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
1755
+ ,fk.referenced_column_name as 'primary_key'
1756
+ ,fk.column_name as 'column'
1757
+ ,fk.constraint_name as 'name'
1758
+ FROM information_schema.key_column_usage fk
1759
+ WHERE fk.referenced_column_name is not null
1760
+ AND fk.table_schema = 'kuroko2_dummy_development'
1761
+ AND fk.table_name = 'memory_expectancies'
1762
+ 
1763
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
1764
+ ,fk.referenced_column_name as 'primary_key'
1765
+ ,fk.column_name as 'column'
1766
+ ,fk.constraint_name as 'name'
1767
+ FROM information_schema.key_column_usage fk
1768
+ WHERE fk.referenced_column_name is not null
1769
+ AND fk.table_schema = 'kuroko2_dummy_development'
1770
+ AND fk.table_name = 'process_signals'
1771
+ 
1772
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
1773
+ ,fk.referenced_column_name as 'primary_key'
1774
+ ,fk.column_name as 'column'
1775
+ ,fk.constraint_name as 'name'
1776
+ FROM information_schema.key_column_usage fk
1777
+ WHERE fk.referenced_column_name is not null
1778
+ AND fk.table_schema = 'kuroko2_dummy_development'
1779
+ AND fk.table_name = 'stars'
1780
+ 
1781
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
1782
+ ,fk.referenced_column_name as 'primary_key'
1783
+ ,fk.column_name as 'column'
1784
+ ,fk.constraint_name as 'name'
1785
+ FROM information_schema.key_column_usage fk
1786
+ WHERE fk.referenced_column_name is not null
1787
+ AND fk.table_schema = 'kuroko2_dummy_development'
1788
+ AND fk.table_name = 'tags'
1789
+ 
1790
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
1791
+ ,fk.referenced_column_name as 'primary_key'
1792
+ ,fk.column_name as 'column'
1793
+ ,fk.constraint_name as 'name'
1794
+ FROM information_schema.key_column_usage fk
1795
+ WHERE fk.referenced_column_name is not null
1796
+ AND fk.table_schema = 'kuroko2_dummy_development'
1797
+ AND fk.table_name = 'ticks'
1798
+ 
1799
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
1800
+ ,fk.referenced_column_name as 'primary_key'
1801
+ ,fk.column_name as 'column'
1802
+ ,fk.constraint_name as 'name'
1803
+ FROM information_schema.key_column_usage fk
1804
+ WHERE fk.referenced_column_name is not null
1805
+ AND fk.table_schema = 'kuroko2_dummy_development'
1806
+ AND fk.table_name = 'tokens'
1807
+ 
1808
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
1809
+ ,fk.referenced_column_name as 'primary_key'
1810
+ ,fk.column_name as 'column'
1811
+ ,fk.constraint_name as 'name'
1812
+ FROM information_schema.key_column_usage fk
1813
+ WHERE fk.referenced_column_name is not null
1814
+ AND fk.table_schema = 'kuroko2_dummy_development'
1815
+ AND fk.table_name = 'users'
1816
+ 
1817
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
1818
+ ,fk.referenced_column_name as 'primary_key'
1819
+ ,fk.column_name as 'column'
1820
+ ,fk.constraint_name as 'name'
1821
+ FROM information_schema.key_column_usage fk
1822
+ WHERE fk.referenced_column_name is not null
1823
+ AND fk.table_schema = 'kuroko2_dummy_development'
1824
+ AND fk.table_name = 'workers'
682
1825