0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-07 13:19:19 +08:00
discourse/migrations/converters
Gerhard Schlager 0a35ae8367 MT: Rename IntermediateDB uploads table to upload_sources
This is the first of a series of changes that rework how the converter
and importer handle uploads. Right now too many things are called
"uploads": the table in the IntermediateDB, the uploads.db working DB
and its `uploads` table, and of course Discourse's own `uploads` table.
That makes the code and SQL around uploads harder to follow than it
should be.

The IntermediateDB table stores where to find each file (path, URL or
blob data) - it's not an upload yet - so it's now called
`upload_sources`.

Purely mechanical rename, no behavior change: the table, its `Upload`
model (now `UploadSource`), the generated schema SQL, and every query
that touched the IntermediateDB table. The shard-merge consolidator
resolves the model by singularizing the table name, so
`upload_sources` -> `UploadSource` keeps working with no change there.

Untouched on purpose: `*upload*_id` reference columns, `mapped.ids`,
the source Postgres `uploads` table the converter reads from, the
output uploads.db `uploads` table (reworked in a later change), and
the importer step named `uploads`.
2026-07-10 20:50:03 +02:00
..
lib MT: Rename IntermediateDB uploads table to upload_sources 2026-07-10 20:50:03 +02:00
spec MT: Run conversion steps concurrently and split the heavy ones across cores 2026-07-03 11:48:25 +02:00
.rspec MT: Split the migrations tooling into separate gems (#40492) 2026-06-02 22:20:03 +02:00
Gemfile MT: Split the migrations tooling into separate gems (#40492) 2026-06-02 22:20:03 +02:00
migrations-converters.gemspec MT: Split the migrations tooling into separate gems (#40492) 2026-06-02 22:20:03 +02:00