Sha256: 9a12976e7d0c02098f30526439b658bb3bbcc44774c67f1a07ba67d2b94f0745

Contents?: true

Size: 968 Bytes

Versions: 661

Compression:

Stored size: 968 Bytes

Contents

# This migration comes from active_storage (originally 20170806125915)
class CreateActiveStorageTables < ActiveRecord::Migration[5.2]
  def change
    create_table :active_storage_blobs do |t|
      t.string   :key,        null: false
      t.string   :filename,   null: false
      t.string   :content_type
      t.text     :metadata
      t.bigint   :byte_size,  null: false
      t.string   :checksum,   null: false
      t.datetime :created_at, null: false

      t.index [ :key ], unique: true
    end

    create_table :active_storage_attachments do |t|
      t.string     :name,     null: false
      t.references :record,   null: false, polymorphic: true, index: false
      t.references :blob,     null: false

      t.datetime :created_at, null: false

      t.index [ :record_type, :record_id, :name, :blob_id ], name: "index_active_storage_attachments_uniqueness", unique: true
      t.foreign_key :active_storage_blobs, column: :blob_id
    end
  end
end

Version data entries

661 entries across 566 versions & 39 rubygems

Version Path
tessa-6.1.3 spec/dummy/db/migrate/20220606221557_create_active_storage_tables.active_storage.rb
tessa-6.1.2 spec/dummy/db/migrate/20220606221557_create_active_storage_tables.active_storage.rb
action_mailbox_amazon_ingress-0.2.0 db/migrate/20200508151055_create_active_storage_tables.active_storage.rb
tessa-6.1.1 spec/dummy/db/migrate/20220606221557_create_active_storage_tables.active_storage.rb
tessa-6.1.0 spec/dummy/db/migrate/20220606221557_create_active_storage_tables.active_storage.rb
tessa-6.0.3 spec/dummy/db/migrate/20220606221557_create_active_storage_tables.active_storage.rb
tessa-6.0.2 spec/dummy/db/migrate/20220606221557_create_active_storage_tables.active_storage.rb
tessa-6.0.1 spec/dummy/db/migrate/20220606221557_create_active_storage_tables.active_storage.rb
tessa-6.0.0 spec/dummy/db/migrate/20220606221557_create_active_storage_tables.active_storage.rb
blog_app-0.0.1 db/migrate/20220907114823_create_active_storage_tables.active_storage.rb
tessa-6.0.0.rc5 spec/dummy/db/migrate/20220606221557_create_active_storage_tables.active_storage.rb
tessa-6.0.0.rc4 spec/dummy/db/migrate/20220606221557_create_active_storage_tables.active_storage.rb
tessa-6.0.0.rc3 spec/dummy/db/migrate/20220606221557_create_active_storage_tables.active_storage.rb
tessa-6.0.0.rc2 spec/dummy/db/migrate/20220606221557_create_active_storage_tables.active_storage.rb
tessa-6.0.0.rc1 spec/dummy/db/migrate/20220606221557_create_active_storage_tables.active_storage.rb
tessa-1.2.3 spec/dummy/db/migrate/20220606221557_create_active_storage_tables.active_storage.rb
tessa-1.2.2 spec/dummy/db/migrate/20220606221557_create_active_storage_tables.active_storage.rb
tessa-2.0 spec/dummy/db/migrate/20220606221557_create_active_storage_tables.active_storage.rb
tessa-1.2.1 spec/dummy/db/migrate/20220606221557_create_active_storage_tables.active_storage.rb
tessa-1.2.0 spec/dummy/db/migrate/20220606221557_create_active_storage_tables.active_storage.rb