<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>restore_usertables.sh</filename>
    </added>
    <added>
      <filename>save_usertables.sh</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -18,6 +18,8 @@ CRAWL=../data/crawl
 PARSE=../data/parse
 LOAD=../data/load
 
+USERDATA=usersdump$(shell date +&quot;_%b_%d_%Y&quot;).sql
+
 TSVS=$(LOAD)/bill.tsv \
 	 $(LOAD)/vote.tsv \
 	 $(LOAD)/zip4.tsv \
@@ -34,7 +36,7 @@ NJS=$(PARSE)/almanac.njs \
 LOADERS = .schema .manual \
           .almanac .centers .voteview .govtrack \
           .bills .interests .votesmart .photos .lobbyist \
-		  .fec .census .soi .earmarks .wyr
+		  .fec .census .soi .earmarks .wyr .saveusers .restoreusers
 
 all: database
 clean:
@@ -52,11 +54,20 @@ database: $(LOADERS)
 	$(PYTHON) load/manual.py
 	touch $@
 
-.schema: ../schema.py
+.schema: .saveusers ../schema.py
 	$(PYTHON) -c &quot;import schema; schema.sql.recreate(); schema.sql.grantall('watchdog'); schema.init()&quot;
 	-rm .bills
 	touch $@
 
+.saveusers:	../save_usertables.sh
+	../save_usertables.sh $(WATCHDOG_TABLE) $(USERDATA)
+	touch $@
+
+.restoreusers:	.saveusers ../restore_usertables.sh
+	../restore_usertables.sh $(WATCHDOG_TABLE) $(USERDATA)
+	touch $@
+
+
 # not currently using .shapes
 .shapes: .manual load/shapes.py parse/shapes.py
 	$(PYTHON) load/shapes.py</diff>
      <filename>import/Makefile</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>4222e9120ddbd5f28c62ad8479248f3d34cc88d9</id>
    </parent>
  </parents>
  <author>
    <name>Devi</name>
    <email>asldevi@gmail.com</email>
  </author>
  <url>http://github.com/aaronsw/watchdog/commit/5afb95b9089c873f194c7112b4465f372b8df2e7</url>
  <id>5afb95b9089c873f194c7112b4465f372b8df2e7</id>
  <committed-date>2008-11-05T22:34:58-08:00</committed-date>
  <authored-date>2008-11-05T22:34:58-08:00</authored-date>
  <message>script to preserve user data on db reloads</message>
  <tree>453e78a5af0138e4aff6ebc9f3c5851c67194ad5</tree>
  <committer>
    <name>Devi</name>
    <email>asldevi@gmail.com</email>
  </committer>
</commit>
