Skip to content

Instantly share code, notes, and snippets.

@iheitlager
Last active September 14, 2017 20:17
Show Gist options
  • Save iheitlager/4cbe29194344817cac567f4f47838109 to your computer and use it in GitHub Desktop.
Save iheitlager/4cbe29194344817cac567f4f47838109 to your computer and use it in GitHub Desktop.
Basic migration script
import sys, csv
reader = csv.DictReader(sys.stdin)
for row in reader:
print('INSERT INTO `table` (a,b) VALUES ("%(a)s", %(b)s)' % row)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment