From 24edb2b192ee3c880722e800a001e38807f398b6 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Wed, 23 Sep 2015 01:59:30 +0200 Subject: DBSettings: allow_syncdb is replaced with allow_migrate --- src/lib/Bcfg2/DBSettings.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/lib/Bcfg2/DBSettings.py b/src/lib/Bcfg2/DBSettings.py index 5c3b8a265..61ab80253 100644 --- a/src/lib/Bcfg2/DBSettings.py +++ b/src/lib/Bcfg2/DBSettings.py @@ -251,7 +251,14 @@ class PerApplicationRouter(object): def allow_syncdb(self, *_): """ Called when Django wants to determine which models to sync to a given database. Take the cowards way out and sync all models to all - databases to allow for easy migrations. """ + databases to allow for easy migrations. This method is replaced with + allow_migrate in django 1.7 and higher. """ + return True + + def allow_migrate(self, *_args, **_kwargs): + """ Called when Django wants to determine which migrations should + be run on a given database. Take the cowards way out and run all + migrations to all databases to allow for easy migrations. """ return True -- cgit v1.2.3-1-g7c22