Class: AddApiIds

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/surveyor/templates/db/migrate/add_api_ids.rb

Class Method Summary collapse

Class Method Details

.downObject



9
10
11
12
13
# File 'lib/generators/surveyor/templates/db/migrate/add_api_ids.rb', line 9

def self.down
  remove_column :surveys, :api_id
  remove_column :questions, :api_id
  remove_column :answers, :api_id
end

.upObject



3
4
5
6
7
# File 'lib/generators/surveyor/templates/db/migrate/add_api_ids.rb', line 3

def self.up
  add_column :surveys, :api_id, :string
  add_column :questions, :api_id, :string
  add_column :answers, :api_id, :string
end