Skip to content

Instantly share code, notes, and snippets.

@jeamland
Created October 18, 2011 01:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeamland/1294394 to your computer and use it in GitHub Desktop.
Save jeamland/1294394 to your computer and use it in GitHub Desktop.
SQLAlchemy declarative problem
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