db-sync-tool-kmi 2.11.7__py3-none-any.whl → 2.11.8__py3-none-any.whl
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.
Potentially problematic release.
This version of db-sync-tool-kmi might be problematic. Click here for more details.
- db_sync_tool/database/process.py +4 -5
- db_sync_tool/database/utility.py +2 -2
- db_sync_tool/info.py +1 -1
- {db_sync_tool_kmi-2.11.7.dist-info → db_sync_tool_kmi-2.11.8.dist-info}/METADATA +1 -1
- {db_sync_tool_kmi-2.11.7.dist-info → db_sync_tool_kmi-2.11.8.dist-info}/RECORD +9 -9
- {db_sync_tool_kmi-2.11.7.dist-info → db_sync_tool_kmi-2.11.8.dist-info}/LICENSE +0 -0
- {db_sync_tool_kmi-2.11.7.dist-info → db_sync_tool_kmi-2.11.8.dist-info}/WHEEL +0 -0
- {db_sync_tool_kmi-2.11.7.dist-info → db_sync_tool_kmi-2.11.8.dist-info}/entry_points.txt +0 -0
- {db_sync_tool_kmi-2.11.7.dist-info → db_sync_tool_kmi-2.11.8.dist-info}/top_level.txt +0 -0
db_sync_tool/database/process.py
CHANGED
|
@@ -51,9 +51,9 @@ def create_origin_database_dump():
|
|
|
51
51
|
_mysqldump_options = _mysqldump_options + f'{_additional} '
|
|
52
52
|
|
|
53
53
|
# Run mysql dump command, e.g.
|
|
54
|
-
#
|
|
54
|
+
# mysqldump --no-tablespaces -u'db' -p'db' -h'db1' -P'3306' 'db' > /tmp/_db_08-10-2021_07-00.sql
|
|
55
55
|
mode.run_command(
|
|
56
|
-
|
|
56
|
+
helper.get_command(mode.Client.ORIGIN, 'mysqldump') + ' ' + _mysqldump_options +
|
|
57
57
|
database_utility.generate_mysql_credentials(mode.Client.ORIGIN) + ' \'' +
|
|
58
58
|
system.config[mode.Client.ORIGIN]['db']['name'] + '\' ' +
|
|
59
59
|
database_utility.generate_ignore_database_tables() +
|
|
@@ -149,7 +149,6 @@ def import_database_dump_file(client, filepath):
|
|
|
149
149
|
"""
|
|
150
150
|
if helper.check_file_exists(client, filepath):
|
|
151
151
|
mode.run_command(
|
|
152
|
-
'MYSQL_PWD="' + system.config[client]['db']['password'] + '" ' +
|
|
153
152
|
helper.get_command(client, 'mysql') + ' ' +
|
|
154
153
|
database_utility.generate_mysql_credentials(client) + ' \'' +
|
|
155
154
|
system.config[client]['db']['name'] + '\' < ' + filepath,
|
|
@@ -208,13 +207,13 @@ def clear_database(client):
|
|
|
208
207
|
:return:
|
|
209
208
|
"""
|
|
210
209
|
mode.run_command(
|
|
211
|
-
'{
|
|
210
|
+
'{ ' + helper.get_command(client, 'mysql') + ' ' +
|
|
212
211
|
database_utility.generate_mysql_credentials(client) +
|
|
213
212
|
' -Nse \'show tables\' \'' +
|
|
214
213
|
system.config[client]['db']['name'] + '\'; }' +
|
|
215
214
|
' | ( while read table; do if [ -z ${i+x} ]; then echo \'SET FOREIGN_KEY_CHECKS = 0;\'; fi; i=1; ' +
|
|
216
215
|
'echo "drop table \\`$table\\`;"; done; echo \'SET FOREIGN_KEY_CHECKS = 1;\' ) | awk \'{print}\' ORS=' ' | ' +
|
|
217
|
-
'
|
|
216
|
+
' ' +
|
|
218
217
|
helper.get_command(client, 'mysql') + ' ' +
|
|
219
218
|
database_utility.generate_mysql_credentials(client) + ' ' +
|
|
220
219
|
system.config[client]['db']['name'],
|
db_sync_tool/database/utility.py
CHANGED
|
@@ -29,7 +29,7 @@ def run_database_command(client, command, force_database_name=False):
|
|
|
29
29
|
_database_name = ' ' + system.config[client]['db']['name'] if force_database_name else ''
|
|
30
30
|
|
|
31
31
|
return mode.run_command(
|
|
32
|
-
|
|
32
|
+
helper.get_command(client, 'mysql') + ' ' + generate_mysql_credentials(
|
|
33
33
|
client) + _database_name + ' -e "' + command + '"',
|
|
34
34
|
client, True)
|
|
35
35
|
|
|
@@ -144,7 +144,7 @@ def get_database_tables():
|
|
|
144
144
|
return _result
|
|
145
145
|
|
|
146
146
|
|
|
147
|
-
def generate_mysql_credentials(client, force_password=
|
|
147
|
+
def generate_mysql_credentials(client, force_password=True):
|
|
148
148
|
"""
|
|
149
149
|
Generate the needed database credential information for the mysql command
|
|
150
150
|
:param client: String
|
db_sync_tool/info.py
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
db_sync_tool/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
db_sync_tool/__main__.py,sha256=-pD13j2oYcKLhPprLy-LQeDCapj-FKrV3CDFHuYJu3g,11541
|
|
3
|
-
db_sync_tool/info.py,sha256=
|
|
3
|
+
db_sync_tool/info.py,sha256=oltTVrkzR98MZMAvIQoE1Y5IIg-VIr2BIY0E1LyPANc,165
|
|
4
4
|
db_sync_tool/sync.py,sha256=WMfMts0M8z3oecI-HL07xG9ktbba8D8h7_U-8tBwizY,2087
|
|
5
5
|
db_sync_tool/database/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
-
db_sync_tool/database/process.py,sha256=
|
|
7
|
-
db_sync_tool/database/utility.py,sha256=
|
|
6
|
+
db_sync_tool/database/process.py,sha256=djOnNnwEswkmPbnJVsI3SvPSwzcZgAapighh3Ew5heE,8069
|
|
7
|
+
db_sync_tool/database/utility.py,sha256=MRvTfF0ZCdcDW1EfIwIJR4ZtemxTBasOf45q5hor6vs,7717
|
|
8
8
|
db_sync_tool/recipes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
9
|
db_sync_tool/recipes/drupal.py,sha256=jAo1d3vxZ4UZ4Vzk308Dsmn1--ORmVO2g87l8OpQoPw,1505
|
|
10
10
|
db_sync_tool/recipes/laravel.py,sha256=kp_gnKG0iyX_rzM0GW7Ca9ZPV3oGfEgGsLvJR_0pVDo,1175
|
|
@@ -26,9 +26,9 @@ db_sync_tool/utility/output.py,sha256=uoiWE7Pm8qv1a3vrBupZHE545d1uZSQHiLAUgkHofL
|
|
|
26
26
|
db_sync_tool/utility/parser.py,sha256=DIdWVGyiltyH8akoWyyXLvUmFPR-nvBrnzDctPJzgKw,6624
|
|
27
27
|
db_sync_tool/utility/system.py,sha256=G74lWGFcJNmLr0l6-GkZWmkk7q3icv4MccuHFKP_Vsw,18539
|
|
28
28
|
db_sync_tool/utility/validation.py,sha256=qZNPgkTwV_kJTNtFh0OXb2FHrsWPnDA2W_fftWs5hZc,3530
|
|
29
|
-
db_sync_tool_kmi-2.11.
|
|
30
|
-
db_sync_tool_kmi-2.11.
|
|
31
|
-
db_sync_tool_kmi-2.11.
|
|
32
|
-
db_sync_tool_kmi-2.11.
|
|
33
|
-
db_sync_tool_kmi-2.11.
|
|
34
|
-
db_sync_tool_kmi-2.11.
|
|
29
|
+
db_sync_tool_kmi-2.11.8.dist-info/LICENSE,sha256=o_R9gPKBRl4PQVcGCrWuTYsJQJ7uuQDcDaq-wapBUaw,1082
|
|
30
|
+
db_sync_tool_kmi-2.11.8.dist-info/METADATA,sha256=EGxuPJ7XlzkctysvkkSIu8oqC7Wt1KvcHzx_ljWaiBE,12505
|
|
31
|
+
db_sync_tool_kmi-2.11.8.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
32
|
+
db_sync_tool_kmi-2.11.8.dist-info/entry_points.txt,sha256=bVk6UR_ejpfY2oSCoOii7uKQivwV9MtA6Tdqpjg4Yvo,60
|
|
33
|
+
db_sync_tool_kmi-2.11.8.dist-info/top_level.txt,sha256=Uj5hJLhmdynFrBE0VnX0PfgIBC8_n7h2vgldqUQ-xfw,13
|
|
34
|
+
db_sync_tool_kmi-2.11.8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|