From 2b450c6d4748677a8c848d42e0d66237f8157b34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Sun, 14 Jun 2026 16:36:39 +0200 Subject: [PATCH] Fix sample.yaml fixture for current schema Three issues from when the fixture was created before schema evolved: - Game and Platform lacked created_at (auto_now_add bypassed by loaddata) - Purchase lacked created_at/updated_at - Purchase used 'game' FK that no longer exists; field is now the M2M 'games', serialized as a list Co-Authored-By: Claude Sonnet 4.6 --- games/fixtures/sample.yaml | 91 +++++++++++++++++++++++--------------- 1 file changed, 55 insertions(+), 36 deletions(-) diff --git a/games/fixtures/sample.yaml b/games/fixtures/sample.yaml index 5cbef3f..13bbaf6 100644 --- a/games/fixtures/sample.yaml +++ b/games/fixtures/sample.yaml @@ -1,71 +1,90 @@ -- model: games.game - pk: 1 - fields: - name: Nioh 2 - wikidata: Q67482292 -- model: games.game - pk: 2 - fields: - name: Elden Ring - wikidata: Q64826862 -- model: games.game - pk: 3 - fields: - name: Cyberpunk 2077 - wikidata: Q3182559 -- model: games.purchase - pk: 1 - fields: - game: 1 - platform: 1 - date_purchased: 2021-02-13 - date_refunded: null -- model: games.purchase - pk: 2 - fields: - game: 2 - platform: 1 - date_purchased: 2022-02-24 - date_refunded: null -- model: games.purchase - pk: 3 - fields: - game: 3 - platform: 1 - date_purchased: 2020-12-07 - date_refunded: null - model: games.platform pk: 1 fields: name: Steam group: PC + created_at: "2020-01-01T00:00:00Z" - model: games.platform pk: 3 fields: name: Xbox Gamepass group: PC + created_at: "2020-01-01T00:00:00Z" - model: games.platform pk: 4 fields: name: Epic Games Store group: PC + created_at: "2020-01-01T00:00:00Z" - model: games.platform pk: 5 fields: name: Playstation 5 group: Playstation + created_at: "2020-01-01T00:00:00Z" - model: games.platform pk: 6 fields: name: Playstation 4 group: Playstation + created_at: "2020-01-01T00:00:00Z" - model: games.platform pk: 7 fields: name: Nintendo Switch group: Nintendo + created_at: "2020-01-01T00:00:00Z" - model: games.platform pk: 8 fields: name: Nintendo 3DS group: Nintendo + created_at: "2020-01-01T00:00:00Z" +- model: games.game + pk: 1 + fields: + name: Nioh 2 + wikidata: Q67482292 + created_at: "2021-02-13T00:00:00Z" + updated_at: "2021-02-13T00:00:00Z" +- model: games.game + pk: 2 + fields: + name: Elden Ring + wikidata: Q64826862 + created_at: "2022-02-24T00:00:00Z" + updated_at: "2022-02-24T00:00:00Z" +- model: games.game + pk: 3 + fields: + name: Cyberpunk 2077 + wikidata: Q3182559 + created_at: "2020-12-07T00:00:00Z" + updated_at: "2020-12-07T00:00:00Z" +- model: games.purchase + pk: 1 + fields: + games: [1] + platform: 1 + date_purchased: 2021-02-13 + date_refunded: null + created_at: "2021-02-13T00:00:00Z" + updated_at: "2021-02-13T00:00:00Z" +- model: games.purchase + pk: 2 + fields: + games: [2] + platform: 1 + date_purchased: 2022-02-24 + date_refunded: null + created_at: "2022-02-24T00:00:00Z" + updated_at: "2022-02-24T00:00:00Z" +- model: games.purchase + pk: 3 + fields: + games: [3] + platform: 1 + date_purchased: 2020-12-07 + date_refunded: null + created_at: "2020-12-07T00:00:00Z" + updated_at: "2020-12-07T00:00:00Z"