CREATE TABLE `rating_history` (
	`id` int AUTO_INCREMENT NOT NULL,
	`userId` int NOT NULL,
	`rating` float NOT NULL,
	`reason` varchar(256),
	`dimensionScores` json,
	`analysisId` int,
	`createdAt` timestamp NOT NULL DEFAULT (now()),
	CONSTRAINT `rating_history_id` PRIMARY KEY(`id`)
);
--> statement-breakpoint
ALTER TABLE `pose_analyses` ADD `shotCount` int DEFAULT 0;--> statement-breakpoint
ALTER TABLE `pose_analyses` ADD `avgSwingSpeed` float;--> statement-breakpoint
ALTER TABLE `pose_analyses` ADD `maxSwingSpeed` float;--> statement-breakpoint
ALTER TABLE `pose_analyses` ADD `totalMovementDistance` float;--> statement-breakpoint
ALTER TABLE `pose_analyses` ADD `strokeConsistency` float;--> statement-breakpoint
ALTER TABLE `pose_analyses` ADD `footworkScore` float;--> statement-breakpoint
ALTER TABLE `pose_analyses` ADD `fluidityScore` float;--> statement-breakpoint
ALTER TABLE `pose_analyses` ADD `keyMoments` json;--> statement-breakpoint
ALTER TABLE `pose_analyses` ADD `movementTrajectory` json;--> statement-breakpoint
ALTER TABLE `users` ADD `ntrpRating` float DEFAULT 1.5;--> statement-breakpoint
ALTER TABLE `users` ADD `totalSessions` int DEFAULT 0;--> statement-breakpoint
ALTER TABLE `users` ADD `totalMinutes` int DEFAULT 0;