From 831603e04e21c690d04b2dbfe482450a5271c9f1 Mon Sep 17 00:00:00 2001 From: Frank van den Berg Date: Sat, 27 Jun 2026 16:07:22 +0200 Subject: [PATCH] Migration game 1 --- migrations/Version20260627140000.php | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 migrations/Version20260627140000.php diff --git a/migrations/Version20260627140000.php b/migrations/Version20260627140000.php new file mode 100644 index 0000000..9878238 --- /dev/null +++ b/migrations/Version20260627140000.php @@ -0,0 +1,28 @@ +addSql("INSERT INTO game (name, number_of_players, status) VALUES ('AI Virus Deflection', 3, 'inDevelopment')"); + $this->addSql("INSERT INTO game_setting (game_id, name, value) VALUES (LAST_INSERT_ID(), 'totalTime', '1800')"); + } + + public function down(Schema $schema): void + { + $this->addSql("DELETE gs FROM game_setting gs INNER JOIN game g ON gs.game_id = g.id WHERE g.name = 'AI Virus Deflection'"); + $this->addSql("DELETE FROM game WHERE name = 'AI Virus Deflection'"); + } +}