fukamachi / mito

An ORM for Common Lisp with migrations, relationships and PostgreSQL support
292 stars 31 forks source link

Mito failing on load, `too few arguments` for format string #145

Closed Izaakwltn closed 3 months ago

Izaakwltn commented 3 months ago

The error seems to be from the last commit: https://github.com/fukamachi/mito/commit/78998752b7408fcb91fa5ff45bee0088f8faaf23

Here's the error:

; in: DEFUN INITIALIZE-MIGRATIONS-TABLE
;     (FORMAT NIL
;             #<(SIMPLE-ARRAY CHARACTER
;                (270)) INSERT INTO schema_migrations (version, applied_at, dirty) ~
;                              SELECT CAST(version AS ~A), applied_at, CAST(~:[0~;dirty~] AS ~A) ~
;                              FROM schema_migra... {703273D5EF}>
;             (CASE MITO.MIGRATION.VERSIONS::DRIVER-TYPE
;               (:MYSQL "UNSIGNED")
;               (OTHERWISE "BIGINT"))
;             (FIND "dirty" MITO.MIGRATION.VERSIONS::DB-COLUMNS :TEST 'EQUAL :KEY
;                   'FIRST))
; 
; caught WARNING:
;   Too few arguments (2) to FORMAT "INSERT INTO schema_migrations (version, applied_at, dirty) ~
;                              SELECT CAST(version AS ~A), applied_at, CAST(~:[0~;dirty~] AS ~A) ~
;                              FROM schema_migrations_backup ~
;                              WHERE applied_at IS NOT NULL": requires at least 3.
;   See also:
;     The ANSI Standard, Section 22.3.10.2
; 
; caught WARNING:
;   Too few arguments (2) to FORMAT "INSERT INTO schema_migrations (version, applied_at, dirty) ~
;                              SELECT CAST(version AS ~A), applied_at, CAST(~:[0~;dirty~] AS ~A) ~
;                              FROM schema_migrations_backup ~
;                              WHERE applied_at IS NOT NULL": requires at least 3.
;   See also:
;     The ANSI Standard, Section 22.3.10.2

;     (MITO.DB:EXECUTE-SQL
;      (FORMAT NIL
;              #<(SIMPLE-ARRAY CHARACTER
;                 (270)) INSERT INTO schema_migrations (version, applied_at, dirty) ~
;                              SELECT CAST(version AS ~A), applied_at, CAST(~:[0~;dirty~] AS ~A) ~
;                              FROM schema_migra... {703273D5EF}>
;              (CASE MITO.MIGRATION.VERSIONS::DRIVER-TYPE
;                (:MYSQL "UNSIGNED")
;                (OTHERWISE "BIGINT"))
;              (FIND "dirty" MITO.MIGRATION.VERSIONS::DB-COLUMNS :TEST 'EQUAL :KEY
;                    'FIRST)))
; 
; note: deleting unreachable code
; 
; note: deleting unreachable code
; 
; compilation unit aborted
;   caught 1 fatal ERROR condition
;   caught 2 WARNING conditions
;   printed 2 notes
fukamachi commented 3 months ago

WTF! Thank you so much for pointing it out! I'm going to fix it right now.

Izaakwltn commented 3 months ago

Thank you!