Add circle posts history support (#18)
* Wip: make web backend * Wip: keep statuses if edit circle * Wip: Add circle history page and record circle posts * Add circle post to history in web ui when post * Add test
This commit is contained in:
parent
0a42f4b7e2
commit
df3b3f4185
19 changed files with 544 additions and 15 deletions
22
db/migrate/20230923103430_create_circle_statuses.rb
Normal file
22
db/migrate/20230923103430_create_circle_statuses.rb
Normal file
|
@ -0,0 +1,22 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require Rails.root.join('lib', 'mastodon', 'migration_helpers')
|
||||
|
||||
class CreateCircleStatuses < ActiveRecord::Migration[7.0]
|
||||
include Mastodon::MigrationHelpers
|
||||
|
||||
disable_ddl_transaction!
|
||||
|
||||
def change
|
||||
safety_assured do
|
||||
create_table :circle_statuses do |t|
|
||||
t.belongs_to :circle, null: true, foreign_key: { on_delete: :cascade }
|
||||
t.belongs_to :status, null: false, foreign_key: { on_delete: :cascade }
|
||||
t.datetime :created_at, null: false
|
||||
t.datetime :updated_at, null: false
|
||||
end
|
||||
|
||||
add_index :circle_statuses, [:circle_id, :status_id], unique: true
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue