-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbackup.sql
More file actions
325 lines (219 loc) · 7.81 KB
/
backup.sql
File metadata and controls
325 lines (219 loc) · 7.81 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
--
-- PostgreSQL database dump
--
-- Dumped from database version 15.5
-- Dumped by pg_dump version 15.5
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;
--
-- Name: public; Type: SCHEMA; Schema: -; Owner: postgres
--
-- *not* creating schema, since initdb creates it
ALTER SCHEMA public OWNER TO postgres;
--
-- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: postgres
--
COMMENT ON SCHEMA public IS '';
SET default_tablespace = '';
SET default_table_access_method = heap;
--
-- Name: _prisma_migrations; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public._prisma_migrations (
id character varying(36) NOT NULL,
checksum character varying(64) NOT NULL,
finished_at timestamp with time zone,
migration_name character varying(255) NOT NULL,
logs text,
rolled_back_at timestamp with time zone,
started_at timestamp with time zone DEFAULT now() NOT NULL,
applied_steps_count integer DEFAULT 0 NOT NULL
);
ALTER TABLE public._prisma_migrations OWNER TO postgres;
--
-- Name: administrateurs; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.administrateurs (
id text NOT NULL,
mail text NOT NULL,
login text NOT NULL,
password text NOT NULL
);
ALTER TABLE public.administrateurs OWNER TO postgres;
--
-- Name: cours; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.cours (
id text NOT NULL,
nom text NOT NULL,
"dateDebut" timestamp(3) without time zone NOT NULL,
"dateFin" timestamp(3) without time zone NOT NULL,
"intervenantId" text NOT NULL,
"updatedAt" timestamp(3) without time zone NOT NULL,
salle text NOT NULL,
"promotionId" text NOT NULL
);
ALTER TABLE public.cours OWNER TO postgres;
--
-- Name: etudiants; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.etudiants (
id text NOT NULL,
nom text NOT NULL,
prenom text NOT NULL,
"promotionId" text NOT NULL
);
ALTER TABLE public.etudiants OWNER TO postgres;
--
-- Name: inscriptions; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.inscriptions (
"coursId" text NOT NULL,
"etudiantId" text NOT NULL
);
ALTER TABLE public.inscriptions OWNER TO postgres;
--
-- Name: intervenants; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.intervenants (
id text NOT NULL,
nom text NOT NULL,
prenom text NOT NULL,
mail text NOT NULL,
login text NOT NULL,
password text NOT NULL
);
ALTER TABLE public.intervenants OWNER TO postgres;
--
-- Name: promotions; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.promotions (
id text NOT NULL,
nom text NOT NULL,
abreviation text NOT NULL
);
ALTER TABLE public.promotions OWNER TO postgres;
--
-- Data for Name: _prisma_migrations; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public._prisma_migrations (id, checksum, finished_at, migration_name, logs, rolled_back_at, started_at, applied_steps_count) FROM stdin;
2179071e-b1fc-4ae9-95a2-96f18a2f8943 112d5f9d2737dcb7650736b5f16346530b409c174ca9e583bdbdf5f2938c0904 2024-03-25 13:13:44.137924+00 20240325131331_init_db \N \N 2024-03-25 13:13:44.082045+00 1
\.
--
-- Data for Name: administrateurs; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.administrateurs (id, mail, login, password) FROM stdin;
\.
--
-- Data for Name: cours; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.cours (id, nom, "dateDebut", "dateFin", "intervenantId", "updatedAt", salle, "promotionId") FROM stdin;
\.
--
-- Data for Name: etudiants; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.etudiants (id, nom, prenom, "promotionId") FROM stdin;
\.
--
-- Data for Name: inscriptions; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.inscriptions ("coursId", "etudiantId") FROM stdin;
\.
--
-- Data for Name: intervenants; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.intervenants (id, nom, prenom, mail, login, password) FROM stdin;
\.
--
-- Data for Name: promotions; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.promotions (id, nom, abreviation) FROM stdin;
clu6yyh1o0000wa43ux5ernhl LICENCE 1 L1
clu6yyh1y0001wa433oxqc2mq LICENCE 2 L2
clu6yyh230002wa43ux4y5ab4 LICENCE 3 L3
clu6yyh270003wa43277hynd9 MASTER 1 M1
clu6yyh2e0004wa43n6qfzmi9 MASTER 2 M2
\.
--
-- Name: _prisma_migrations _prisma_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public._prisma_migrations
ADD CONSTRAINT _prisma_migrations_pkey PRIMARY KEY (id);
--
-- Name: administrateurs administrateurs_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.administrateurs
ADD CONSTRAINT administrateurs_pkey PRIMARY KEY (id);
--
-- Name: cours cours_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.cours
ADD CONSTRAINT cours_pkey PRIMARY KEY (id);
--
-- Name: etudiants etudiants_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.etudiants
ADD CONSTRAINT etudiants_pkey PRIMARY KEY (id);
--
-- Name: inscriptions inscriptions_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.inscriptions
ADD CONSTRAINT inscriptions_pkey PRIMARY KEY ("coursId", "etudiantId");
--
-- Name: intervenants intervenants_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.intervenants
ADD CONSTRAINT intervenants_pkey PRIMARY KEY (id);
--
-- Name: promotions promotions_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.promotions
ADD CONSTRAINT promotions_pkey PRIMARY KEY (id);
--
-- Name: promotions_abreviation_key; Type: INDEX; Schema: public; Owner: postgres
--
CREATE UNIQUE INDEX promotions_abreviation_key ON public.promotions USING btree (abreviation);
--
-- Name: promotions_nom_key; Type: INDEX; Schema: public; Owner: postgres
--
CREATE UNIQUE INDEX promotions_nom_key ON public.promotions USING btree (nom);
--
-- Name: cours cours_intervenantId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.cours
ADD CONSTRAINT "cours_intervenantId_fkey" FOREIGN KEY ("intervenantId") REFERENCES public.intervenants(id) ON UPDATE CASCADE ON DELETE RESTRICT;
--
-- Name: cours cours_promotionId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.cours
ADD CONSTRAINT "cours_promotionId_fkey" FOREIGN KEY ("promotionId") REFERENCES public.promotions(id) ON UPDATE CASCADE ON DELETE RESTRICT;
--
-- Name: etudiants etudiants_promotionId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.etudiants
ADD CONSTRAINT "etudiants_promotionId_fkey" FOREIGN KEY ("promotionId") REFERENCES public.promotions(id) ON UPDATE CASCADE ON DELETE RESTRICT;
--
-- Name: inscriptions inscriptions_coursId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.inscriptions
ADD CONSTRAINT "inscriptions_coursId_fkey" FOREIGN KEY ("coursId") REFERENCES public.cours(id) ON UPDATE CASCADE ON DELETE RESTRICT;
--
-- Name: inscriptions inscriptions_etudiantId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.inscriptions
ADD CONSTRAINT "inscriptions_etudiantId_fkey" FOREIGN KEY ("etudiantId") REFERENCES public.etudiants(id) ON UPDATE CASCADE ON DELETE RESTRICT;
--
-- Name: SCHEMA public; Type: ACL; Schema: -; Owner: postgres
--
REVOKE USAGE ON SCHEMA public FROM PUBLIC;
--
-- PostgreSQL database dump complete
--