Commit d13d11f Pavel Zavora
committed
1 parent 2968bdc commit d13d11f Copy full SHA for d13d11f
File tree 2 files changed +2
-2
lines changed
src/main/java/io/github/sranka/jdbcimage/db
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -16,13 +16,14 @@ The tool ignores missing tables and columns when importing the data.
16
16
* * password*
17
17
3 . Export to a zip file
18
18
* jdbcimage export -url=jdbc:mariadb://localhost:3306/qa -user=root -password=root mysql.zip
19
- * jdbcimage export -url=jdbc:postgresql://localhost:5432/inttests?currentSchema=qa -user=postgres -password=postres postgres.zip
19
+ * jdbcimage export -url=jdbc:postgresql://localhost:5432/inttests?stringtype=unspecified& currentSchema=qa -user=postgres -password=postres postgres.zip
20
20
* jdbcimage export -url=jdbc:oracle:thin:@localhost :1521: XE -user=system -password=changeit oracle.zip
21
21
* jdbcimage export -url=jdbc:sqlserver://localhost:1433;databaseName=XE -user=sa -password=changeit sqlserver.zip
22
22
4 . Import from a zip file
23
23
* BEWARE: !!!import deletes data from all tables contained in the imported zip file!!!
24
24
* jdbcimage import -url=jdbc:mariadb://localhost:3306/qa -user=root -password=root -ignored_tables=SCHEMAVERSION postgres.zip
25
25
* jdbcimage import -url=jdbc:postgresql://localhost:5432/inttests?stringtype=unspecified¤tSchema=qa -user=postgres -password=postres -ignored_tables=schemaversion mysql.zip
26
+ * ` stringtype=unspecified ` is required in the connection string in order to import data that map to JDBC OTHER type, such as json or jsonb
26
27
* jdbcimage -Xmx1024m import -url=jdbc:oracle:thin:@localhost :1521: XE -user=system -password=changeit -ignored_tables=SCHEMAVERSION mysql.zip
27
28
* jdbcimage import -url=jdbc:sqlserver://localhost:1433;databaseName=XE -user=sa -password=changeit -ignored_tables=SCHEMAVERSION mysql.zip
28
29
5 . Take a look at table data in a zip file
Original file line number Diff line number Diff line change @@ -210,7 +210,6 @@ public void accept(RowData t) {
210
210
break ;
211
211
case Types .OTHER :
212
212
if (value instanceof String ){
213
- // set string, if it was serialized to string
214
213
// requires stringtype=unspecified in postgres connection string
215
214
stmt .setString (pos , (String )value );
216
215
break ;
You can’t perform that action at this time.
0 commit comments