-- Table: public."FACT_TRANSACTION"

-- DROP TABLE public."FACT_TRANSACTION";

CREATE TABLE public."FACT_TRANSACTION"
(
    "DATE_ID" bigint NOT NULL,
    "WALLET_ID" bigint NOT NULL,
    "TRANSACTION_ID" numeric NOT NULL,
    "AMOUNT" numeric NOT NULL,
    CONSTRAINT "FACT_TRANSACTION_pkey" PRIMARY KEY ("DATE_ID", "WALLET_ID"),
    CONSTRAINT "DATE_ID" FOREIGN KEY ("DATE_ID")
        REFERENCES public."DIM_DATE" ("DATE_ID") MATCH SIMPLE
        ON UPDATE NO ACTION
        ON DELETE NO ACTION,
    CONSTRAINT "WALLET_ID" FOREIGN KEY ("WALLET_ID")
        REFERENCES public."DIM_WALLET" ("WALLET_ID") MATCH SIMPLE
        ON UPDATE NO ACTION
        ON DELETE NO ACTION
)
WITH (
    OIDS = FALSE
)
TABLESPACE pg_default;

ALTER TABLE public."FACT_TRANSACTION"
    OWNER to monnethicadmin;