Skip to content

Instantly share code, notes, and snippets.

@rbrum
Created March 20, 2019 19:07
Show Gist options
  • Save rbrum/f7d687dc12e376db149228bb621f4898 to your computer and use it in GitHub Desktop.
Save rbrum/f7d687dc12e376db149228bb621f4898 to your computer and use it in GitHub Desktop.
Polls Migration Commands (for AXO 3356)
#!/bin/bash
# Export all poll data, then re-import when done.
# NOTE: This is not meant to be run as a Bash script, as-is, but meant to be run one command at a time.
# STEP 1 - BEFORE ACQUIA DB PUSH:
# Export the relevant tables and their data to a .sql dump file
mysqldump cvshealthd8_dev poll poll__choice poll_choice poll_choice_field_data poll_field_data poll_vote > path/to/filename.sql
# STEP 2 - AFTER ACQUIA DB PUSH:
# Re-import the tables and data into the database after Acquia DB push
mysql cvshealthd8_dev < path/to/filename.sql
# If either `mysql` or `mysqldump` need credentials, supply them the usual way like so:
#
# > mysql -u username -ppassword
#
# ...with no space between `-p` and the password.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment