fukamachi / mito

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

The value of CL-POSTGRES::PARAMETERS is 2327607654652096140, which is not of type LIST #115

Open svetlyak40wt opened 1 year ago

svetlyak40wt commented 1 year ago

MITO.DB.POSTGRES:ACQUIRE-ADVISORY-LOCK function signals this error when I try to apply migrations.

Probably that is because this function passes parameter as is instead of list:

(defun acquire-advisory-lock (conn id)
  (dbi:do-sql conn "SELECT pg_advisory_lock(?)" id)
  (values))

In this commit CL-DBI's DO-SQL was changed to accept parameters as lists.

After I've changed these functions like this, migration was applied successfully:

(defun acquire-advisory-lock (conn id)
  (dbi:do-sql conn "SELECT pg_advisory_lock(?)" (list id))
  (values))

(defun release-advisory-lock (conn id)
  (dbi:do-sql conn "SELECT pg_advisory_unlock(?)" (list id))
  (values))

Environment

Mito on fcc8003b823925d8cd73fc77af1fcb6f0b70f6a7 commit (latest for now).

CL-DBI was installed from Ultralisp.org. Release number 20210831151553.

svetlyak40wt commented 1 year ago

This issue is fixed in the pull: https://github.com/fukamachi/mito/pull/118