标签:local imp ring int ada column ddr name mysq
from sqlalchemy import create_engine,Table,Column,Integer,String,MetaData,ForeignKey engine=create_engine("mysql+pymysql://root:a5230411@localhost:3306/test",echo=True) metadata=MetaData(engine) user=Table(‘user‘,metadata, Column(‘id‘,Integer,primary_key=True), Column(‘name‘,String(20)), Column(‘fullname‘,String(40)), ) address_table = Table(‘address‘, metadata, Column(‘id‘, Integer, primary_key=True), Column(‘user_id‘, None, ForeignKey(‘user.id‘)), Column(‘email‘, String(128), nullable=False) ) metadata.create_all()
标签:local imp ring int ada column ddr name mysq
原文地址:https://www.cnblogs.com/luoye00/p/11982179.html