Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

uuid sqlalcomany

def generate_uuid():
    return str(uuid.uuid4())

class MyTable(Base):
    __tablename__ = 'my_table'

    uuid = Column(String, name="uuid", primary_key=True, default=generate_uuid)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #uuid #sqlalcomany
ADD COMMENT
Topic
Name
1+4 =