peewee_migrate2 icon indicating copy to clipboard operation
peewee_migrate2 copied to clipboard

ManyToManyField does not work

Open eijgnehz opened this issue 4 years ago • 1 comments

While using peewee.ManyToManyField, mirations does not create the through table

impot peewee as pw

class Item(pw.Model):
    name = pw.CharFiled(max_length=10)
    class Meta:
        databse = db

class User(pw.Model):
    name = pw.CharFiled(max_length=10)
    items = pw.ManyToManyField(Item, backref='user')
    class Meta:
        databse = db

It only createItem and User two tables

eijgnehz avatar Aug 18 '21 03:08 eijgnehz

Yea, i'm working on refactoring. Сurrent implementation has a lot of troubles with changes detection

spumer avatar Aug 18 '21 18:08 spumer