ЛР 5: асинхронная обработка изображений, уровень 5

This commit is contained in:
Nurlygayanova Ekaterina
2026-11-12 20:32:55 +03:00
parent 276dbdad8a
commit 7b3eab5473
115 changed files with 8847 additions and 34 deletions
+10
View File
@@ -0,0 +1,10 @@
-- +goose Up
ALTER TABLE attachments DROP CONSTRAINT attachments_status;
ALTER TABLE attachments ADD CONSTRAINT attachments_status CHECK (status IN ('queued','processing','ready','failed'));
ALTER TABLE attachments ADD COLUMN thumbnail jsonb NOT NULL DEFAULT '{}';
ALTER TABLE attachments ADD COLUMN error_code text;
ALTER TABLE attachments ADD COLUMN attempts int NOT NULL DEFAULT 0;
-- +goose Down
ALTER TABLE attachments DROP COLUMN attempts;
ALTER TABLE attachments DROP COLUMN error_code;
ALTER TABLE attachments DROP COLUMN thumbnail;