overriding compilation of existing constructs doesn't create a "default" back to the original

Issue #1838 resolved
Mike Bayer repo owner created an issue
import sqlalchemy as sa
from sqlalchemy.ext.compiler import compiles
from sqlalchemy.dialects.mssql.base import MSUniqueIdentifier
from sqlalchemy import schema

@compiles(MSUniqueIdentifier, 'sqlite')
def compile_msuniqueidentifier(element, compiler, **kw):
   element.length = None
   return compiler.visit_NVARCHAR(element, **kw)

t1 = sa.Table('foo', sa.MetaData(), sa.Column('bar', MSUniqueIdentifier()))
print schema.CreateTable(t1)

Comments (2)

  1. Log in to comment