You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
echo "\\copy $TABLE to '$FILE'" | heroku pg:psql --remote $REMOTE
echo "CREATE TABLE $BACKUP ( LIKE $TABLE INCLUDING ALL ) ; INSERT INTO $BACKUP SELECT * FROM $TABLE ; TRUNCATE TABLE $TABLE; \\copy $TABLE from '$FILE'; SELECT setval('${TABLE}_id_seq', max(id)) FROM $TABLE" | docker exec -i $CONTAINER rails db -p