Fixes to database manager
This commit is contained in:
parent
0ee8899f68
commit
a904fa9d29
6 changed files with 12 additions and 0 deletions
|
|
@ -1,3 +1,4 @@
|
|||
""" This module contains the MemoryModel class, which is a SQLAlchemy model for the memory table in the relational database. """
|
||||
from datetime import datetime
|
||||
from sqlalchemy import Column, String, DateTime, ForeignKey, Boolean
|
||||
from sqlalchemy.orm import relationship
|
||||
|
|
@ -7,6 +8,7 @@ from ..database import Base
|
|||
|
||||
|
||||
class DocsModel(Base):
|
||||
""" Docs model"""
|
||||
__tablename__ = "docs"
|
||||
|
||||
id = Column(String, primary_key=True)
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
""" This module contains the MemoryModel class, which is a SQLAlchemy model for the memory table in the relational database. """
|
||||
from datetime import datetime
|
||||
from sqlalchemy import Column, String, DateTime, ForeignKey
|
||||
from sqlalchemy.orm import relationship
|
||||
|
|
@ -5,6 +6,7 @@ from ..database import Base
|
|||
|
||||
|
||||
class MemoryModel(Base):
|
||||
""" Memory model"""
|
||||
__tablename__ = "memories"
|
||||
|
||||
id = Column(String, primary_key=True)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
# metadata.py
|
||||
""" MetaData model """
|
||||
from datetime import datetime
|
||||
from sqlalchemy import Column, String, DateTime, ForeignKey
|
||||
from sqlalchemy.orm import relationship
|
||||
|
|
@ -8,6 +9,7 @@ from ..database import Base
|
|||
|
||||
|
||||
class MetaDatas(Base):
|
||||
""" MetaData model"""
|
||||
__tablename__ = "metadatas"
|
||||
|
||||
id = Column(String, primary_key=True)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
# operation.py
|
||||
""" Operation model """
|
||||
from datetime import datetime
|
||||
from sqlalchemy import Column, Integer, String, DateTime, ForeignKey
|
||||
from sqlalchemy.orm import relationship
|
||||
|
|
@ -8,6 +9,7 @@ from ..database import Base
|
|||
|
||||
|
||||
class Operation(Base):
|
||||
""" Operation model"""
|
||||
__tablename__ = "operations"
|
||||
|
||||
id = Column(String, primary_key=True)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
# session.py
|
||||
""" Session model """
|
||||
from datetime import datetime
|
||||
from sqlalchemy import Column, Integer, String, DateTime, ForeignKey
|
||||
from sqlalchemy.orm import relationship
|
||||
|
|
@ -9,6 +10,7 @@ from ..database import Base
|
|||
|
||||
|
||||
class Session(Base):
|
||||
""" Session model"""
|
||||
__tablename__ = "sessions"
|
||||
|
||||
id = Column(String, primary_key=True)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
# user.py
|
||||
""" User model """
|
||||
from datetime import datetime
|
||||
from sqlalchemy import Column, String, DateTime
|
||||
from sqlalchemy.orm import relationship
|
||||
|
|
@ -14,6 +15,7 @@ from ..database import Base
|
|||
|
||||
|
||||
class User(Base):
|
||||
""" User model"""
|
||||
__tablename__ = "users"
|
||||
|
||||
id = Column(String, primary_key=True, index=True)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue