lab5 - оценка 4

This commit is contained in:
Rakshasa2
2026-11-12 18:48:39 +03:00
parent 276dbdad8a
commit d9de5e1a60
37 changed files with 4639 additions and 19 deletions
@@ -0,0 +1,10 @@
DELETE FROM attachment_variants
WHERE kind = 'original' OR width < 1 OR height < 1 OR size_bytes < 1;
ALTER TABLE attachment_variants DROP CONSTRAINT IF EXISTS attachment_variants_kind_check;
ALTER TABLE attachment_variants ADD CONSTRAINT attachment_variants_kind_check
CHECK (kind IN ('thumbnail_256', 'crop_128', 'optimized_webp'));
ALTER TABLE attachment_variants DROP CONSTRAINT IF EXISTS attachment_variants_dims_check;
ALTER TABLE attachment_variants ADD CONSTRAINT attachment_variants_dims_check
CHECK (width >= 1 AND height >= 1 AND size_bytes >= 1);