Sha256: f5dae12e6d81ce4daf5e4e1f909a14834ba3e6f9a537b4a5d914c7413212d595

Contents?: true

Size: 526 Bytes

Versions: 46

Compression:

Stored size: 526 Bytes

Contents

class CreateDependencies < ActiveRecord::Migration
  def self.up
    create_table :dependencies do |t|
      # Context
      t.integer :question_id # the dependent question
      t.integer :question_group_id
      
      # Conditional
      t.string :rule

      # Result - TODO: figure out the dependency hook presentation options
      # t.string :property_to_toggle # visibility, class_name,
      # t.string :effect #blind, opacity

      t.timestamps
    end
  end

  def self.down
    drop_table :dependencies
  end
end

Version data entries

46 entries across 44 versions & 3 rubygems

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