-- Table: public."FACT_TRANSACTION"

-- DROP TABLE public."FACT_TRANSACTION";

CREATE TABLE public."FACT_TRANSACTION"
(
    "TRANSACTION_ID" bigint NOT NULL DEFAULT nextval('"FACT_TRANSACTION_TRANSACTION_ID_seq"'::regclass),
    "DATE_ID" bigint NOT NULL,
    "WALLET_ID" bigint NOT NULL,
    "BC_TRANSACTION_ID" character varying(255) COLLATE pg_catalog."default" NOT NULL,
    "AMOUNT" numeric NOT NULL,
    CONSTRAINT "FACT_TRANSACTION_pkey" PRIMARY KEY ("TRANSACTION_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;