# coding: utf-8 """ class Organisation (Base) ========================= """ from sqlalchemy import CheckConstraint, Column, Integer, String, text from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() metadata = Base.metadata class Organisation(Base): """ Table "public.organisations" Column | Type | Collation | Nullable | Default ----------------+------------------------+-----------+----------+------------------------------------------- id | integer | | not null | nextval('organisations_id_seq'::regclass) name | character varying(32) | | not null | longname | character varying(128) | | not null | kind | integer | | not null | city | character varying(64) | | not null | postcode | character varying(16) | | not null | street_address | character varying(128) | | not null | country | character varying(64) | | not null | homepage | character varying(200) | | not null | Indexes: "organisations_pkey" PRIMARY KEY, btree (id) Check constraints: "organisations_kind_check" CHECK (kind >= 0) """ __tablename__ = 'organisations' __table_args__ = ( CheckConstraint('kind >= 0'), ) id = Column(Integer, primary_key=True, server_default=text("nextval('organisations_id_seq'::regclass)")) name = Column(String(32), nullable=False) longname = Column(String(128), nullable=False) kind = Column(Integer, nullable=False) city = Column(String(64), nullable=False) postcode = Column(String(16), nullable=False) street_address = Column(String(128), nullable=False) country = Column(String(64), nullable=False) homepage = Column(String(200), nullable=False)