Hi Marc.

Thanks for you explanation.


2014-04-19 13:46 GMT+02:00 Marc Tamlyn <marc.tam...@gmail.com>:

> Hi Andrey,
>
> There are limited use cases where initial data is a good idea. Examples
> might be where you have a list of countries for relating to or some other
> fixed set of data.
>
> The idea is that now instead if having a hard to maintain fixture for that
> table, you populate it with a data migration instead. This means if I for
> example add a new column to that table, you get a migration to add the
> column then one to populate it (then one to make it not null) as opposed to
> just the one migration which you then run, manually back around the
> database to get it populated, update the fixture dump, deploy and then
> reload that (potentially overwriting old data).
>
I understand that use of intial_data is not he best approach and +1 for
deprecate/remove it, but put migrations as replacement (or suggest it on
docs) is really confusing.
My purpose for this, is removing the suggestion on release notes to use
migrations as replacement of initial_data, because migrations just as word
says is for data migrations not inital data.

Personally I think the new version is much better. That said, there are
> limited use cases for this feature.
>
The current version is much better because removes features with bad usage
practices. But as I previously said, do not suggest an other bad approach
as replacement.

> Marc
> On 19 Apr 2014 12:21, "Andrey Antukh" <n...@niwi.be> wrote:
>
>>  Hi Christian.
>>
>> But, as far as I know, data migrations are "some logic" for translate
>> data from old scheme to new scheme and initial_data are files for load
>> intial data. I do not see where they could serve for the same purpose. Is
>> really confusing.
>>
>> Personally, putting initial data of my application mixed with migration
>> logic is bad approach for me. But is my opinion. :D
>>
>> Greetings.
>> Andrey
>>
>>
>>
>>
>>
>> 2014-04-19 13:13 GMT+02:00 Christian Schmitt <c.schm...@briefdomain.de>:
>>
>>> hm, at first i didn't even read the release notes..
>>> But i think we should definitly make a blocker issue in trac.
>>> Currently re-introduce initial_data is the worst thing we could do,
>>> since django 1.9 requires migrations and do deprecate that behavior:
>>> > Deprecated since version 1.7: If an application uses migrations,
>>> there is no automatic loading of fixtures. Since migrations will be
>>> required for applications in Django 1.9, this behavior is
>>> > considered deprecated. If you want to load initial data for an app,
>>> consider doing it in a migration.
>>>
>>> Currently I think that the third solution could be the best, in my case
>>> we have like a dataset of 50 or more entries as initial data, which could
>>> easily be mocked and/or dumped and reloaded. It won't take that much time.
>>> And as you already said for bigger applications fixtures didn't work, too.
>>> But I don't think it will make it in Django 1.7 and since data
>>> migrations are unusable if you rely on testing and initial_data this
>>> wouldn't be too good.
>>>
>>> > At this time I haven't touched the new migrations system for django.
>>> But now, reading the releases notes and this thread...
>>> > I don't understand how data migrations can replace initial_data, are
>>> two things completely different and they have completely different scope.
>>> I'm slightly confusing.
>>>
>>> Data Migrations are the same thing than initial_data i mean they can be
>>> used to load a data set and drop that dataset, thats way more flexible. But
>>> currently Django's TestSuite isn't prepared for Data Migrations. Thats
>>> infact a problem.
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django developers" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-developers+unsubscr...@googlegroups.com.
>>> To post to this group, send email to django-developers@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/django-developers.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-developers/6c14d75b-6720-4c97-b697-93adb759f134%40googlegroups.com<https://groups.google.com/d/msgid/django-developers/6c14d75b-6720-4c97-b697-93adb759f134%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> Andrey Antukh - Андрей Антух - <andrei.anto...@kaleidos.net> / <
>> n...@niwi.be>
>> http://www.niwi.be <http://www.niwi.be/page/about/>
>> https://github.com/niwibe
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-developers+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-developers@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-developers.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-developers/CAKn%3DmOP9_PoEZTmmm7PF7c-2_ikmkSXHk151m_iEYhB%2Broivwg%40mail.gmail.com<https://groups.google.com/d/msgid/django-developers/CAKn%3DmOP9_PoEZTmmm7PF7c-2_ikmkSXHk151m_iEYhB%2Broivwg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To post to this group, send email to django-developers@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/CAMwjO1H1BBNMWYt2y32vtv-c9%2BrNRthWsi%3D_W%3DpPNt32Z2oAMg%40mail.gmail.com<https://groups.google.com/d/msgid/django-developers/CAMwjO1H1BBNMWYt2y32vtv-c9%2BrNRthWsi%3D_W%3DpPNt32Z2oAMg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Andrey Antukh - Андрей Антух - <andrei.anto...@kaleidos.net> / <n...@niwi.be
>
http://www.niwi.be <http://www.niwi.be/page/about/>
https://github.com/niwibe

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAKn%3DmONcBoK%3DCWOgMHYJW9Z4StR1%2BXFgNO9qk6Hccx1kx7JENA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to