From 458eedd16f6909e34fa9a152e93b3ec237688a40 Mon Sep 17 00:00:00 2001 From: Ro Date: Fri, 19 Aug 2016 13:43:38 -0400 Subject: [PATCH 1/2] table check --- pokemongo_bot/migrations/pokemongobot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pokemongo_bot/migrations/pokemongobot.py b/pokemongo_bot/migrations/pokemongobot.py index 2a68265241..1342a7827c 100644 --- a/pokemongo_bot/migrations/pokemongobot.py +++ b/pokemongo_bot/migrations/pokemongobot.py @@ -1,5 +1,5 @@ from yoyo import step step( - "CREATE TABLE login (timestamp INTEGER, message TEXT)", + "CREATE TABLE IF NOT EXISTS login (timestamp INTEGER, message TEXT)", ) From fa7a5f791fd5718afd3b75c23b07a883d69fee18 Mon Sep 17 00:00:00 2001 From: Ro Date: Fri, 19 Aug 2016 13:44:33 -0400 Subject: [PATCH 2/2] Existing Table Check --- pokemongo_bot/cell_workers/migrations/catch_log.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pokemongo_bot/cell_workers/migrations/catch_log.py b/pokemongo_bot/cell_workers/migrations/catch_log.py index 78c7b4daf8..12fef29ea5 100644 --- a/pokemongo_bot/cell_workers/migrations/catch_log.py +++ b/pokemongo_bot/cell_workers/migrations/catch_log.py @@ -1,5 +1,5 @@ from yoyo import step step( - "CREATE TABLE catch_log (pokemon text, cp real, iv real, encounter_id text, pokemon_id real, dated datetime DEFAULT CURRENT_TIMESTAMP)" + "CREATE TABLE IF NOT EXISTS catch_log (pokemon text, cp real, iv real, encounter_id text, pokemon_id real, dated datetime DEFAULT CURRENT_TIMESTAMP)" )