历史资源模型修改
This commit is contained in:
parent
fd4d2910d0
commit
90c63192e6
|
@ -519,6 +519,10 @@ class Attachment < ActiveRecord::Base
|
|||
end
|
||||
end
|
||||
|
||||
#更新文件的版本
|
||||
def update_attchment_version
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
# Physically deletes the file from the file system
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
class AttachmentHistory < ActiveRecord::Base
|
||||
belongs_to :attachment,foreign_key: 'attach_id'
|
||||
belongs_to :attachment,foreign_key: 'attachment_id'
|
||||
end
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
class RenameAttachmentHistoriesColumnVersionIdToAttachmentId < ActiveRecord::Migration
|
||||
def up
|
||||
rename_column :attachment_histories,:version_id,:attachment_id
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20151229045505) do
|
||||
ActiveRecord::Schema.define(:version => 20151230022443) do
|
||||
|
||||
create_table "activities", :force => true do |t|
|
||||
t.integer "act_id", :null => false
|
||||
|
@ -98,7 +98,7 @@ ActiveRecord::Schema.define(:version => 20151229045505) do
|
|||
t.integer "copy_from"
|
||||
t.integer "quotes"
|
||||
t.integer "version"
|
||||
t.integer "version_id"
|
||||
t.integer "attachment_id"
|
||||
end
|
||||
|
||||
create_table "attachments", :force => true do |t|
|
||||
|
|
Loading…
Reference in New Issue