Created
October 18, 2011 01:27
-
-
Save jeamland/1294394 to your computer and use it in GitHub Desktop.
SQLAlchemy declarative problem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sqlalchemy as sa | |
from sqlalchemy import orm, sql | |
from sqlalchemy.ext.declarative import declarative_base | |
Base = declarative_base() | |
class Customer(Base): | |
__tablename__ = 'customer' | |
customer_id = sa.Column(sa.Integer, primary_key=True), | |
name = sa.Column(sa.Text), | |
address = sa.Column(sa.Text), | |
landline = sa.Column(sa.Text), | |
mobile = sa.Column(sa.Text), | |
license = sa.Column(sa.Text), | |
users = sa.Column(sa.Integer), | |
notes = sa.Column(sa.Text), | |
contact_name = sa.Column(sa.Text), | |
cameras = sa.Column(sa.Integer), | |
plugins = sa.Column(sa.Text), | |
email = sa.Column(sa.Text), | |
support = sa.Column(sa.Text), | |
url = sa.Column(sa.Text), | |
gateway = sa.Column(sa.Text), | |
message = sa.Column(sa.Text), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment