MD500_Pilot

Untitled

Apr 13th, 2020
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.59 KB | None | 0 0
  1. #!/usr/bin/python3
  2.  
  3. import sqlalchemy as sa
  4.  
  5. #from use_database import engine
  6. metadata = sa.MetaData()
  7.  
  8.  
  9. zones = sa.Table(
  10.     'zones',
  11.     metadata,
  12.     sa.Column('name', sa.VARCHAR(collation='utf8_unicode_ci', length=15), nullable=False),
  13.     sa.Column('zone_number', sa.Integer(), primary_key=True, nullable=False),
  14.     sa.Column('description', sa.VARCHAR(collation='utf8_unicode_ci', length=40), nullable=False),
  15.     sa.Column('gpio', sa.Integer(), nullable=False),
  16.     sa.Column('enabled', sa.Boolean(), nullable=False),
  17.     sa.Column('running', sa.Boolean(), nullable=False),
  18. )
Advertisement
Add Comment
Please, Sign In to add comment