Shouldn't the migration for ID field be varchar explicitly?
After running the migration, Postgres defaulted to integer PK field. When I was inserting a rocket with string ID, it gave me an error saying the type didn't match.
Updated my migration after which the whole flow worked.
CREATE TABLE IF NOT EXISTS rockets(
id varchar(128) NOT NULL PRIMARY KEY,
name varchar(50),
type varchar(50)
);
Shouldn't the migration for ID field be varchar explicitly?
After running the migration, Postgres defaulted to integer PK field. When I was inserting a rocket with string ID, it gave me an error saying the type didn't match.
Updated my migration after which the whole flow worked.