
CREATE TABLE tcg.public.TCG_MTG_Deck_Audit (
	  audit_id INT GENERATED ALWAYS AS IDENTITY PRIMARY KEY
	, deck_id INT NOT NULL
	, CONSTRAINT FK_TCG_MTG_Deck_Audit_deck_id
		FOREIGN KEY (deck_id)
		REFERENCES tcg.public.TCG_MTG_Deck(deck_id)
	, name_field VARCHAR(255) NOT NULL
	, value_prev TEXT
	, value_new TEXT
	, change_set_id INT NOT NULL
	, CONSTRAINT FK_TCG_MTG_Deck_Audit_change_set_id
		FOREIGN KEY (change_set_id) 
		REFERENCES tcg.public.TCG_Change_Set(change_set_id)
);
