ufload3 2.2__tar.gz → 2.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ufload3-2.2/ufload3.egg-info → ufload3-2.4}/PKG-INFO +1 -1
- {ufload3-2.2 → ufload3-2.4}/ufload3/__init__.py +1 -1
- {ufload3-2.2 → ufload3-2.4}/ufload3/db.py +24 -3
- {ufload3-2.2 → ufload3-2.4/ufload3.egg-info}/PKG-INFO +1 -1
- {ufload3-2.2 → ufload3-2.4}/LICENSE +0 -0
- {ufload3-2.2 → ufload3-2.4}/README.md +0 -0
- {ufload3-2.2 → ufload3-2.4}/pyproject.toml +0 -0
- {ufload3-2.2 → ufload3-2.4}/setup.cfg +0 -0
- {ufload3-2.2 → ufload3-2.4}/ufload3/cli/__init__.py +0 -0
- {ufload3-2.2 → ufload3-2.4}/ufload3/cli/main.py +0 -0
- {ufload3-2.2 → ufload3-2.4}/ufload3/cli/test_main.py +0 -0
- {ufload3-2.2 → ufload3-2.4}/ufload3/cloud.py +0 -0
- {ufload3-2.2 → ufload3-2.4}/ufload3/test_cloud.py +0 -0
- {ufload3-2.2 → ufload3-2.4}/ufload3/test_db.py +0 -0
- {ufload3-2.2 → ufload3-2.4}/ufload3/webdav.py +0 -0
- {ufload3-2.2 → ufload3-2.4}/ufload3.egg-info/SOURCES.txt +0 -0
- {ufload3-2.2 → ufload3-2.4}/ufload3.egg-info/dependency_links.txt +0 -0
- {ufload3-2.2 → ufload3-2.4}/ufload3.egg-info/entry_points.txt +0 -0
- {ufload3-2.2 → ufload3-2.4}/ufload3.egg-info/requires.txt +0 -0
- {ufload3-2.2 → ufload3-2.4}/ufload3.egg-info/top_level.txt +0 -0
|
@@ -94,7 +94,15 @@ def psql(args, sql, db='postgres', silent=False):
|
|
|
94
94
|
|
|
95
95
|
def psql_file(args, file, db='postgres', silent=False):
|
|
96
96
|
return _run(args, mkpsql_file(args, file, db), silent)
|
|
97
|
-
|
|
97
|
+
|
|
98
|
+
def _check_column_exists(args, table, column, db):
|
|
99
|
+
v = _run(args, mkpsql(args, """SELECT c.relname
|
|
100
|
+
FROM pg_class c, pg_attribute a
|
|
101
|
+
WHERE c.relname='%s' AND a.attname='%s' AND c.oid=a.attrelid;""" % (table, column), db), get_out=True)
|
|
102
|
+
if v and v[0] == 0:
|
|
103
|
+
return v[1].strip()
|
|
104
|
+
return False
|
|
105
|
+
|
|
98
106
|
def load_zip_into(args, db, f, sz):
|
|
99
107
|
if sz == 0:
|
|
100
108
|
ufload3.progress("Note: No progress percent available.")
|
|
@@ -391,6 +399,10 @@ def delive(args, db):
|
|
|
391
399
|
|
|
392
400
|
rc = psql(args, 'alter table sync_client_sync_server_connection ADD COLUMN IF NOT EXISTS ufload_automatic_patching_prod_value boolean;', db)
|
|
393
401
|
rc = psql(args, 'update sync_client_sync_server_connection set ufload_automatic_patching_prod_value=automatic_patching;', db)
|
|
402
|
+
|
|
403
|
+
rc = psql(args, 'alter table users_last_login ADD COLUMN IF NOT EXISTS date_prod_value timestamp without time zone;', db)
|
|
404
|
+
rc = psql(args, 'update users_last_login set date_prod_value=date;', db)
|
|
405
|
+
|
|
394
406
|
rc = psql(args, 'update sync_client_sync_server_connection set automatic_patching = \'f\', protocol = \'xmlrpc\', login = \'%s\', database = \'%s\', host = \'127.0.0.1\', port = %d;' % (adminuser, ss, port), db)
|
|
395
407
|
if rc != 0:
|
|
396
408
|
return rc
|
|
@@ -414,14 +426,23 @@ def delive(args, db):
|
|
|
414
426
|
if rc != 0:
|
|
415
427
|
return rc
|
|
416
428
|
# Automated import settings
|
|
417
|
-
psql(args, 'UPDATE automated_import SET report_path=\'\', src_path=\'\', ftp_url=\'\', dest_path=\'\', ftp_ok=\'f\', ftp_port=\'\',dest_path_failure=\'\', ftp_login=\'\', ftp_password=\'\', ftp_protocol=\'\';', db)
|
|
429
|
+
psql(args, 'UPDATE automated_import SET active=\'f\', report_path=\'\', src_path=\'\', ftp_url=\'\', dest_path=\'\', ftp_ok=\'f\', ftp_port=\'\',dest_path_failure=\'\', ftp_login=\'\', ftp_password=\'\', ftp_protocol=\'\';', db)
|
|
430
|
+
|
|
431
|
+
if _check_column_exists(args, "automated_import", "sharepoint_cert", db):
|
|
432
|
+
psql(args, 'UPDATE automated_import SET sharepoint_cert=NULL;', db)
|
|
433
|
+
|
|
434
|
+
if _check_column_exists(args, "msf_instance", "cloud_cert_content", db):
|
|
435
|
+
psql(args, 'UPDATE msf_instance SET cloud_cert_content=NULL;', db)
|
|
436
|
+
|
|
437
|
+
if _check_column_exists(args, "automated_import", "email_notification_type", db):
|
|
438
|
+
psql(args, 'UPDATE automated_import set email=NULL, email2=NULL, email3=NULL;', db)
|
|
418
439
|
|
|
419
440
|
# Automated export jobs
|
|
420
441
|
rc = psql(args, 'update ir_cron set active = \'f\' where model = \'automated.export\';', db)
|
|
421
442
|
if rc != 0:
|
|
422
443
|
return rc
|
|
423
444
|
# Automated export settings
|
|
424
|
-
psql(args, 'UPDATE automated_export SET report_path=\'\', ftp_url=\'\', dest_path=\'\', ftp_ok=\'f\', ftp_port=\'\',dest_path_failure=\'\', ftp_login=\'\', ftp_password=\'\', ftp_protocol=\'\';', db)
|
|
445
|
+
psql(args, 'UPDATE automated_export SET active=\'f\', report_path=\'\', ftp_url=\'\', dest_path=\'\', ftp_ok=\'f\', ftp_port=\'\',dest_path_failure=\'\', ftp_login=\'\', ftp_password=\'\', ftp_protocol=\'\';', db)
|
|
425
446
|
|
|
426
447
|
# Now we check for arguments allowing auto-sync and silent-upgrade
|
|
427
448
|
if args.autosync:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|