diff --git a/src/sources/sqlite.lisp b/src/sources/sqlite.lisp index 89f51d3..57c450d 100644 --- a/src/sources/sqlite.lisp +++ b/src/sources/sqlite.lisp @@ -21,6 +21,8 @@ ((string-equal sqlite-type-name "datetime") "timestamptz") + ((string-equal sqlite-type-name "double") "double precision") + (t sqlite-type-name))) (defmethod format-pgsql-column ((col coldef) &key identifier-case) @@ -128,6 +130,7 @@ ;; objects, where we only want to deal with text. ;; (cond ((or (string-equal "float" coltype) + (string-equal "double precision" coltype) (and (<= 7 (length coltype)) (string-equal "numeric" coltype :end2 7))) #'pgloader.transforms::float-to-string) @@ -135,9 +138,6 @@ ((string-equal "text" coltype) nil) - ((string-equal "double" coltype) - "double precision") - (t (compile nil (lambda (c) (when c diff --git a/test/sqlite-chinook.load b/test/sqlite-chinook.load new file mode 100644 index 0000000..cfe3662 --- /dev/null +++ b/test/sqlite-chinook.load @@ -0,0 +1,7 @@ +load database + from 'sqlite/Chinook_Sqlite_AutoIncrementPKs.sqlite' + into postgresql:///pgloader + + with include drop, create tables, create indexes, reset sequences + + set work_mem to '16MB', maintenance_work_mem to '512 MB'; \ No newline at end of file diff --git a/test/sqlite.load b/test/sqlite.load index cfe3662..dae136e 100644 --- a/test/sqlite.load +++ b/test/sqlite.load @@ -1,5 +1,5 @@ load database - from 'sqlite/Chinook_Sqlite_AutoIncrementPKs.sqlite' + from 'sqlite/sqlite.db' into postgresql:///pgloader with include drop, create tables, create indexes, reset sequences diff --git a/test/sqlite/sqlite.db b/test/sqlite/sqlite.db new file mode 100644 index 0000000..c02a9da Binary files /dev/null and b/test/sqlite/sqlite.db differ