I have this tables I created models for using vanilla SQLAlchemy to operate the postgre DB.
class table:
def __init__(self):
self.engine = create_engine(DB_ADDRESS, poolclass=NullPool)
self.meta = MetaData()
self.table = Table(
"employeetable",
self.meta,
Column("id", Integer, primary_key=True),
Column("employeeId", String),
Column("name", String),
Column("email", String),
Column("place", String),
Column("sector", String),
Column("function", String),
Column("phone", String),
Column("status", String),
Column("type", String),
Column(
"lastChange",
DateTime(timezone=True),
server_default=func.now(),
),
Column("receptorId", String),
Column("syncFlag", Boolean),
)
self.meta.create_all(self.engine)
each class also have its methods for me to search and alter the the table and whatnot. The table already is populated with data and takes care of the data sync between two systems. The problem is now I need to add another column to check the sync of another field. I know I have to migrate the table to do this, and also know Alembic is an option to this. I just can't figure out how I get Alembic to "import" this class/table so I can work with it inside Alembic to make this migration to alter the table.
Can someone give me some directions on how this works and how i can configure it to receive this?