Sha256: 65a8af8b7c1af46318d1c4e17c14954a4f90f479e174057b45f6c99d42ddcd3c
Contents?: true
Size: 331 Bytes
Versions: 33
Compression:
Stored size: 331 Bytes
Contents
class AddProjectId < ActiveRecord::Migration def self.up add_column :nodes, :project_id, :integer execute "UPDATE nodes SET project_id = section_id" execute "UPDATE nodes SET section_id = 1" end def self.down execute "UPDATE nodes SET section_id = project_id" remove_column :nodes, :project_id end end
Version data entries
33 entries across 33 versions & 1 rubygems