The test was failing when using --keepdb due to a pre-existing PonyStables model. Thanks Florian Apolloner for the report Backport of 8e352876c337332b45a72da8bbccad2830c7b1e0 from master.