For photos
authorSteve Sutton <steve@gaslightmedia.com>
Thu, 13 Feb 2014 21:48:04 +0000 (21:48 +0000)
committerSteve Sutton <steve@gaslightmedia.com>
Thu, 13 Feb 2014 21:48:04 +0000 (21:48 +0000)
to grab current photos

Toolkit/Photos/Database/dbDump.sh [new file with mode: 0755]
Toolkit/Photos/Database/loadData.sql [new file with mode: 0644]

diff --git a/Toolkit/Photos/Database/dbDump.sh b/Toolkit/Photos/Database/dbDump.sh
new file mode 100755 (executable)
index 0000000..1df4a43
--- /dev/null
@@ -0,0 +1,13 @@
+#! /bin/bash
+
+pgDump='/usr/bin/pg_dump -U postgres --column-inserts'
+dbHost='ds3'
+dbName='troutcreek'
+#iconv='/usr/bin/iconv -f ISO-8859-1 -t UTF-8'
+
+$pgDump -h $dbHost $dbName  -t photo_category -f ./data/photo_category.sql
+$pgDump -h $dbHost $dbName  -t photo -f ./data/photo.sql
+$pgDump -h $dbHost $dbName  -t photo_category_bus -f ./data/photo_category_bus.sql
+
+#$iconv ./data/photo.sql > ./data/photo-utf-8.sql
+
diff --git a/Toolkit/Photos/Database/loadData.sql b/Toolkit/Photos/Database/loadData.sql
new file mode 100644 (file)
index 0000000..5ae4406
--- /dev/null
@@ -0,0 +1,8 @@
+--
+-- Load current photo data
+--
+-- SET search_path = photos;
+
+\i ./data/photo_category.sql
+\i ./data/photo.sql
+\i ./data/photo_category_bus.sql