diff --git a/beat/web/databases/migrations/0003_auto_20160630_1710.py b/beat/web/databases/migrations/0003_auto_20160630_1710.py new file mode 100644 index 0000000000000000000000000000000000000000..9ba33dccc92e3121332148dfddb20d2aabd8d523 --- /dev/null +++ b/beat/web/databases/migrations/0003_auto_20160630_1710.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.5 on 2016-06-30 17:10 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('databases', '0002_scheduler_addons'), + ] + + operations = [ + migrations.AlterModelOptions( + name='database', + options={'ordering': ['previous_version_id', 'fork_of_id', 'id']}, + ), + ] diff --git a/beat/web/databases/models.py b/beat/web/databases/models.py index 01bb490b12276b974a3562940050b221a9efc588..d7f500102f3bf6f184d219c4b22998c4e3fc57d8 100755 --- a/beat/web/databases/models.py +++ b/beat/web/databases/models.py @@ -189,9 +189,14 @@ class Database(Versionable): #_____ Meta parameters __________ - class Meta: + class Meta(Versionable.Meta): unique_together = ('name', 'version') + # setup ordering so that the dump order respects self dependencies + # note: Versionable already has the right ordering - not sure why + # `django makemigrations' is not detecting it though. + ordering = ['previous_version_id', 'fork_of_id', 'id'] + #_____ Utilities __________