ALTER TABLE `registration` ADD `wants_to_perform` integer DEFAULT false NOT NULL;--> statement-breakpoint
ALTER TABLE `registration` ADD `extra_questions` text;--> statement-breakpoint
-- art_form was NOT NULL, make it nullable by recreating the table
-- SQLite does not support DROP NOT NULL directly, so we use the standard rename+recreate approach
CREATE TABLE `registration_new` (
	`id` text PRIMARY KEY NOT NULL,
	`first_name` text NOT NULL,
	`last_name` text NOT NULL,
	`email` text NOT NULL,
	`phone` text,
	`wants_to_perform` integer DEFAULT false NOT NULL,
	`art_form` text,
	`experience` text,
	`extra_questions` text,
	`created_at` integer DEFAULT (cast(unixepoch('subsecond') * 1000 as integer)) NOT NULL
);--> statement-breakpoint
INSERT INTO `registration_new` (`id`, `first_name`, `last_name`, `email`, `phone`, `wants_to_perform`, `art_form`, `experience`, `extra_questions`, `created_at`)
SELECT `id`, `first_name`, `last_name`, `email`, `phone`, `wants_to_perform`, `art_form`, `experience`, `extra_questions`, `created_at`
FROM `registration`;--> statement-breakpoint
DROP TABLE `registration`;--> statement-breakpoint
ALTER TABLE `registration_new` RENAME TO `registration`;--> statement-breakpoint
CREATE INDEX `registration_email_idx` ON `registration` (`email`);--> statement-breakpoint
CREATE INDEX `registration_artForm_idx` ON `registration` (`art_form`);--> statement-breakpoint
CREATE INDEX `registration_createdAt_idx` ON `registration` (`created_at`);
