This repository has been archived on 2020-05-27. You can view files and clone it, but cannot push or open issues/pull-requests.
barleysodas/db/migrate/010_page_people_ownership.rb

20 lines
615 B
Ruby

class PagePeopleOwnership < ActiveRecord::Migration
def self.up
add_column :pages, :created_by, :integer
add_index :pages, :created_by
add_column :pages, :updated_by, :integer
add_index :pages, :updated_by
add_column :page_versions, :created_by, :integer
add_index :page_versions, :created_by
add_column :page_versions, :updated_by, :integer
add_index :page_versions, :updated_by
end
def self.down
remove_column :pages, :created_by
remove_column :pages, :updated_by
remove_column :page_versions, :created_by
remove_column :page_versions, :updated_by
end
end