Sha256: 8e3cf3431ce91a18561c904501e951ed41ea89f46e04d20c47ff196e4c785310

Contents?: true

Size: 544 Bytes

Versions: 4

Compression:

Stored size: 544 Bytes

Contents

class CreateImports < ActiveRecord::Migration
  def self.up
    create_table :imports do |t| 
      t.string :type
      t.text :input
      t.text :parameters
      t.string :email
      t.integer :author_id
      t.string :parent_type
      t.integer :parent_id
      t.text :exception
      t.string :state
      t.timestamps
    end  

    change_table :imports do |t|
      t.index :type
      t.index :author_id
      t.index [:parent_type, :parent_id]
      t.index :state
    end
  end

  def self.down
    drop_table :imports
  end
end

Version data entries

4 entries across 2 versions & 1 rubygems

Version Path
import-0.0.3 lib/generators/import/install/templates/migrations/1_create_imports.rb
import-0.0.3 spec/dummy/db/migrate/20110925192802_create_imports.rb
import-0.0.2 lib/generators/import/install/templates/migrations/1_create_imports.rb
import-0.0.2 spec/dummy/db/migrate/20110925192802_create_imports.rb