CREATE TABLE `player_stats` (
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
`match_id` integer NOT NULL,
`player_id` integer NOT NULL,
`minutes_played` integer DEFAULT 0 NOT NULL,
`was_starter` integer DEFAULT false NOT NULL,
`api_rating` real,
`goals` integer DEFAULT 0 NOT NULL,
`assists` integer DEFAULT 0 NOT NULL,
`key_passes` integer DEFAULT 0 NOT NULL,
`penalty_missed` integer DEFAULT 0 NOT NULL,
`penalty_won` integer DEFAULT 0 NOT NULL,
`saves` integer DEFAULT 0 NOT NULL,
`penalty_saved` integer DEFAULT 0 NOT NULL,
`clean_sheet` integer DEFAULT false NOT NULL,
`goals_conceded` integer DEFAULT 0 NOT NULL,
`tackles` integer DEFAULT 0 NOT NULL,
`interceptions` integer DEFAULT 0 NOT NULL,
`clearances` integer DEFAULT 0 NOT NULL,
`yellow_cards` integer DEFAULT 0 NOT NULL,
`red_cards` integer DEFAULT 0 NOT NULL,
`second_yellow` integer DEFAULT 0 NOT NULL,
`own_goals` integer DEFAULT 0 NOT NULL,
`fouls_committed` integer DEFAULT 0 NOT NULL,
`fetched_at` text DEFAULT (datetime('now')),
FOREIGN KEY (`match_id`) REFERENCES `matches`(`id`) ON UPDATE no action ON DELETE no action,
FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON UPDATE no action ON DELETE no action
)