Re: Fixture Funny : 1st Row Of Each Table Missing
Ok. So I fixed the problem by starting my PK values at 1. It seems
like there is a discrepancy between the way fixtures are imported into
a mysql db and a sqlite db. Using PK's that start at 1 works on both.
On Jan 25, 11:18 am, Johan <djjord...@gmail.com> wrote:
> Hi. I'm having a funny issue. I have a fixture for my static tables.
> They are all populated via syncdb using the fixture. On my sqlite test
> environment it works perfectly. On my production environment, with a
> MySQL database, the data is populated into the tables via the fixture
> except for the first element in each table referenced in the fixture.
> Has anybody encountered this issue?
>
> Is it maybe the pk which is defined as 0 rather than 1?
>
> Here is an excerpt from my fixture:
>
> [
> {
> "model":"lookups.DayOfMonth",
> "pk" : 0,
> "fields" : {
> "code" : "1",
> "display_value" : "1"
> }
> }
> ,
> {
> "model":"lookups.DayOfMonth",
> "pk" : 1,
> "fields" : {
> "code" : "2",
> "display_value" : "2"
> }
> }
> ,
> ...
> ]
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home