-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.sql
57 lines (40 loc) · 1.86 KB
/
setup.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
CREATE TABLE public.account_money_transfer (
id integer NOT NULL,
from_acc_number text NOT NULL,
to_acc_number text NOT NULL,
amount numeric(12,2) NOT NULL,
date timestamp without time zone NOT NULL,
status integer NOT NULL,
description character varying(1000),
category integer NOT NULL,
reserved character varying(20)
);
ALTER TABLE public.account_money_transfer OWNER TO postgres;
--
-- Name: account_money_transfer_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.account_money_transfer_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.account_money_transfer_id_seq OWNER TO postgres;
--
-- Name: account_money_transfer_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.account_money_transfer_id_seq OWNED BY public.account_money_transfer.id;
--
-- Name: account_money_transfer id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.account_money_transfer ALTER COLUMN id SET DEFAULT nextval('public.account_money_transfer_id_seq'::regclass);
--
-- Name: account_money_transfer account_money_transfer_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.account_money_transfer
ADD CONSTRAINT account_money_transfer_pkey PRIMARY KEY (id);
--
-- PostgreSQL database dump complete
--
-- COMMAND TO RUN: $ psql postgres -h 127.0.0.1 -d postgres -f setup.sql