Fixing large ip solves (#307)

* Switching to using strings to store IP addresses because of the issues with storing them properly, Fixes #302, Fixes $306
* Only runs migrations when using a real database because SQlite is too inflexible to support migrations properly
* Removes calls to the ip helper functions but they can remain in case someone needs them in a plugin.
This commit is contained in:
Kevin Chung
2017-07-08 17:53:14 -04:00
committed by GitHub
parent dea59a1bc8
commit 92f130d5de
13 changed files with 216 additions and 42 deletions

View File

@@ -260,7 +260,7 @@ if __name__ == '__main__':
chalid = random.randint(1, CHAL_AMOUNT)
if chalid not in used:
used.append(chalid)
solve = Solves(chalid, x + 1, '127.0.0.1', gen_word())
solve = Solves(x + 1, chalid, '127.0.0.1', gen_word())
new_base = random_date(base_time, base_time + datetime.timedelta(minutes=random.randint(30, 60)))
solve.date = new_base
@@ -293,7 +293,7 @@ if __name__ == '__main__':
chalid = random.randint(1, CHAL_AMOUNT)
if chalid not in used:
used.append(chalid)
wrong = WrongKeys(x + 1, chalid, gen_word())
wrong = WrongKeys(x + 1, chalid, '127.0.0.1', gen_word())
new_base = random_date(base_time, base_time + datetime.timedelta(minutes=random.randint(30, 60)))
wrong.date = new_base