Add setting migrations to apps
Add setting migrations for the common, converter, documents, file metadata, and document signatures app. Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
This commit is contained in:
16
mayan/apps/common/setting_migrations.py
Normal file
16
mayan/apps/common/setting_migrations.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from mayan.apps.smart_settings.classes import NamespaceMigration
|
||||
|
||||
from .serialization import yaml_load
|
||||
|
||||
|
||||
class CommonSettingMigration(NamespaceMigration):
|
||||
"""
|
||||
From version 0001 to 0002 backend arguments are no longer quoted
|
||||
but YAML valid too. Changed in version 3.3.
|
||||
"""
|
||||
def common_shared_storage_arguments_0001(self, value):
|
||||
return yaml_load(
|
||||
stream=value or '{}',
|
||||
)
|
||||
@@ -9,8 +9,12 @@ import mayan
|
||||
from mayan.apps.smart_settings.classes import Namespace
|
||||
|
||||
from .literals import DEFAULT_COMMON_HOME_VIEW
|
||||
from .setting_migrations import CommonSettingMigration
|
||||
|
||||
namespace = Namespace(label=_('Common'), name='common')
|
||||
namespace = Namespace(
|
||||
label=_('Common'), migration_class=CommonSettingMigration,
|
||||
name='common', version='0002'
|
||||
)
|
||||
|
||||
setting_auto_logging = namespace.add_setting(
|
||||
global_name='COMMON_AUTO_LOGGING',
|
||||
|
||||
Reference in New Issue
Block a user