djangosnippets.org: Latest snippets tagged with 'schema-evolution'https://djangosnippets.org/tags/schema-evolution/2008-06-20T12:26:34.864746-05:00Command to dump data as a python script
2008-06-20T12:26:34.864746-05:00willhardyhttps://djangosnippets.org/snippets/818/<p>This creates a fixture in the form of a python script.</p>
<p>Handles:</p>
<ol>
<li><code>ForeignKey</code> and <code>ManyToManyField</code>s (using python variables, not IDs)</li>
<li>Self-referencing <code>ForeignKey</code> (and M2M) fields</li>
<li>Sub-classed models</li>
<li><code>ContentType</code> fields</li>
<li>Recursive references</li>
<li><code>AutoField</code>s are excluded</li>
<li>Parent models are only included when no other child model links to it</li>
</ol>
<p>There …</p>
Freely redistributableSimple solution for model schema evolution / database changelog
2007-06-16T11:00:17.426863-05:00kahlesshttps://djangosnippets.org/snippets/289/<p>This is a very simple approach to "schema evolution" (Not sure if you can even call it so) - I use it for my project: <a href="http://sct.sphene.net">SCT</a> and it seems to work quite nicely.</p>
<p>The idea is, that if you add or change your models, you add a 'changelog' attribute to …</p>
Freely redistributable