Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
neoteric-events / db / migrate / 03_create_categorizations.rb
Size: Mime:
class CreateCategorizations < ActiveRecord::Migration
  def up
    unless table_exists?('categorizations')
      create_table :categorizations do |t|
        t.references :event
        t.references :category
      end

      add_index :categorizations, :event_id
      add_index :categorizations, :category_id
    end
  end

  def down
    drop_table :categorizations
  end
end