PRAGMA foreign_keys=OFF;--> statement-breakpoint
CREATE TABLE `__new_job` (
	`id` text PRIMARY KEY NOT NULL,
	`integration_id` text NOT NULL,
	`crowdin_id` text NOT NULL,
	`type` text NOT NULL,
	`title` text,
	`progress` integer DEFAULT 0 NOT NULL,
	`status` text DEFAULT 'created' NOT NULL,
	`payload` text,
	`info` text,
	`data` text,
	`attempt` integer DEFAULT 0 NOT NULL,
	`errors` text,
	`processed_entities` text,
	`initiated_by` text,
	`created_at` text NOT NULL,
	`updated_at` text,
	`finished_at` text
);
--> statement-breakpoint
UPDATE `job` SET "status" = 'created' WHERE "status" = 'CREATED';--> statement-breakpoint
INSERT INTO `__new_job`("id", "integration_id", "crowdin_id", "type", "title", "progress", "status", "payload", "info", "data", "attempt", "errors", "processed_entities", "initiated_by", "created_at", "updated_at", "finished_at") SELECT "id", "integration_id", "crowdin_id", "type", "title", "progress", "status", "payload", "info", "data", "attempt", "errors", "processed_entities", "initiated_by", "created_at", "updated_at", "finished_at" FROM `job`;--> statement-breakpoint
DROP TABLE `job`;--> statement-breakpoint
ALTER TABLE `__new_job` RENAME TO `job`;--> statement-breakpoint
PRAGMA foreign_keys=ON;