CREATE TABLE `application_drafts` (
	`id` text PRIMARY KEY NOT NULL,
	`token_hash` text NOT NULL,
	`encrypted_payload` text NOT NULL,
	`iv` text NOT NULL,
	`current_step` integer DEFAULT 0 NOT NULL,
	`expires_at` text NOT NULL,
	`created_at` text NOT NULL,
	`updated_at` text NOT NULL
);
--> statement-breakpoint
CREATE UNIQUE INDEX `uq_application_drafts_token_hash` ON `application_drafts` (`token_hash`);--> statement-breakpoint
CREATE INDEX `idx_application_drafts_expiry` ON `application_drafts` (`expires_at`);