Changes for page Database Compatibility and Comparisons-DataMigration
Last modified by Pascal Robert on 2007/09/03 20:57
From version 3.1
edited by Pascal Robert
on 2007/09/03 20:57
on 2007/09/03 20:57
Change comment:
There is no comment for this version
To version 2.1
edited by smmccraw
on 2007/07/08 10:29
on 2007/07/08 10:29
Change comment:
There is no comment for this version
Summary
-
Page properties (3 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,1 @@ 1 -Database Compatibility and Comparisons-DataMigration 1 +Programming__WebObjects-Database Compatibility and Comparisons-DataMigration - Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. probert1 +XWiki.smmccraw - Content
-
... ... @@ -1,28 +1,28 @@ 1 -== Project Wonder == 1 +== Project Wonder == 2 2 3 3 ProjectWonder provides a really handy tool for migrating data between two databases: 4 4 5 -{{ code}}5 +{{panel}} 6 6 7 - NSMutableDictionary sourceDict = new NSMutableDictionary(); 8 - sourceDict.setObjectForKey("YourPassword", "password"); 9 - sourceDict.setObjectForKey("YourUserName", "username"); 10 - sourceDict.setObjectForKey("jdbc:FrontBase://127.0.0.1/YourSourceDatabase", "URL"); 11 - sourceDict.setObjectForKey("com.frontbase.jdbc.FBJDriver", "driver"); 12 - sourceDict.setObjectForKey(Boolean.FALSE.toString(), "autoCommit"); 13 - sourceDict.setObjectForKey(Boolean.TRUE.toString(), "readOnly"); 14 - sourceDict.setObjectForKey(Boolean.TRUE.toString(), "quote"); 7 + NSMutableDictionary sourceDict = new NSMutableDictionary(); 8 + sourceDict.setObjectForKey("YourPassword", "password"); 9 + sourceDict.setObjectForKey("YourUserName", "username"); 10 + sourceDict.setObjectForKey("jdbc:FrontBase://127.0.0.1/YourSourceDatabase", "URL"); 11 + sourceDict.setObjectForKey("com.frontbase.jdbc.FBJDriver", "driver"); 12 + sourceDict.setObjectForKey(Boolean.FALSE.toString(), "autoCommit"); 13 + sourceDict.setObjectForKey(Boolean.TRUE.toString(), "readOnly"); 14 + sourceDict.setObjectForKey(Boolean.TRUE.toString(), "quote"); 15 + 16 + NSMutableDictionary destDict = sourceDict.mutableClone(); 17 + destDict.setObjectForKey("jdbc:postgresql://localhost/YourDestinationDatabase", "URL"); 18 + destDict.setObjectForKey("YourPassword", "password"); 19 + destDict.setObjectForKey("YourUserName", "username"); 20 + destDict.setObjectForKey("org.postgresql.Driver", "driver"); 21 + destDict.setObjectForKey(Boolean.FALSE.toString(), "autoCommit"); 22 + destDict.setObjectForKey(Boolean.FALSE.toString(), "readOnly"); 23 + destDict.setObjectForKey(Boolean.FALSE.toString(), "quote"); 24 + 25 + EOModel model = EOModelGroup.defaultGroup().modelNamed("YourModelName"); 26 + ERXJDBCUtilities._copyDatabaseDefinedByEOModelAndConnectionDictionaryToDatabaseWithConnectionDictionary(model, sourceDict, destDict); 15 15 16 - NSMutableDictionary destDict = sourceDict.mutableClone(); 17 - destDict.setObjectForKey("jdbc:postgresql://localhost/YourDestinationDatabase", "URL"); 18 - destDict.setObjectForKey("YourPassword", "password"); 19 - destDict.setObjectForKey("YourUserName", "username"); 20 - destDict.setObjectForKey("org.postgresql.Driver", "driver"); 21 - destDict.setObjectForKey(Boolean.FALSE.toString(), "autoCommit"); 22 - destDict.setObjectForKey(Boolean.FALSE.toString(), "readOnly"); 23 - destDict.setObjectForKey(Boolean.FALSE.toString(), "quote"); 24 - 25 - EOModel model = EOModelGroup.defaultGroup().modelNamed("YourModelName"); 26 - ERXJDBCUtilities._copyDatabaseDefinedByEOModelAndConnectionDictionaryToDatabaseWithConnectionDictionary(model, sourceDict, destDict); 27 - 28 -{{/code}} 28 +{{/panel}}