68. Down Sync Testen
Arwen:~/dev/rtime jcf$ ruby script/server -p 3030
=> Booting Mongrel (use 'script/server webrick' to force WEBrick)
=> Rails application starting on http://0.0.0.0:3030
=> Call with -d to detach
=> Ctrl-C to shutdown server
** Starting Mongrel listening at 0.0.0.0:3030
69. Down Sync Testen
Arwen:~/dev/rtime jcf$ ruby script/server -p 3030
=> Booting Mongrel (use 'script/server webrick' to force WEBrick)
=> Rails application starting on http://0.0.0.0:3030
=> Call with -d to detach
=> Ctrl-C to shutdown server
** Starting Mongrel listening at 0.0.0.0:3030
Arwen:~/dev/rtime-s/VM jcf$ ./bin/sync_down.sh jcf 123456 localhost:3030
(in /Users/jcf/dev/rtime-s/VM/trunk)
Syncing downward
/Users/jcf/dev/rtime-s/VM/trunk/config/..
offline mode is
http://jcf:123456@localhost:3030/sync
response.body <?xml version=quot;1.0quot; encoding=quot;UTF-8quot;?>
<SlingshotDown>
<CurrentMigration>2</CurrentMigration>
<SyncTime>Wed Jun 20 20:27:26 UTC 2007</SyncTime>
<ValidIDBlock>customers,1
projects,1
tasks,1
users,1
73. Quiz!
• Was passiert, wenn Änderungen sowohl in
der lokalen Kopie und auf dem Server
gemacht werden?
• Was passiert, wenn neue Einträge lokal und
auf dem Server gemacht werden?
94. Gotcha?
== AddSlinghotColumns: migrating
==============================================
-- add_column(:customers, :created_at, :datetime)
rake aborted!
SQLite3::SQLException: near quot;ADDquot;: syntax error: ALTER
TABLE customers ADD quot;created_atquot; datetime
unterschiedliche Version von SQLite3 auf der
Entwicklungsmaschine und im Slingshot Verzeichnis
$ source jenv.sh
95. Gotcha 2
• Beim synchronisieren in die lokale DB wird
AR.save aufgerufen
• Aufpassen auf Validierungen, before_create,
before_save etc...