dimitri / pgloader

Migrate to PostgreSQL in a single command!
http://pgloader.io
Other
5.42k stars 546 forks source link

561400 of lisp codes in a single log for `WARNING Source column "table"."column" is casted to type #1=#S(PGLOADER.CATALOG:SQLTYPE {561398_LINES} which is not the same as "...", the type of current target database column ..."` #1574

Open n0099 opened 6 months ago

n0099 commented 6 months ago
n0099 commented 6 months ago

A shorter one with 352 lines:

2024-04-17T02:28:21.032000+08:00 LOG pgloader version "3.6.af8c3c1"
2024-04-17T02:28:21.231999+08:00 LOG Migrating from #<MYSQL-CONNECTION mysql://pgloader@localhost:3306/tbm {1007F66303}>
2024-04-17T02:28:21.231999+08:00 LOG Migrating into #<PGSQL-CONNECTION pgsql://tbm@localhost:5432/tbm {1007F66F23}>
2024-04-17T02:28:21.543997+08:00 WARNING Source column "tbm"."tbmi_metadata_embedded_exif_old"."\"orientation\"" is casted to type #1=#S(PGLOADER.CATALOG:SQLTYPE
                                                                                                :NAME "\"tbmi_metadata_embedded_exif_old_orientation\""
                                                                                                :SCHEMA #2=#S(PGLOADER.CATALOG:SCHEMA
                                                                                                              :SOURCE-NAME #3="tbm"
                                                                                                              :NAME "\"tbm\""
                                                                                                              :CATALOG #S(PGLOADER.CATALOG:CATALOG
                                                                                                                          :NAME #3#
                                                                                                                          :SCHEMA-LIST (#2#)
                                                                                                                          :TYPES-WITHOUT-BTREE (("aclitem"
                                                                                                                                                 . "hash")
                                                                                                                                                ("box"
                                                                                                                                                 . "gist")
                                                                                                                                                ("cid"
                                                                                                                                                 . "hash")
                                                                                                                                                ("circle"
                                                                                                                                                 . "gist")
                                                                                                                                                ("point"
                                                                                                                                                 . "gist")
                                                                                                                                                ("polygon"
                                                                                                                                                 . "gist")
                                                                                                                                                ("xid"
                                                                                                                                                 . "hash"))
                                                                                                                          :DISTRIBUTION-RULES NIL)
                                                                                                              :IN-SEARCH-PATH T
                                                                                                              :TABLE-LIST (#S(PGLOADER.CATALOG:TABLE
                                                                                                                              :SOURCE-NAME #4="tbmi_metadata_embedded_exif_old"
                                                                                                                              :NAME "\"tbmi_metadata_embedded_exif_old\""
                                                                                                                              :SCHEMA #2#
                                                                                                                              :OID 240037
                                                                                                                              :COMMENT NIL
                                                                                                                              :STORAGE-PARAMETER-LIST NIL
                                                                                                                              :TABLESPACE NIL
                                                                                                                              :ROW-COUNT-ESTIMATE 270818
                                                                                                                              :FIELD-LIST (#S(PGLOADER.SOURCE.MYSQL::MYSQL-COLUMN
                                                                                                                                              :TABLE-NAME #4#
                                                                                                                                              :NAME "imageId"
                                                                                                                                              :DTYPE "int"
                                                                                                                                              :CTYPE "int unsigned"
                                                                                                                                              :DEFAULT NIL
                                                                                                                                              :NULLABLE "NO"
                                                                                                                                              :EXTRA NIL
                                                                                                                                              :COMMENT NIL)
                                                                                                                                           #S(PGLOADER.SOURCE.MYSQL::MYSQL-COLUMN
                                                                                                                                              :TABLE-NAME "tbmi_metadata_embedded_exif_old"
                                                                                                                                              :NAME "orientation"
                                                                                                                                              :DTYPE "enum"
                                                                                                                                              :CTYPE #5="enum('Horizontal','MirrorHorizontal','Rotate180','MirrorVertical','MirrorHorizontalRotate270Cw','Rotate90Cw','MirrorHorizontalRotate90Cw','Rotate270Cw')"
                                                                                                                                              :DEFAULT NIL
                                                                                                                                              :NULLABLE "YES"
                                                                                                                                              :EXTRA NIL
                                                                                                                                              :COMMENT NIL)
                                                                                                                                           #S(PGLOADER.SOURCE.MYSQL::MYSQL-COLUMN
                                                                                                                                              :TABLE-NAME "tbmi_metadata_embedded_exif_old"
                                                                                                                                              :NAME "make"
                                                                                                                                              :DTYPE "text"
                                                                                                                                              :CTYPE "text"
                                                                                                                                              :DEFAULT NIL
                                                                                                                                              :NULLABLE "YES"
                                                                                                                                              :EXTRA NIL
                                                                                                                                              :COMMENT NIL)
                                                                                                                                           #S(PGLOADER.SOURCE.MYSQL::MYSQL-COLUMN
                                                                                                                                              :TABLE-NAME "tbmi_metadata_embedded_exif_old"
                                                                                                                                              :NAME "model"
                                                                                                                                              :DTYPE "text"
                                                                                                                                              :CTYPE "text"
                                                                                                                                              :DEFAULT NIL
                                                                                                                                              :NULLABLE "YES"
                                                                                                                                              :EXTRA NIL
                                                                                                                                              :COMMENT NIL)
                                                                                                                                           #S(PGLOADER.SOURCE.MYSQL::MYSQL-COLUMN
                                                                                                                                              :TABLE-NAME "tbmi_metadata_embedded_exif_old"
                                                                                                                                              :NAME "createDate"
                                                                                                                                              :DTYPE "datetime"
                                                                                                                                              :CTYPE "datetime"
                                                                                                                                              :DEFAULT NIL
                                                                                                                                              :NULLABLE "YES"
                                                                                                                                              :EXTRA NIL
                                                                                                                                              :COMMENT NIL)
                                                                                                                                           #S(PGLOADER.SOURCE.MYSQL::MYSQL-COLUMN
                                                                                                                                              :TABLE-NAME "tbmi_metadata_embedded_exif_old"
                                                                                                                                              :NAME "modifyDate"
                                                                                                                                              :DTYPE "datetime"
                                                                                                                                              :CTYPE "datetime"
                                                                                                                                              :DEFAULT NIL
                                                                                                                                              :NULLABLE "YES"
                                                                                                                                              :EXTRA NIL
                                                                                                                                              :COMMENT NIL)
                                                                                                                                           #S(PGLOADER.SOURCE.MYSQL::MYSQL-COLUMN
                                                                                                                                              :TABLE-NAME "tbmi_metadata_embedded_exif_old"
                                                                                                                                              :NAME "tagNames"
                                                                                                                                              :DTYPE "json"
                                                                                                                                              :CTYPE #6="json"
                                                                                                                                              :DEFAULT NIL
                                                                                                                                              :NULLABLE "NO"
                                                                                                                                              :EXTRA NIL
                                                                                                                                              :COMMENT NIL)
                                                                                                                                           #S(PGLOADER.SOURCE.MYSQL::MYSQL-COLUMN
                                                                                                                                              :TABLE-NAME "tbmi_metadata_embedded_exif_old"
                                                                                                                                              :NAME "rawBytes"
                                                                                                                                              :DTYPE "blob"
                                                                                                                                              :CTYPE "blob"
                                                                                                                                              :DEFAULT NIL
                                                                                                                                              :NULLABLE "NO"
                                                                                                                                              :EXTRA NIL
                                                                                                                                              :COMMENT NIL))
                                                                                                                              :COLUMN-LIST (#S(PGLOADER.CATALOG:COLUMN
                                                                                                                                               :TABLE NIL
                                                                                                                                               :NAME "\"imageId\""
                                                                                                                                               :TYPE-NAME "bigint"
                                                                                                                                               :TYPE-MOD NIL
                                                                                                                                               :NULLABLE NIL
                                                                                                                                               :DEFAULT NIL
                                                                                                                                               :COMMENT NIL
                                                                                                                                               :TRANSFORM NIL
                                                                                                                                               :EXTRA NIL
                                                                                                                                               :TRANSFORM-DEFAULT T)
                                                                                                                                            #S(PGLOADER.CATALOG:COLUMN
                                                                                                                                               :TABLE NIL
                                                                                                                                               :NAME "\"orientation\""
                                                                                                                                               :TYPE-NAME #1#
                                                                                                                                               :TYPE-MOD NIL
                                                                                                                                               :NULLABLE T
                                                                                                                                               :DEFAULT NIL
                                                                                                                                               :COMMENT NIL
                                                                                                                                               :TRANSFORM NIL
                                                                                                                                               :EXTRA NIL
                                                                                                                                               :TRANSFORM-DEFAULT T)
                                                                                                                                            #S(PGLOADER.CATALOG:COLUMN
                                                                                                                                               :TABLE NIL
                                                                                                                                               :NAME "\"make\""
                                                                                                                                               :TYPE-NAME #7="text"
                                                                                                                                               :TYPE-MOD NIL
                                                                                                                                               :NULLABLE T
                                                                                                                                               :DEFAULT NIL
                                                                                                                                               :COMMENT NIL
                                                                                                                                               :TRANSFORM PGLOADER.TRANSFORMS::REMOVE-NULL-CHARACTERS
                                                                                                                                               :EXTRA NIL
                                                                                                                                               :TRANSFORM-DEFAULT T)
                                                                                                                                            #S(PGLOADER.CATALOG:COLUMN
                                                                                                                                               :TABLE NIL
                                                                                                                                               :NAME "\"model\""
                                                                                                                                               :TYPE-NAME #7#
                                                                                                                                               :TYPE-MOD NIL
                                                                                                                                               :NULLABLE T
                                                                                                                                               :DEFAULT NIL
                                                                                                                                               :COMMENT NIL
                                                                                                                                               :TRANSFORM PGLOADER.TRANSFORMS::REMOVE-NULL-CHARACTERS
                                                                                                                                               :EXTRA NIL
                                                                                                                                               :TRANSFORM-DEFAULT T)
                                                                                                                                            #S(PGLOADER.CATALOG:COLUMN
                                                                                                                                               :TABLE NIL
                                                                                                                                               :NAME "\"createDate\""
                                                                                                                                               :TYPE-NAME #8="timestamptz"
                                                                                                                                               :TYPE-MOD NIL
                                                                                                                                               :NULLABLE T
                                                                                                                                               :DEFAULT NIL
                                                                                                                                               :COMMENT NIL
                                                                                                                                               :TRANSFORM PGLOADER.TRANSFORMS::ZERO-DATES-TO-NULL
                                                                                                                                               :EXTRA NIL
                                                                                                                                               :TRANSFORM-DEFAULT T)
                                                                                                                                            #S(PGLOADER.CATALOG:COLUMN
                                                                                                                                               :TABLE NIL
                                                                                                                                               :NAME "\"modifyDate\""
                                                                                                                                               :TYPE-NAME #8#
                                                                                                                                               :TYPE-MOD NIL
                                                                                                                                               :NULLABLE T
                                                                                                                                               :DEFAULT NIL
                                                                                                                                               :COMMENT NIL
                                                                                                                                               :TRANSFORM PGLOADER.TRANSFORMS::ZERO-DATES-TO-NULL
                                                                                                                                               :EXTRA NIL
                                                                                                                                               :TRANSFORM-DEFAULT T)
                                                                                                                                            #S(PGLOADER.CATALOG:COLUMN
                                                                                                                                               :TABLE NIL
                                                                                                                                               :NAME "\"tagNames\""
                                                                                                                                               :TYPE-NAME #6#
                                                                                                                                               :TYPE-MOD NIL
                                                                                                                                               :NULLABLE NIL
                                                                                                                                               :DEFAULT NIL
                                                                                                                                               :COMMENT NIL
                                                                                                                                               :TRANSFORM NIL
                                                                                                                                               :EXTRA NIL
                                                                                                                                               :TRANSFORM-DEFAULT T)
                                                                                                                                            #S(PGLOADER.CATALOG:COLUMN
                                                                                                                                               :TABLE NIL
                                                                                                                                               :NAME "\"rawBytes\""
                                                                                                                                               :TYPE-NAME "bytea"
                                                                                                                                               :TYPE-MOD NIL
                                                                                                                                               :NULLABLE NIL
                                                                                                                                               :DEFAULT NIL
                                                                                                                                               :COMMENT NIL
                                                                                                                                               :TRANSFORM PGLOADER.TRANSFORMS::BYTE-VECTOR-TO-BYTEA
                                                                                                                                               :EXTRA NIL
                                                                                                                                               :TRANSFORM-DEFAULT T))
                                                                                                                              :INDEX-LIST #9=(#S(PGLOADER.CATALOG:INDEX
                                                                                                                                                 :NAME "\"idx_240037_PRIMARY\""
                                                                                                                                                 :OID 240042
                                                                                                                                                 :SCHEMA #10=#S(PGLOADER.CATALOG:SCHEMA
                                                                                                                                                                :SOURCE-NAME "tbm"
                                                                                                                                                                :NAME "\"tbm\""
                                                                                                                                                                :CATALOG #S(PGLOADER.CATALOG:CATALOG
                                                                                                                                                                            :NAME "tbm"
                                                                                                                                                                            :SCHEMA-LIST (#10#)
                                                                                                                                                                            :TYPES-WITHOUT-BTREE NIL
                                                                                                                                                                            :DISTRIBUTION-RULES NIL)
                                                                                                                                                                :IN-SEARCH-PATH NIL
                                                                                                                                                                :TABLE-LIST (#11=#S(PGLOADER.CATALOG:TABLE
                                                                                                                                                                                    :SOURCE-NAME "tbmi_metadata_embedded_exif_old"
                                                                                                                                                                                    :NAME "\"tbmi_metadata_embedded_exif_old\""
                                                                                                                                                                                    :SCHEMA #10#
                                                                                                                                                                                    :OID 240037
                                                                                                                                                                                    :COMMENT NIL
                                                                                                                                                                                    :STORAGE-PARAMETER-LIST NIL
                                                                                                                                                                                    :TABLESPACE NIL
                                                                                                                                                                                    :ROW-COUNT-ESTIMATE 0
                                                                                                                                                                                    :FIELD-LIST (#S(PGLOADER.CATALOG:COLUMN
                                                                                                                                                                                                    :TABLE #11#
                                                                                                                                                                                                    :NAME "imageId"
                                                                                                                                                                                                    :TYPE-NAME "bigint"
                                                                                                                                                                                                    :TYPE-MOD :NULL
                                                                                                                                                                                                    :NULLABLE NIL
                                                                                                                                                                                                    :DEFAULT :NULL
                                                                                                                                                                                                    :COMMENT NIL
                                                                                                                                                                                                    :TRANSFORM NIL
                                                                                                                                                                                                    :EXTRA NIL
                                                                                                                                                                                                    :TRANSFORM-DEFAULT NIL)
                                                                                                                                                                                                 #S(PGLOADER.CATALOG:COLUMN
                                                                                                                                                                                                    :TABLE #11#
                                                                                                                                                                                                    :NAME "orientation"
                                                                                                                                                                                                    :TYPE-NAME "tbmi_metadata_embedded_exif_old_orientation"
                                                                                                                                                                                                    :TYPE-MOD :NULL
                                                                                                                                                                                                    :NULLABLE T
                                                                                                                                                                                                    :DEFAULT :NULL
                                                                                                                                                                                                    :COMMENT NIL
                                                                                                                                                                                                    :TRANSFORM NIL
                                                                                                                                                                                                    :EXTRA NIL
                                                                                                                                                                                                    :TRANSFORM-DEFAULT NIL)
                                                                                                                                                                                                 #S(PGLOADER.CATALOG:COLUMN
                                                                                                                                                                                                    :TABLE #11#
                                                                                                                                                                                                    :NAME "make"
                                                                                                                                                                                                    :TYPE-NAME "text"
                                                                                                                                                                                                    :TYPE-MOD :NULL
                                                                                                                                                                                                    :NULLABLE T
                                                                                                                                                                                                    :DEFAULT :NULL
                                                                                                                                                                                                    :COMMENT NIL
                                                                                                                                                                                                    :TRANSFORM NIL
                                                                                                                                                                                                    :EXTRA NIL
                                                                                                                                                                                                    :TRANSFORM-DEFAULT NIL)
                                                                                                                                                                                                 #S(PGLOADER.CATALOG:COLUMN
                                                                                                                                                                                                    :TABLE #11#
                                                                                                                                                                                                    :NAME "model"
                                                                                                                                                                                                    :TYPE-NAME "text"
                                                                                                                                                                                                    :TYPE-MOD :NULL
                                                                                                                                                                                                    :NULLABLE T
                                                                                                                                                                                                    :DEFAULT :NULL
                                                                                                                                                                                                    :COMMENT NIL
                                                                                                                                                                                                    :TRANSFORM NIL
                                                                                                                                                                                                    :EXTRA NIL
                                                                                                                                                                                                    :TRANSFORM-DEFAULT NIL)
                                                                                                                                                                                                 #S(PGLOADER.CATALOG:COLUMN
                                                                                                                                                                                                    :TABLE #11#
                                                                                                                                                                                                    :NAME "createDate"
                                                                                                                                                                                                    :TYPE-NAME "timestamp with time zone"
                                                                                                                                                                                                    :TYPE-MOD :NULL
                                                                                                                                                                                                    :NULLABLE T
                                                                                                                                                                                                    :DEFAULT :NULL
                                                                                                                                                                                                    :COMMENT NIL
                                                                                                                                                                                                    :TRANSFORM NIL
                                                                                                                                                                                                    :EXTRA NIL
                                                                                                                                                                                                    :TRANSFORM-DEFAULT NIL)
                                                                                                                                                                                                 #S(PGLOADER.CATALOG:COLUMN
                                                                                                                                                                                                    :TABLE #11#
                                                                                                                                                                                                    :NAME "modifyDate"
                                                                                                                                                                                                    :TYPE-NAME "timestamp with time zone"
                                                                                                                                                                                                    :TYPE-MOD :NULL
                                                                                                                                                                                                    :NULLABLE T
                                                                                                                                                                                                    :DEFAULT :NULL
                                                                                                                                                                                                    :COMMENT NIL
                                                                                                                                                                                                    :TRANSFORM NIL
                                                                                                                                                                                                    :EXTRA NIL
                                                                                                                                                                                                    :TRANSFORM-DEFAULT NIL)
                                                                                                                                                                                                 #S(PGLOADER.CATALOG:COLUMN
                                                                                                                                                                                                    :TABLE #11#
                                                                                                                                                                                                    :NAME "tagNames"
                                                                                                                                                                                                    :TYPE-NAME "json"
                                                                                                                                                                                                    :TYPE-MOD :NULL
                                                                                                                                                                                                    :NULLABLE NIL
                                                                                                                                                                                                    :DEFAULT :NULL
                                                                                                                                                                                                    :COMMENT NIL
                                                                                                                                                                                                    :TRANSFORM NIL
                                                                                                                                                                                                    :EXTRA NIL
                                                                                                                                                                                                    :TRANSFORM-DEFAULT NIL)
                                                                                                                                                                                                 #S(PGLOADER.CATALOG:COLUMN
                                                                                                                                                                                                    :TABLE #11#
                                                                                                                                                                                                    :NAME "rawBytes"
                                                                                                                                                                                                    :TYPE-NAME "bytea"
                                                                                                                                                                                                    :TYPE-MOD :NULL
                                                                                                                                                                                                    :NULLABLE NIL
                                                                                                                                                                                                    :DEFAULT :NULL
                                                                                                                                                                                                    :COMMENT NIL
                                                                                                                                                                                                    :TRANSFORM NIL
                                                                                                                                                                                                    :EXTRA NIL
                                                                                                                                                                                                    :TRANSFORM-DEFAULT NIL))
                                                                                                                                                                                    :COLUMN-LIST NIL
                                                                                                                                                                                    :INDEX-LIST #9#
                                                                                                                                                                                    :FKEY-LIST NIL
                                                                                                                                                                                    :TRIGGER-LIST NIL
                                                                                                                                                                                    :CITUS-RULE NIL))
                                                                                                                                                                :VIEW-LIST NIL
                                                                                                                                                                :MATVIEW-LIST NIL
                                                                                                                                                                :EXTENSION-LIST NIL
                                                                                                                                                                :SQLTYPE-LIST (#S(PGLOADER.CATALOG:SQLTYPE
                                                                                                                                                                                  :NAME "\"tbmi_metadata_embedded_exif_old_orientation\""
                                                                                                                                                                                  :SCHEMA #10#
                                                                                                                                                                                  :TYPE :ENUM
                                                                                                                                                                                  :SOURCE-DEF NIL
                                                                                                                                                                                  :EXTRA ("Horizontal"
                                                                                                                                                                                          "MirrorHorizontal"
                                                                                                                                                                                          "Rotate180"
                                                                                                                                                                                          "MirrorVertical"
                                                                                                                                                                                          "MirrorHorizontalRotate270Cw"
                                                                                                                                                                                          "Rotate90Cw"
                                                                                                                                                                                          "MirrorHorizontalRotate90Cw"
                                                                                                                                                                                          "Rotate270Cw")
                                                                                                                                                                                  :EXTENSION NIL)))
                                                                                                                                                 :TABLE #11#
                                                                                                                                                 :TYPE NIL
                                                                                                                                                 :PRIMARY T
                                                                                                                                                 :UNIQUE T
                                                                                                                                                 :COLUMNS ("imageId")
                                                                                                                                                 :SQL "CREATE UNIQUE INDEX \"idx_240037_PRIMARY\" ON tbm.tbmi_metadata_embedded_exif_old USING btree (\"imageId\")"
                                                                                                                                                 :CONNAME "\"idx_240037_PRIMARY\""
                                                                                                                                                 :CONDEF "PRIMARY KEY (\"imageId\")"
                                                                                                                                                 :FILTER NIL
                                                                                                                                                 :FK-DEPS NIL))
                                                                                                                              :FKEY-LIST NIL
                                                                                                                              :TRIGGER-LIST NIL
                                                                                                                              :CITUS-RULE NIL))
                                                                                                              :VIEW-LIST NIL
                                                                                                              :MATVIEW-LIST NIL
                                                                                                              :EXTENSION-LIST NIL
                                                                                                              :SQLTYPE-LIST NIL)
                                                                                                :TYPE :ENUM
                                                                                                :SOURCE-DEF #5#
                                                                                                :EXTRA ("Horizontal"
                                                                                                        "MirrorHorizontal"
                                                                                                        "Rotate180"
                                                                                                        "MirrorVertical"
                                                                                                        "MirrorHorizontalRotate270Cw"
                                                                                                        "Rotate90Cw"
                                                                                                        "MirrorHorizontalRotate90Cw"
                                                                                                        "Rotate270Cw")
                                                                                                :EXTENSION NIL) which is not the same as "tbmi_metadata_embedded_exif_old_orientation", the type of current target database column "tbm"."tbmi_metadata_embedded_exif_old"."orientation".

using following mysql table schema:

CREATE TABLE `tbmi_metadata_embedded_exif_old` (
  `imageId` int unsigned NOT NULL,
  `orientation` enum('Horizontal','MirrorHorizontal','Rotate180','MirrorVertical','MirrorHorizontalRotate270Cw','Rotate90Cw','MirrorHorizontalRotate90Cw','Rotate270Cw') DEFAULT NULL,
  `make` text,
  `model` text,
  `createDate` datetime DEFAULT NULL,
  `modifyDate` datetime DEFAULT NULL,
  `tagNames` json NOT NULL,
  `rawBytes` blob NOT NULL,
  PRIMARY KEY (`imageId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;