mirror of
https://github.com/glitch-soc/mastodon.git
synced 2026-03-29 03:00:33 +02:00
Tag linked FeaturedCollection objects over ActivityPub (#38115)
This commit is contained in:
17
db/migrate/20260319142348_create_tagged_objects.rb
Normal file
17
db/migrate/20260319142348_create_tagged_objects.rb
Normal file
@@ -0,0 +1,17 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class CreateTaggedObjects < ActiveRecord::Migration[8.1]
|
||||
def change
|
||||
create_table :tagged_objects do |t|
|
||||
t.references :status, null: false, foreign_key: { on_delete: :cascade }, index: false
|
||||
t.references :object, polymorphic: true, null: true
|
||||
t.string :ap_type, null: false
|
||||
t.string :uri
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
add_index :tagged_objects, [:status_id, :object_type, :object_id], unique: true, where: 'object_type IS NOT NULL AND object_id IS NOT NULL'
|
||||
add_index :tagged_objects, [:status_id, :uri], unique: true, where: 'uri IS NOT NULL'
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user