Create Member Table on PostgreSQL
CREATE SEQUENCE public.member_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.member_seq OWNER TO postgres;
--
-- Name: member; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.member (
id integer DEFAULT nextval('public.member_seq'::regclass) NOT NULL,
email character varying NOT NULL,
"firstName" character varying,
"middleName" character varying DEFAULT NULL::character varying,
"lastName" character varying,
dob date,
occupation integer,
id_type character varying,
"idNumber" character varying,
id_issue_country integer,
id_issue_date date,
id_expiry_date date,
gender_id smallint,
source_of_fund_id integer,
id_front_url character varying,
id_back_url character varying,
nationality_id integer,
customer_type_id integer,
form_step_done_status integer,
contact_info_country_id integer,
contact_info_post_code character varying(10),
contact_info_address_one text,
contact_info_address_two text,
contact_info_mobile_no character varying,
contact_info_telephone_no character varying DEFAULT NULL::character varying,
contact_info_city character varying,
contact_info_state_id integer,
deleted_status smallint DEFAULT '0'::smallint,
deleted_at date,
created_at timestamp(0) without time zone DEFAULT NULL::timestamp without time zone,
created_by integer NOT NULL,
updated_at timestamp(0) without time zone DEFAULT NULL::timestamp without time zone,
updated_by integer,
email_verification_status smallint,
language character varying,
region_id character(10),
CONSTRAINT member_id_check CHECK ((id > 0))
);
ALTER TABLE public.member OWNER TO postgres;
--
-- Name: member_beneficiary_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.member_beneficiary_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.member_beneficiary_seq OWNER TO postgres;
--
-- Name: member_beneficiary; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.member_beneficiary (
id integer DEFAULT nextval('public.member_beneficiary_seq'::regclass) NOT NULL,
member_id integer,
benef_receipt_country_id integer,
benef_payment_mode_id integer,
benef_bank_id integer,
benef_relation_with integer,
benef_bank_branch_id integer,
benef_first_name character varying(50) NOT NULL,
benef_middle_name character varying(150) DEFAULT NULL::character varying,
benef_last_name character varying(150) NOT NULL,
benef_address text,
benef_bank_account_no character varying(150),
benef_dob date,
benef_nationality_id integer,
benef_mobile_no character varying(25) NOT NULL,
benef_purpose_of_remit_id integer,
deleted_status smallint DEFAULT '0'::smallint,
deleted_at date,
created_at timestamp(0) without time zone DEFAULT NULL::timestamp without time zone,
created_by integer NOT NULL,
updated_at timestamp(0) without time zone DEFAULT NULL::timestamp without time zone,
updated_by integer,
benef_telephone_no character varying(25),
benef_email character varying(25),
benef_nid_passport character varying(150),
benef_bank_account_name character varying(80),
benef_bank_bsb_code character varying(80),
benef_cpf character varying(80),
benef_operation character varying(80),
benef_ibn character varying(80),
benef_ifsc character varying(80),
benef_type_of_acc character varying(80),
benef_branch_code character varying(80),
benef_bic character(80),
benef_beneficiary_id character varying(80),
CONSTRAINT member_beneficiary_id_check CHECK ((id > 0))
);
ALTER TABLE public.member_beneficiary OWNER TO postgres;