postgresql - Django fixture fails, stating "DatabaseError: value too long for type character varying(50)" -


I have a stability (JSON) that loads in the development environment but fails to do this in the server environment . The error says: " Databaseserre: value is very different for a long type of character (50) "

My development environment Windows & amp; Postgrass 8.4 runs Server Debian and Postgrass 8.3. The database encoding in both encodings is UTF 8.

It seems that fixes are counted on the Unicode marker server as characters and some strings are the maximum length of their field, however, it does not happen in the Dev environment.

< P>

Update: 50 characters limit of 1.78 in DJGanga

-

Basic Answer:

I still had to face this afternoon, and I'm fine (of type)

It specifies that with the value of the accepted value for auth_permission, Sector is a Django bug. Apart from this excavation has supported the idea as though (although it is initially MySQL-related).

It is basically that a permissions name is created based on a model's verbose_name and a descriptive permission string, which is auth.models.primission.name. Can reach more than 50 characters allowed in.

To quote a comment on the Django ticket:

The longest prefix for the string value in column auth_permission.name can "switch between both" and "delete "The maximum length of the 11-letter column is 50, so the maximum length of MetaWorbos_name is 39.

One solution to support that column> 50 characters (ideally will be through South Migration, I say), so that it can be repeated easily), but most The fastest, most reliable fix I could imagine was that my extra-long verbose_name definition was very limited (from verbose_name to about 20 characters). Now all the work is fine


Comments