from flask_appbuilder.models.mixins import AuditMixin, BaseMixin, FileColumn, ImageColumn
from sqlalchemy import Table, Column, Integer, String, Boolean, ForeignKey
from sqlalchemy.orm import relationship
from flask_appbuilder import Base
from flask_appbuilder.security.models import User
from flask_appbuilder import Base

"""

You can use the extra Flask-AppBuilder fields and Mixin's

AuditMixin will add automatic timestamp of created and modified by who


"""

class Project(AuditMixin, Base):
    id = Column(Integer, primary_key=True)
    name =  Column(String(150), unique = True, nullable=False)
    
class ProjectFiles(Base):
    id = Column(Integer, primary_key=True)
    project_id = Column(Integer, ForeignKey('project.id'))
    project = relationship("Project")
    file = Column(FileColumn, nullable=False)
    

@@ -488,24 +488,54 @@
 xin, Base):%0A
+    __tablename__ = %22project%22%0A
     id = Col
@@ -655,24 +655,60 @@
 iles(Base):%0A
+    __tablename__ = %22project_files%22%0A
     id = Col

Update models.py