Sha256: 308942912e667e488021a0feba926d4edc0b7bee09c64290fbc1ab9259401937

Contents?: true

Size: 576 Bytes

Versions: 1

Compression:

Stored size: 576 Bytes

Contents

class UploadedFiles < ActiveRecord::Migration
  def change
    create_table :uploaded_files do |t|
      t.integer :user_id
      t.references :storage, polymorphic: true

      t.string :title, null: false
      t.string :state, default: :active

      # paperclip
      t.string   :file_file_name
      t.string   :file_content_type
      t.integer  :file_file_size, default: 0
      t.datetime :file_updated_at

      # nested set
      t.integer :parent_id
      t.integer :lft
      t.integer :rgt
      t.integer :depth, default: 0

      t.timestamps
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
the_storages-0.0.1 db/migrate/20130101010101_uploaded_files.rb