📜  uuid sqlalcomany - SQL 代码示例

📅  最后修改于: 2022-03-11 15:05:07.444000             🧑  作者: Mango

代码示例1
def generate_uuid():
    return str(uuid.uuid4())

class MyTable(Base):
    __tablename__ = 'my_table'

    uuid = Column(String, name="uuid", primary_key=True, default=generate_uuid)