CREATE TABLE `comment_attachments` ( `id` bigint unsigned AUTO_INCREMENT NOT NULL, `comment_id` bigint unsigned NOT NULL, `file_name` varchar(255) NOT NULL, `original_name` varchar(255) NOT NULL, `mime_type` varchar(100), `size` bigint unsigned, `created_at` timestamp NOT NULL DEFAULT (now()), CONSTRAINT `comment_attachments_id` PRIMARY KEY(`id`) ); --> statement-breakpoint ALTER TABLE `comment_attachments` ADD CONSTRAINT `comment_attachments_comment_id_comments_id_fk` FOREIGN KEY (`comment_id`) REFERENCES `comments`(`id`) ON DELETE cascade ON UPDATE no action;