MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / db_upgrade

Function db_upgrade

web/pgadmin/setup/db_upgrade.py:15–25  ·  view source on GitHub ↗
(app)

Source from the content-addressed store, hash-verified

13
14
15def db_upgrade(app):
16 from pgadmin.utils import u_encode, fs_encoding
17 with app.app_context():
18 migration_folder = os.path.join(
19 os.path.dirname(os.path.realpath(u_encode(__file__, fs_encoding))),
20 os.pardir, os.pardir,
21 'migrations'
22 )
23 # Below line is a workaround to make Flask-Migrate>=4.0.6 work.
24 g.x_arg = []
25 flask_migrate.upgrade(migration_folder)

Callers 5

run_migration_for_sqliteFunction · 0.90
run_migration_for_othersFunction · 0.90
backup_db_fileFunction · 0.90
upgrade_dbFunction · 0.90
run_migration_for_othersFunction · 0.90

Calls 3

u_encodeFunction · 0.90
joinMethod · 0.80
dirnameMethod · 0.80

Tested by

no test coverage detected