15 lines
645 B
SQL
15 lines
645 B
SQL
DELETE FROM message_attachments WHERE kind = 'sticker';
|
|
|
|
ALTER TABLE message_attachments DROP CONSTRAINT IF EXISTS message_attachments_kind_check;
|
|
ALTER TABLE message_attachments
|
|
ADD CONSTRAINT message_attachments_kind_check
|
|
CHECK (kind IN ('image', 'video', 'audio', 'file', 'link', 'entity', 'quote'));
|
|
|
|
ALTER TABLE message_attachments DROP CONSTRAINT IF EXISTS message_attachments_entity_type_check;
|
|
ALTER TABLE message_attachments
|
|
ADD CONSTRAINT message_attachments_entity_type_check
|
|
CHECK (entity_type IS NULL OR
|
|
entity_type IN ('post', 'comment', 'profile', 'collection'));
|
|
|
|
DROP TABLE IF EXISTS saved_stickers;
|