Sha256: 6c20d9752284e8f84b228af046808ec53c72fabd5019d17471f09766fa6f0c66

Contents?: true

Size: 354 Bytes

Versions: 13

Compression:

Stored size: 354 Bytes

Contents

class CreateQuestions < ActiveRecord::Migration
  def change
    create_table :questions do |t|
      t.belongs_to :asker, :polymorphic => true
      t.string :type
      t.string :name
      t.text :instructions
      t.boolean :required
      t.integer :position

      t.timestamps
    end
    add_index :questions, [:asker_id, :asker_type]
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
ask-0.5.4 db/migrate/20110913214410_create_questions.rb
ask-0.5.3 db/migrate/20110913214410_create_questions.rb
ask-0.5.2 db/migrate/20110913214410_create_questions.rb
ask-0.5.1 db/migrate/20110913214410_create_questions.rb
ask-0.5.0 db/migrate/20110913214410_create_questions.rb
ask-0.4.1 db/migrate/20110913214410_create_questions.rb
ask-0.4.0 db/migrate/20110913214410_create_questions.rb
ask-0.3.1 db/migrate/20110913214410_create_questions.rb
ask-0.3.0 db/migrate/20110913214410_create_questions.rb
ask-0.2.0 db/migrate/20110913214410_create_questions.rb
ask-0.1.2 db/migrate/20110913214410_create_questions.rb
ask-0.1.1 db/migrate/20110913214410_create_questions.rb
ask-0.1.0 db/migrate/20110913214410_create_questions.rb