aboutsummaryrefslogtreecommitdiffstats
path: root/db/migrate/20171215145023_update_purchase_windows_attributes.rb
blob: 48dfb15bc0be609e41de0d4ad1d6a6d7e812cd94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
class UpdatePurchaseWindowsAttributes < ActiveRecord::Migration
  def change
    add_column :purchase_windows, :objectid, :string
    add_column :purchase_windows, :checksum, :string
    add_column :purchase_windows, :checksum_source, :text

    remove_column :purchase_windows, :short_name, :string
    remove_column :purchase_windows, :dates, :date
    remove_column :purchase_windows, :organisation_id, :integer

    add_reference :purchase_windows, :referential, type: :bigint, index: true
  end
end