Closed yjcb22 closed 1 month ago
One quick way to fix it (probably not the best one since it breaks the flow) is to import the module:
Not sure why Alembic would generate that - but as Alembic suggests - change the generated code if necessary - in this case I would:
from flask_security import AsaList
sa.Column('permissions', AsaList(), nullable=True)
Thanks @jwag956 !
Using the default models for Role and User is generating a migration with flask_security.datastore.AsaList() consequently SQLALchemy cannot apply the db upgrade as follows:
My understanding based on the documentation is that flask_security.datastore.AsaList() is based on SQLAlchemy MutableList so it should be used as
permissions = Column(MutableList.as_mutable(AsaList()), nullable=True)