
CREATE TABLE tcg.public.Error_Type (
      error_type_id INT GENERATED ALWAYS AS IDENTITY PRIMARY KEY
    , code TEXT NOT NULL
    , name TEXT NOT NULL
    , active BOOLEAN NOT NULL DEFAULT TRUE
    , created_on TIMESTAMP
    , created_by_user_id INT NOT NULL
    , CONSTRAINT FK_TCG_User_created_by_user_id
        FOREIGN KEY (created_by_user_id)
        REFERENCES tcg.public.TCG_User(user_id)
	, updated_last_on TIMESTAMP NOT NULL
	, updated_last_by_user_id INT NOT NULL
    , CONSTRAINT FK_TCG_User_updated_last_by_user_id
        FOREIGN KEY (updated_last_by_user_id)
        REFERENCES tcg.public.TCG_User(user_id)
    , change_set_id INT NOT NULL
    , CONSTRAINT FK_TCG_Change_Set_id
		FOREIGN KEY (change_set_id)
        REFERENCES tcg.public.TCG_Change_Set(change_set_id)
);
