mirror of
https://github.com/zhigang1992/tsemple.git
synced 2026-01-12 22:53:00 +08:00
12 lines
281 B
Ruby
12 lines
281 B
Ruby
class CreateSubscriptions < ActiveRecord::Migration
|
|
def change
|
|
create_table :subscriptions do |t|
|
|
t.belongs_to :user, index: true
|
|
t.belongs_to :subscribable, polymorphic: true, index: true
|
|
t.integer :status, default: 0
|
|
|
|
t.timestamps
|
|
end
|
|
end
|
|
end
|