From 69ae7e384595ea941a6e8330ba9346cf226a7e1f Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 23 Feb 2016 15:45:19 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E9=99=84=E4=BB=B6=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E6=9B=B4=E6=96=B0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20160223073859_add_publish_to_attachment_histories.rb | 6 ++++++ db/schema.rb | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 db/migrate/20160223073859_add_publish_to_attachment_histories.rb diff --git a/db/migrate/20160223073859_add_publish_to_attachment_histories.rb b/db/migrate/20160223073859_add_publish_to_attachment_histories.rb new file mode 100644 index 000000000..81533004f --- /dev/null +++ b/db/migrate/20160223073859_add_publish_to_attachment_histories.rb @@ -0,0 +1,6 @@ +class AddPublishToAttachmentHistories < ActiveRecord::Migration + def change + add_column :attachment_histories, :is_publish, :integer, :default => 1 + add_column :attachment_histories, :publish_time, :date + end +end diff --git a/db/schema.rb b/db/schema.rb index c22b79790..db33479a5 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20160220100507) do +ActiveRecord::Schema.define(:version => 20160223073859) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false @@ -99,6 +99,8 @@ ActiveRecord::Schema.define(:version => 20160220100507) do t.integer "quotes" t.integer "version" t.integer "attachment_id" + t.integer "is_publish", :default => 1 + t.date "publish_time" end create_table "attachments", :force => true do |t| @@ -118,6 +120,8 @@ ActiveRecord::Schema.define(:version => 20160220100507) do t.integer "is_public", :default => 1 t.integer "copy_from" t.integer "quotes" + t.integer "is_publish", :default => 1 + t.date "publish_time" end add_index "attachments", ["author_id"], :name => "index_attachments_on_author_id" @@ -1373,7 +1377,6 @@ ActiveRecord::Schema.define(:version => 20160220100507) do t.integer "changeset_num", :default => 0 t.integer "board_message_num", :default => 0 t.integer "board_num", :default => 0 - t.integer "act_num", :default => 0 t.integer "attach_num", :default => 0 t.datetime "commit_time" end