+/- table definition
Query
CREATE TABLE `scores` (
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
`matchday_id` integer NOT NULL,
`manager_id` integer NOT NULL,
`player_id` integer NOT NULL,
`base_points` real DEFAULT 0 NOT NULL,
`bonus_points` real DEFAULT 0 NOT NULL,
`total_points` real DEFAULT 0 NOT NULL,
`breakdown` text,
`calculated_at` text DEFAULT (datetime('now')),
FOREIGN KEY (`matchday_id`) REFERENCES `matchdays`(`id`) ON UPDATE no action ON DELETE no action,
FOREIGN KEY (`manager_id`) REFERENCES `managers`(`id`) ON UPDATE no action ON DELETE no action,
FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON UPDATE no action ON DELETE no action
)