-
-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create python script to rename wikis with one command (T11621) #3589
Create python script to rename wikis with one command (T11621) #3589
Conversation
|
||
args = parser.parse_args() | ||
def get_db_cluster(oldwiki_db: str) -> str: | ||
command = generate_salt_command('db131*', f'cmd.run "mysql -e \'SELECT wiki_dbcluster FROM mhglobal.cw_wikis WHERE wiki_dbname = "{oldwiki_db}" \' "') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be:
command = generate_salt_command('db131*', f'cmd.run 'mysql -e "SELECT wiki_dbcluster FROM mhglobal.cw_wikis WHERE wiki_dbname = '{oldwiki_db}'" '')
I've tried various things but it seems python/salt don't like escaping. We could potentially replace the SQL with a RemoteWiki getDBcluster but that would need a script. |
27a7331
into
miraheze:Reception123-patch-1
No description provided.