CREATE TABLE `discord_connections` (
	`user_id` text PRIMARY KEY NOT NULL,
	`encrypted_webhook` text NOT NULL,
	`name` text NOT NULL,
	`channel_id` text NOT NULL,
	`guild_id` text NOT NULL,
	`updated_at` integer NOT NULL,
	FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
);
--> statement-breakpoint
CREATE TABLE `discord_deliveries` (
	`id` text PRIMARY KEY NOT NULL,
	`user_id` text NOT NULL,
	`image_hash` text NOT NULL,
	`status` text NOT NULL,
	`message_url` text,
	`created_at` integer NOT NULL,
	FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
);
