Commit 6ab05a6c by Bui Minh Duc

add migrate

parent 1219931c
...@@ -63,7 +63,28 @@ ...@@ -63,7 +63,28 @@
<h4><b>After Release</b></h4> <h4><b>After Release</b></h4>
</div> </div>
<div class="panel-body"> <div class="panel-body">
<div class="panel panel-default">
<div class="panel-heading">
<h5><b>Add a comment</b></h5>
</div>
<div class="panel-body">
<%= form_for :comment, html: { class: "form-horizontal" } do |f| %>
<div class="form-group">
<div class="col-md-12">
<%= f.text_area :content, { class: "form-control", rows: 4 } %>
</div>
</div>
<div class="form-group">
<div class="col-md-2" style="float: right;">
<%= f.submit "Submit", class: "btn btn-default", style: "float: right;" %>
</div>
<div class="col-md-3" style="float: right;">
<%= f.select("score", @options.collect { |x| [ x[:type], x[:id] ] }, {}, { class: 'form-control', style: "float: right;" }) %>
</div>
</div>
<% end %>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
......
class AddCommentTypeToComment < ActiveRecord::Migration[5.0]
def change
add_column :comments, :comment_type, :integer
end
end
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20170105072651) do ActiveRecord::Schema.define(version: 20170110090046) do
create_table "comments", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin" do |t| create_table "comments", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin" do |t|
t.string "html_url" t.string "html_url"
...@@ -20,6 +20,7 @@ ActiveRecord::Schema.define(version: 20170105072651) do ...@@ -20,6 +20,7 @@ ActiveRecord::Schema.define(version: 20170105072651) do
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.integer "score" t.integer "score"
t.integer "comment_type"
t.index ["issue_id"], name: "index_comments_on_issue_id", using: :btree t.index ["issue_id"], name: "index_comments_on_issue_id", using: :btree
t.index ["user_id"], name: "index_comments_on_user_id", using: :btree t.index ["user_id"], name: "index_comments_on_user_id", using: :btree
end end
......
...@@ -276,3 +276,18 @@ I, [2017-01-10T13:00:03.608363 #27772] INFO -- : Insert issues ...@@ -276,3 +276,18 @@ I, [2017-01-10T13:00:03.608363 #27772] INFO -- : Insert issues
I, [2017-01-10T13:01:28.410465 #27772] INFO -- : Insert comments I, [2017-01-10T13:01:28.410465 #27772] INFO -- : Insert comments
I, [2017-01-10T13:01:55.061141 #27772] INFO -- : Insert review comments I, [2017-01-10T13:01:55.061141 #27772] INFO -- : Insert review comments
I, [2017-01-10T13:02:31.595250 #27772] INFO -- : Finished task update in 148.130826818s I, [2017-01-10T13:02:31.595250 #27772] INFO -- : Finished task update in 148.130826818s
I, [2017-01-10T14:00:13.928291 #4374] INFO -- : Begin task update ["socialtools", "arubaito-ex", "kuruma-ex", "arubaito_v2"]
I, [2017-01-10T14:00:13.933719 #4374] INFO -- : Insert issues
I, [2017-01-10T14:05:53.654461 #4374] INFO -- : Insert comments
I, [2017-01-10T14:06:19.335852 #4374] INFO -- : Insert review comments
I, [2017-01-10T14:07:01.872375 #4374] INFO -- : Finished task update in 408.222491527s
I, [2017-01-10T15:00:03.363733 #8859] INFO -- : Begin task update ["socialtools", "arubaito-ex", "kuruma-ex", "arubaito_v2"]
I, [2017-01-10T15:00:03.367145 #8859] INFO -- : Insert issues
I, [2017-01-10T15:01:32.174729 #8859] INFO -- : Insert comments
I, [2017-01-10T15:01:57.686532 #8859] INFO -- : Insert review comments
I, [2017-01-10T15:02:34.054672 #8859] INFO -- : Finished task update in 150.826330827s
I, [2017-01-10T16:00:03.543468 #12160] INFO -- : Begin task update ["socialtools", "arubaito-ex", "kuruma-ex", "arubaito_v2"]
I, [2017-01-10T16:00:03.546840 #12160] INFO -- : Insert issues
I, [2017-01-10T16:01:30.623132 #12160] INFO -- : Insert comments
I, [2017-01-10T16:01:56.175452 #12160] INFO -- : Insert review comments
I, [2017-01-10T16:02:32.874671 #12160] INFO -- : Finished task update in 149.500008173s
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment