Error 42P01 relation "{table-name}" does not exist

Hi roachers,

I have started working on supporting CockroachDB on yuniql.io and I ran into this issue. The script files are working OK with standard pgsql but its failing on CRDB. Not sure how and why.

The failing section is when the script that inserts employees data. If I removed all the INSERT scripts for employees and dependents it works all OK. Appreciate an advise.

Im running on crdb docker

docker network create -d bridge crdbnet
docker run -d --name=cockroachdb --hostname=crdb --net=crdbnet -p 26257:26257 -p 8080:8080  cockroachdb/cockroach start --insecure

setup tables

insert data

ERR 2020-06-13T21:11:34.6071292Z Failed to execute run function. Arrg… something seems broken.
Internal error message: Npgsql.PostgresException (0x80004005): 42P01: relation “employees” does not exist
at Npgsql.NpgsqlConnector.<>c__DisplayClass160_0.<g__ReadMessageLong|0>d.MoveNext()
— End of stack trace from previous location where exception was thrown —
at Npgsql.NpgsqlConnector.<>c__DisplayClass160_0.<g__ReadMessageLong|0>d.MoveNext()
— End of stack trace from previous location where exception was thrown —
at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming)
at Npgsql.NpgsqlDataReader.NextResult()

Hi! I’m excited to hear that you’re working on adding support for CockroachDB.

I am not sure why this is happening. One follow-up question: does Yuniql use transactions when running these schema change scripts? CockroachDB currently has some issues with doing schema changes inside of transactions, which are documented here: https://www.cockroachlabs.com/docs/stable/online-schema-changes.html#limitations We are working on addressing these limitations.

Also, if you remove the INSERT statements for employees and dependents, do those tables appear if you run SHOW TABLES after Yuniql finishes running?