Sha256: 49413d3f8966f4e8c6f5f4d3cb9b3c6eaab75c1f5fb68c25f5d6a3af2f336e07

Contents?: true

Size: 344 Bytes

Versions: 9

Compression:

Stored size: 344 Bytes

Contents

class CreatePrints < ActiveRecord::Migration
  def self.up
    create_table :prints do |t|
      t.references :printable, :polymorphic => true
      t.references :user
      t.timestamps
    end
    
    add_index :prints, [:printable_id, :printable_type]
    add_index :prints, :user_id
  end

  def self.down
    drop_table :prints
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
how_are_we_doing-0.0.9 lib/generators/how_are_we_doing/install/templates/db/migrate/create_prints.rb
how_are_we_doing-0.0.8 lib/generators/how_are_we_doing/install/templates/db/migrate/create_prints.rb
how_are_we_doing-0.0.7 lib/generators/how_are_we_doing/install/templates/db/migrate/create_prints.rb
how_are_we_doing-0.0.6 lib/generators/how_are_we_doing/install/templates/db/migrate/create_prints.rb
how_are_we_doing-0.0.5 lib/generators/how_are_we_doing/install/templates/db/migrate/create_prints.rb
how_are_we_doing-0.0.4 lib/generators/how_are_we_doing/install/templates/db/migrate/create_prints.rb
how_are_we_doing-0.0.3 lib/generators/how_are_we_doing/install/templates/db/migrate/create_prints.rb
how_are_we_doing-0.0.2 lib/generators/how_are_we_doing/install/templates/db/migrate/create_prints.rb
how_are_we_doing-0.0.1 lib/generators/templates/db/migrate/create_prints.rb