Sha256: 1c4d63100059781276f356853c42a9fbc5932f76a04adfa3c209cfb1ff93f1ec

Contents?: true

Size: 484 Bytes

Versions: 8

Compression:

Stored size: 484 Bytes

Contents

class CreateShares < ActiveRecord::Migration
  def self.up
    create_table :shares do |t|
      t.references :shareable, :polymorphic => true
      t.references :user
      t.string :service_ident, :limit => 48
      t.string :url_hash
      t.timestamps
    end
    
    add_index :shares, [:shareable_id, :shareable_type]
    add_index :shares, :user_id
    add_index :shares, :service_ident
    add_index :shares, :url_hash
  end

  def self.down
    drop_table :shares
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

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