Sha256: 8a89b78dd76788ae0d16c43756bfb5bed6fe8c57636536194a15dc20701a53fd

Contents?: true

Size: 419 Bytes

Versions: 10

Compression:

Stored size: 419 Bytes

Contents

class UnreadMigration < ActiveRecord::Migration
  def self.up
    create_table :read_marks, :force => true do |t|
      t.integer  :readable_id
      t.integer  :user_id,       :null => false
      t.string   :readable_type, :null => false, :limit => 20
      t.datetime :timestamp
    end

    add_index :read_marks, [:user_id, :readable_type, :readable_id]
  end

  def self.down
    drop_table :read_marks
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
unread-0.4.0 lib/generators/unread/migration/templates/migration.rb
unread-mongoid-0.1.0 lib/generators/unread/migration/templates/migration.rb
unread-mongoid-0.0.5 lib/generators/unread/migration/templates/migration.rb
unread-mongoid-0.0.4 lib/generators/unread/migration/templates/migration.rb
unread-mongoid-0.0.3 lib/generators/unread/migration/templates/migration.rb
unread-0.3.1 lib/generators/unread/migration/templates/migration.rb
unread-mongoid-0.0.2 lib/generators/unread/migration/templates/migration.rb
unread-mongoid-0.0.1 lib/generators/unread/migration/templates/migration.rb
unread-0.3.0 lib/generators/unread/migration/templates/migration.rb
unread-0.2.0 lib/generators/unread/migration/templates/migration.rb