diff --git a/db/migrate/20170322145702_create_site_customization_images.rb b/db/migrate/20170322145702_create_site_customization_images.rb index 749601f46..4f468d81a 100644 --- a/db/migrate/20170322145702_create_site_customization_images.rb +++ b/db/migrate/20170322145702_create_site_customization_images.rb @@ -2,7 +2,10 @@ class CreateSiteCustomizationImages < ActiveRecord::Migration[4.2] def change create_table :site_customization_images do |t| t.string :name, null: false - t.attachment :image + t.string :image_file_name + t.string :image_content_type + t.integer :image_file_size + t.datetime :image_updated_at t.timestamps null: false end diff --git a/db/migrate/20170627113331_create_images.rb b/db/migrate/20170627113331_create_images.rb index e82e3cd14..5f0d0e5e4 100644 --- a/db/migrate/20170627113331_create_images.rb +++ b/db/migrate/20170627113331_create_images.rb @@ -1,14 +1,13 @@ class CreateImages < ActiveRecord::Migration[4.2] - def up + def change create_table :images do |t| t.references :imageable, polymorphic: true, index: true t.string :title, limit: 80 t.timestamps null: false + t.string :attachment_file_name + t.string :attachment_content_type + t.integer :attachment_file_size + t.datetime :attachment_updated_at end - add_attachment :images, :attachment - end - - def down - remove_attachment :images, :attachment end end diff --git a/db/migrate/20170720092638_create_documents.rb b/db/migrate/20170720092638_create_documents.rb index 429487def..cd8a9461c 100644 --- a/db/migrate/20170720092638_create_documents.rb +++ b/db/migrate/20170720092638_create_documents.rb @@ -2,7 +2,10 @@ class CreateDocuments < ActiveRecord::Migration[4.2] def change create_table :documents do |t| t.string :title - t.attachment :attachment + t.string :attachment_file_name + t.string :attachment_content_type + t.integer :attachment_file_size + t.datetime :attachment_updated_at t.references :user, index: true, foreign_key: true t.references :documentable, polymorphic: true, index: true