You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 28, 2018. It is now read-only.
I'm having trouble running my first migration against a local cockroachdb instance. I created the initial migration. I ran it and I get the following error:
migrate -database postgresql://[email protected]:26257/main?sslmode=disable -path migrations up error: pq: relation "schema_migrations" does not exist in line 0: INSERT INTO "schema_migrations" (version, dirty) VALUES ($1, $2)
The table exists in the main database:
root@:26257/main> show columns from schema_migrations;
+---------+------+-------+---------+-------------+
| Field | Type | Null | Default | Indices |
+---------+------+-------+---------+-------------+
| version | INT | false | NULL | {"primary"} |
| dirty | BOOL | false | NULL | {} |
+---------+------+-------+---------+-------------+
(2 rows)
root@:26257/main> SELECT * FROM schema_migrations;
+---------+-------+
| version | dirty |
+---------+-------+
+---------+-------+
(0 rows)
Not sure why this isn't working. I installed using go get.
Thanks for this tool and any help you can provide!
The text was updated successfully, but these errors were encountered:
This actually isn't a problem for postgres but is a problem for cockroach.
Internally cockroach drops the table when running a truncate which causes the insert to fail inside of this transaction. I added repro steps to mattes/migrate#320 which this PR should close.
Closes: mattes/migrate#320
Signed-off-by: Elliott Davis <[email protected]>
I'm having trouble running my first migration against a local cockroachdb instance. I created the initial migration. I ran it and I get the following error:
migrate -database postgresql://[email protected]:26257/main?sslmode=disable -path migrations up error: pq: relation "schema_migrations" does not exist in line 0: INSERT INTO "schema_migrations" (version, dirty) VALUES ($1, $2)
The table exists in the
main
database:Not sure why this isn't working. I installed using go get.
Thanks for this tool and any help you can provide!
The text was updated successfully, but these errors were encountered: