Sha256: 26c9bbfcc6c1cb5316a52cac66a60a0b719934516410b24d386553f2f55ac9dd

Contents?: true

Size: 584 Bytes

Versions: 6

Compression:

Stored size: 584 Bytes

Contents

class CreateCasMediaFiles < ActiveRecord::Migration[5.0]
  def change
    create_table :cas_media_files, id: :uuid do |t|
      t.uuid :attachable_id, polymorphic: true
      t.string :attachable_type, polymorphic: true
      t.uuid :author_id, null: false
      t.string :service, null: false
      t.text :title
      t.string :url
      t.string :mime_type
      t.string :original_name
      t.integer :size
      t.text :file_data

      t.timestamps
    end
    add_index :cas_media_files, :author_id
    add_index :cas_media_files, [:attachable_id, :attachable_type]
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
cas-cms-1.0.0.alpha2 db/migrate/20170613174724_create_cas_media_files.rb
cas-cms-1.0.0.alpha1 db/migrate/20170613174724_create_cas_media_files.rb
cas-cms-0.1.3 db/migrate/20170613174724_create_cas_media_files.rb
cas-cms-0.1.2 db/migrate/20170613174724_create_cas_media_files.rb
cas-cms-0.1.1 db/migrate/20170613174724_create_cas_media_files.rb
cas-cms-0.1.0 db/migrate/20170613174724_create_cas_media_files.rb