mirror of
https://github.com/discourse/discourse.git
synced 2026-08-09 21:45:25 +08:00
The placeholder linkage tables were keyed by post_id, but placeholders will be needed in other markdown fields too (user bios, group and category descriptions). This renames post_* to embed_* and keys them by owner_type + owner_id, so the same tables and the same import-time resolution work for any markdown-bearing record. - owner_type is an integer-backed enum (embed_owner: post=1, user=2): readable constants in code, 0-1 bytes per row in SQLite instead of a repeated text tag. - embed_links: target_topic_id/target_post_id replaced by a generic target_type (enum link_target) + target_id, so future link kinds (user, category, tag, ...) don't need new columns. - EmbedBuffer takes owner_type at construction; steps keep calling write_for(id). - PlaceholderResolver serves one owner kind per instance and reports unresolved and orphaned embeds with owner-aware URLs. [ci skip] |
||
|---|---|---|
| .. | ||
| fixtures/schema | ||
| lib/migrations/tooling | ||
| spec_helper.rb | ||