Sha256: ab062819da5ae51ab865c55fe05f1953233aa2d52822e7dfc9f51140f607cdf7

Contents?: true

Size: 271 Bytes

Versions: 11

Compression:

Stored size: 271 Bytes

Contents

# encoding: UTF-8
class Survey < ActiveRecord::Base; end
class UpdateBlankVersionsOnSurveys < ActiveRecord::Migration
  def self.up
    Survey.where('survey_version IS ?', nil).each do |s|
      s.survey_version = 0
      s.save!
    end
  end

  def self.down
  end
end

Version data entries

11 entries across 11 versions & 4 rubygems

Version Path
upgrade_surveyor-1.4.2 lib/generators/surveyor/templates/db/migrate/update_blank_versions_on_surveys.rb
affectiva-surveyor-1.5.0.pre.disco.2 lib/generators/surveyor/templates/db/migrate/update_blank_versions_on_surveys.rb
hssc_surveyor-1.4.3.pre lib/generators/surveyor/templates/db/migrate/update_blank_versions_on_surveys.rb
hssc_surveyor-1.4.2.pre lib/generators/surveyor/templates/db/migrate/update_blank_versions_on_surveys.rb
hssc_surveyor-1.4.1.pre lib/generators/surveyor/templates/db/migrate/update_blank_versions_on_surveys.rb
surveyor-1.4.0 lib/generators/surveyor/templates/db/migrate/update_blank_versions_on_surveys.rb
surveyor-1.3.0 lib/generators/surveyor/templates/db/migrate/update_blank_versions_on_surveys.rb
surveyor-1.2.0 lib/generators/surveyor/templates/db/migrate/update_blank_versions_on_surveys.rb
surveyor-1.1.0 lib/generators/surveyor/templates/db/migrate/update_blank_versions_on_surveys.rb
surveyor-1.0.1 lib/generators/surveyor/templates/db/migrate/update_blank_versions_on_surveys.rb
surveyor-1.0.0 lib/generators/surveyor/templates/db/migrate/update_blank_versions_on_surveys.rb