discourse/db/migrate/20180316165104_create_shared_drafts.rb
Robin Ward b9abd7dc9e FEATURE: Shared Drafts
This feature can be enabled by choosing a destination for the
`shared drafts category` site setting.

* Staff members can create shared drafts, choosing a destination
category for the topic when it is published.

* Shared Drafts can be viewed in their category, or above the
topic list for the destination category where it will end up.

* When the shared draft is ready, it can be published to the
appropriate category by clicking a button on the topic view.

* When published, Drafts change their timestamps to the current
time, and any edits to the original post are removed.
2018-03-20 17:15:26 -04:00

11 lines
291 B
Ruby

class CreateSharedDrafts < ActiveRecord::Migration[5.1]
def change
create_table :shared_drafts, id: false do |t|
t.integer :topic_id, null: false
t.integer :category_id, null: false
t.timestamps
end
add_index :shared_drafts, :topic_id, unique: true
end
end