[PonyORM-list] Encoding question
alexander.kozlovsky at gmail.com
Wed Jan 8 14:17:48 UTC 2014
We've just pushed change to the github repository: now characted set is not
specified by default.
Now, if you specify an attribute in Pony:
name = Optional(unicode, 255)
It will be translated to the following column definition:
`name` VARCHAR(255) NOT NULL
If you want to have NULL as the default value for an Optional string
attribute instead of an empty string, then you can specify the option
'nullable=True' in the attribute definition:
name = Optional(unicode, 255, nullable=True)
In this case, the column definition will look as
Pony doesn't append 'DEFAULT NULL' because in MySQL it is not necessary, it
is only NOT NULL that requires explicit declaration
On Tue, Jan 7, 2014 at 6:44 PM, Mark Nesterovych <m.nesterovych at gmail.com>wrote:
> I am trying to create a field in table which should look like this:
> `name` varchar(255) DEFAULT NULL
> But both types I've tried UNICODE and STR produces next statement:
> `name` varchar(255) CHARACTER SET utf8 NOT NULL
> How can I get rid of CHARACTER SET here ?
> Thank You.
> ponyorm-list mailing list
> ponyorm-list at ponyorm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ponyorm-list