I have a table that looks like this:
CREATE TABLE "TestResults" (
"Id" text PRIMARY KEY,
"Name" text NOT NULL UNIQUE,
"Result" text CHECK ("Comment" IN ('Pass', 'Fail')),
"CreatedBy" text NOT NULL,
"CreatedOn" timestamp with time zone NOT NULL,
);
We are using PostgreSQL 9.4
The user is currently able to select either Pass or Fail from a drop down menu, and we have been storing those strings in the database in the Result column. We would like to change that to a boolean value.
How can I change the Result column from text to boolean while keeping the values the users have already entered?
Thank you.