Sha256: fb595f0bf5e51a52baeefafb766e8d6e5b93d51e4241eefbeb50c3be93fa41e0

Contents?: true

Size: 687 Bytes

Versions: 44

Compression:

Stored size: 687 Bytes

Contents

class CreateValidationConditions < ActiveRecord::Migration
  def self.up
    create_table :validation_conditions do |t|
      # Context
      t.integer :validation_id
      t.string :rule_key
      
      # Conditional    
      t.string :operator
      
      # Optional external reference
      t.integer :question_id
      t.integer :answer_id

      # Value
      t.datetime :datetime_value
      t.integer :integer_value
      t.float :float_value
      t.string :unit
      t.text :text_value
      t.string :string_value
      t.string :response_other
      t.string :regexp
      
      t.timestamps
    end
  end

  def self.down
    drop_table :validation_conditions
  end
end

Version data entries

44 entries across 42 versions & 3 rubygems

Version Path
surveyor-0.22.0 lib/generators/surveyor/templates/db/migrate/create_validation_conditions.rb
surveyor-0.21.0 lib/generators/surveyor/templates/db/migrate/create_validation_conditions.rb
surveyor-0.20.0 generators/surveyor/templates/migrate/create_validation_conditions.rb
surveyor-0.19.7 generators/surveyor/templates/migrate/create_validation_conditions.rb
surveyor-0.19.6 generators/surveyor/templates/migrate/create_validation_conditions.rb
surveyor-0.19.5 generators/surveyor/templates/migrate/create_validation_conditions.rb
surveyor-0.19.4 generators/surveyor/templates/migrate/create_validation_conditions.rb
surveyor-0.19.3 generators/surveyor/templates/migrate/create_validation_conditions.rb
ccls-surveyor-1.0.0 generators/surveyor/templates/migrate/create_validation_conditions.rb
surveyor-0.19.2 generators/surveyor/templates/migrate/create_validation_conditions.rb
jakewendt-surveyor-0.11.3 generators/surveyor/templates/migrate/create_validation_conditions.rb
surveyor-0.19.1 generators/surveyor/templates/migrate/create_validation_conditions.rb
surveyor-0.19.0 generators/surveyor/templates/migrate/create_validation_conditions.rb
surveyor-0.18.2 generators/surveyor/templates/migrate/create_validation_conditions.rb
surveyor-0.18.1 generators/surveyor/templates/migrate/create_validation_conditions.rb
surveyor-0.18.0 spec/test_app/db/migrate/20101119172436_create_validation_conditions.rb
surveyor-0.18.0 generators/surveyor/templates/migrate/create_validation_conditions.rb
surveyor-0.17.0 spec/test_app/db/migrate/20101119172436_create_validation_conditions.rb
surveyor-0.17.0 generators/surveyor/templates/migrate/create_validation_conditions.rb
surveyor-0.16.1 generators/surveyor/templates/migrate/create_validation_conditions.rb