-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathupgrade.py
26 lines (22 loc) · 969 Bytes
/
upgrade.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# -*- python -*-
"""This is a template upgrade script.
The purpose is both to cover the most common use-case (updating all modules)
and to provide an example of how this works.
"""
def run(session, logger):
"""Update all modules."""
if session.is_initialization:
logger.warn("Usage of upgrade script for initialization detected. "
"You should consider customizing the present upgrade "
"script to add modules install commands. The present "
"script is at : %s (byte-compiled form)",
__file__)
return
logger.info("Procedimento de atualização, versão atual: " +
session.db_version)
if session.db_version < '10.0.0.0.0':
session.update_modules(['all'])
# elif session.db_version < '10.0.0.0.1':
# session.update_modules(['all'])
# elif session.db_version < '10.0.0.0.1':
# session.update_modules(['all'])