halvardssm / deno-nessie

A modular Deno library for PostgreSQL, MySQL, MariaDB and SQLite migrations
MIT License
527 stars 31 forks source link

[IDEA]: Add support for cockroachdb #155

Closed captainjapeng closed 2 years ago

captainjapeng commented 2 years ago

The Idea

Currently when migrating with cockroachdb it throws the following error:

PostgresError: unknown function: to_regclass()
    at Connection.#simpleQuery (https://deno.land/x/postgres@v0.14.2/connection/connection.ts:626:19)
    at async Connection.query (https://deno.land/x/postgres@v0.14.2/connection/connection.ts:875:16)
    at async ClientPostgreSQL.prepare (https://deno.land/x/nessie@2.0.5/clients/ClientPostgreSQL.ts:51:25)
    at async Command.migrate [as fn] (https://deno.land/x/nessie@2.0.6/cli/commands.ts:137:3)
    at async Command.execute (https://deno.land/x/cliffy@v0.20.1/command/command.ts:1014:7)
    at async Command.parse (https://deno.land/x/cliffy@v0.20.1/command/command.ts:928:16)
    at async cli (https://deno.land/x/nessie@2.0.6/cli.ts:29:3)
    at async run (https://deno.land/x/nessie@2.0.6/cli.ts:139:5)
    at async https://deno.land/x/nessie@2.0.6/cli.ts:158:1
 This error is most likely unrelated to Nessie, and is probably related to the client, the connection config or the query you are trying to execute.
jcs224 commented 2 years ago

A PR is awaiting review https://github.com/halvardssm/deno-nessie/pull/153

captainjapeng commented 2 years ago

Yeah, I was about to submit a PR as well when I saw yours.

halvardssm commented 2 years ago

Version 2.0.7 is now released with CockroachDB support according to the PR 🎉 Any feedback is appreciated!