Reproduce the problem:
1. add a field type varchar(8) to a table in SQL 2005
2. run django's inspectdb tool
3. behold the output where the varchar field in question will be a textfield
with no max_length set
Using Django_pyodbc 1.4 on a Windows 7 machine
A VARCHAR([n]), like NVARCHAR([N]) should have a max_length property complying
to the given lenght.
I have fixed this by simply changing:
"Database.SQL_VARCHAR: 'TextField',"
to
"Database.SQL_VARCHAR: 'CharField',"
in introspection.py.
I don't know if this is the most elegant solution.
Thanks,
Erik
Original issue reported on code.google.com by erik.oos...@gmail.com on 13 Jun 2012 at 2:08
Original issue reported on code.google.com by
erik.oos...@gmail.com
on 13 Jun 2012 at 2:08