CREATE TABLE tcg.public.TCG_Condition (
	  condition_id INT GENERATED ALWAYS AS IDENTITY PRIMARY KEY
	, name TEXT NOT NULL 
	, code TEXT NOT NULL
	, description TEXT NOT NULL
	, summary TEXT NOT NULL
	, us_name TEXT NOT NULL
	, price_ratio_min DECIMAL(7, 1)
	, price_ratio_max DECIMAL(7, 1)
    , active BOOLEAN NOT NULL DEFAULT TRUE
	, created_on TIMESTAMP NOT NULL
	, created_by_user_id INT NOT NULL
    , CONSTRAINT FK_TCG_Condition_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_Condition_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_Condition_change_set_id
		FOREIGN KEY (change_set_id)
        REFERENCES tcg.public.TCG_Change_Set(change_set_id)
);
