penpot/backend/src/app/migrations/sql/0154-del-legacy-file-object-thumbnail-table.sql
Andrey Antukh c3c65318b4 🔥 Drop the legacy file_object_thumbnail table
`file_object_thumbnail` was replaced by `file_tagged_object_thumbnail`
and nothing refers to it anymore: no query in the backend touches it,
no table has a foreign key pointing at it, no view depends on it, and
it is empty in production. It also lacked `deleted_at`, which is why
restoring files had to leave it out. Only legacy naming survives in two
helpers (`get-file-object-thumbnails` and
`delete-file-object-thumbnails!`, which operate on
`file_tagged_object_thumbnail`).

The storage bucket named "file-object-thumbnail", the one that
`file_tagged_object_thumbnail` uses, is a different thing and stays.

AI-assisted-by: deepseek-v4.1-flash
2026-10-13 14:33:32 +02:00

8 lines
400 B
SQL

--- The `file_object_thumbnail` table was replaced by
--- `file_tagged_object_thumbnail` and nothing references it anymore: no query
--- in the codebase touches it and it is empty in production.
---
--- NOTE: the storage bucket named "file-object-thumbnail" (the one used by
--- `file_tagged_object_thumbnail`) has nothing to do with this table and stays.
DROP TABLE IF EXISTS file_object_thumbnail;