From 869408e71260047a94f31be91b1b066b3ccf5f50 Mon Sep 17 00:00:00 2001 From: Mateusz Piotrowski Date: Mon, 2 Oct 2017 23:02:33 +0200 Subject: [PATCH] Change the tree trigger to order children by name --- storage/migrations/0005.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 storage/migrations/0005.py diff --git a/storage/migrations/0005.py b/storage/migrations/0005.py new file mode 100644 index 0000000..e08999e --- /dev/null +++ b/storage/migrations/0005.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models +from tree.operations import CreateTreeTrigger, DeleteTreeTrigger, RebuildPaths + +class Migration(migrations.Migration): + + dependencies = [ + ('storage', '0004_auto_20170528_1945'), + ] + + operations = [ + DeleteTreeTrigger('storage.Item'), + CreateTreeTrigger('storage.Item', order_by=('name',)), + RebuildPaths('storage.Item') + ]