• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ledermann / unread / 273 / 55

Source File

100.0
/lib/generators/unread/migration/templates/migration.rb
1
class UnreadMigration < ActiveRecord::Migration
1✔
2
  def self.up
1✔
3
    create_table ReadMark, force: true do |t|
1✔
4
      t.references :readable, polymorphic: { null: false }
1✔
5
      t.references :reader,   polymorphic: { null: false }
1✔
6
      t.datetime :timestamp
1✔
7
    end
8

9
    add_index ReadMark, [:reader_id, :reader_type, :readable_type, :readable_id], name: 'read_marks_reader_readable_index', unique: true
1✔
10
  end
11

12
  def self.down
1✔
13
    drop_table ReadMark
1✔
14
  end
15
end
  • Back to Build 273
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2024 Coveralls, Inc