# File: Domain.py
# Author: Bert JW Regeer <bertjw@regeer.org>
# Created: 2013-09-02

from meta import Base

from sqlalchemy import (
        Boolean,
        Column,
        ForeignKey,
        Table,
        Integer,
        Unicode,
        PrimaryKeyConstraint,
        UniqueConstraint,
        )

class Domain(Base):
    __table__ = Table('domains', Base.metadata,
            Column('id', Integer, primary_key=True, index=True),
            Column('domain', Unicode(256), index=True, unique=True),
            Column('owner', Integer, ForeignKey('users.id', onupdate="CASCADE", ondelete="RESTRICT"), nullable=False),
            )


@@ -188,21 +188,23 @@
         
-Table
+Integer
 ,%0A      
@@ -197,39 +197,52 @@
 nteger,%0A        
-Integer
+PrimaryKeyConstraint
 ,%0A        Unicod
@@ -235,23 +235,22 @@
         
-Unicode
+String
 ,%0A      
@@ -251,36 +251,38 @@
         
-PrimaryKeyConstraint
+Table,%0A        Unicode
 ,%0A      
@@ -474,23 +474,22 @@
 omain', 
-Unicode
+String
 (256), i

Change from unicode to string for domain