klen / peewee_migrate

Simple migration engine for Peewee
MIT License
352 stars 86 forks source link

Bug report: [The same database name conflict: pw] #207

Open byte-voyager opened 2 years ago

byte-voyager commented 2 years ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce

import peewee as pw  # from template.txt
...
@migrator.create_model
class CollectDevice(pw.Model):
    pw = pw.DecimalField(auto_round=False, decimal_places=2, max_digits=20, null=True, rounding=ROUND_HALF_EVEN)
    px = pw.DecimalField(auto_round=False, decimal_places=2, max_digits=20, null=True, rounding=ROUND_HALF_EVEN)  # error
    q = pw.DecimalField(auto_round=False, decimal_places=2, max_digits=20, null=True, rounding=ROUND_HALF_EVEN)
...