Sha256: 21b4437ae952405a03393596c0f9c858edd7e2046a4ee9184ad353c8ac84c2ee
Contents?: true
Size: 824 Bytes
Versions: 19
Compression:
Stored size: 824 Bytes
Contents
class AddIdsToQuestionnairesQuestions < ActiveRecord::Migration def up add_column qq_table, :id, :primary_key add_column qq_table, :position, :integer add_column qq_table, :created_at, :datetime add_column qq_table, :updated_at, :datetime execute "UPDATE #{qq_table} SET created_at = '#{Time.now.to_s(:db)}', updated_at = '#{Time.now.to_s(:db)}';" puts "==============================================" puts "Now run 'rake qwester:reset_positions RAILS_ENV=#{Rails.env}' to set the positions" puts "==============================================" end def down remove_column qq_table, :id remove_column qq_table, :position remove_column qq_table, :created_at remove_column qq_table, :updated_at end def qq_table :qwester_questionnaires_questions end end
Version data entries
19 entries across 19 versions & 1 rubygems