mirror of
https://github.com/astuto/astuto.git
synced 2025-12-16 11:47:56 +01:00
* It is now possible to follow a post in order to receive updates about it * Notifications are now sent when updates are published * Post status changes are now tracked * Update sidebar now shows the post status history * Mark a comment as a post update using the comment form * ... more ...
13 lines
309 B
Ruby
13 lines
309 B
Ruby
class CreateFollows < ActiveRecord::Migration[6.0]
|
|
def change
|
|
create_table :follows do |t|
|
|
t.references :user, null: false, foreign_key: true
|
|
t.references :post, null: false, foreign_key: true
|
|
|
|
t.timestamps
|
|
end
|
|
|
|
add_index :follows, [:user_id, :post_id], unique: true
|
|
end
|
|
end
|