-
Notifications
You must be signed in to change notification settings - Fork 33
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
When trying to run the migration with Postgrex & CockroachDB, the following error occurs:
[info] execute "INSERT INTO public.error_tracker_meta (key, value)\nVALUES ('migration_version', '2'), ('migration_timestamp', 1723522363)\nON CONFLICT (key) DO UPDATE SET value = EXCLUDED.value\n"
** (Postgrex.Error) ERROR 42804 (datatype_mismatch) VALUES types int and string cannot be matched
query: INSERT INTO public.error_tracker_meta (key, value)
VALUES ('migration_version', '2'), ('migration_timestamp', 1723522363)
ON CONFLICT (key) DO UPDATE SET value = EXCLUDED.value
I am wondering if we could rewrite it following this pattern, it will probably fix the issue.
INSERT INTO t (a, b, ..., n)
VALUES ('1', '2', ..., 'n')
ON CONFLICT DO UPDATE SET
a = '1',
b = '2',
...
n = 'n';
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working