Sha256: abd897f747e2842357214038474a3d322c6caf7614fee4454087678aae7b0f08

Contents?: true

Size: 338 Bytes

Versions: 5

Compression:

Stored size: 338 Bytes

Contents

class AddGraphTypeToGraphs < ActiveRecord::Migration
  def up
    add_column :prosperity_graphs, :graph_type, :string
    execute "UPDATE prosperity_graphs SET graph_type='line'"
    change_column :prosperity_graphs, :graph_type, :string, null: false
  end

  def down
    remove_column :prosperity_graphs, :graph_type, :string
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
prosperity-0.0.11 db/migrate/20140516222642_add_graph_type_to_graphs.rb
prosperity-0.0.10 db/migrate/20140516222642_add_graph_type_to_graphs.rb
prosperity-0.0.9 db/migrate/20140516222642_add_graph_type_to_graphs.rb
prosperity-0.0.8 db/migrate/20140516222642_add_graph_type_to_graphs.rb
prosperity-0.0.7 db/migrate/20140516222642_add_graph_type_to_graphs.rb