· 10 years ago · Aug 23, 2016, 03:52 PM
1create database coop;
2use coop;
3
4
5
6
7
8SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
9SET time_zone = "+00:00";
10
11
12/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
13/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
14/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
15/*!40101 SET NAMES utf8mb4 */;
16
17
18-- --------------------------------------------------------
19
20--
21-- Struktura tabeli dla tabeli `building`
22--
23
24CREATE TABLE IF NOT EXISTS `building` (
25 `buildingId` int(11) NOT NULL,
26 `city` varchar(255) DEFAULT NULL,
27 `number` int(11) DEFAULT NULL,
28 `street` varchar(255) DEFAULT NULL
29) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
30
31--
32-- Zrzut danych tabeli `building`
33--
34
35INSERT INTO `building` (`buildingId`, `city`, `number`, `street`) VALUES
36(1, 'Pabianice', 34, 'Pasterska'),
37(2, 'Katowice', 2, 'Zamkowa'),
38(3, 'Pabianice', 12, 'Pasterska');
39
40-- --------------------------------------------------------
41
42--
43-- Struktura tabeli dla tabeli `chargeelectricity`
44--
45
46CREATE TABLE IF NOT EXISTS `chargeelectricity` (
47 `chargeId` int(11) NOT NULL,
48 `amountToPay` double DEFAULT NULL,
49 `finalState` double DEFAULT NULL,
50 `initialState` double DEFAULT NULL,
51 `name` varchar(255) COLLATE cp1250_polish_ci DEFAULT NULL,
52 `paymentDate` date DEFAULT NULL,
53 `pricePerUnit` double DEFAULT NULL,
54 `status` bit(1) DEFAULT NULL,
55 `captchaCode` varchar(255) COLLATE cp1250_polish_ci DEFAULT NULL
56) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=cp1250 COLLATE=cp1250_polish_ci;
57
58--
59-- Zrzut danych tabeli `chargeelectricity`
60--
61
62INSERT INTO `chargeelectricity` (`chargeId`, `amountToPay`, `finalState`, `initialState`, `name`, `paymentDate`, `pricePerUnit`, `status`, `captchaCode`) VALUES
63(1, 776.06, 15, 5.6, 'Op?ata za pr?d | CZERWIEC', '2016-07-08', 82.56, b'1', 'NY8SH'),
64(5, 2.83, 8, 5.6, 'Op?ata za pr?d | SIERPIE?', '2016-09-10', 1.18, b'1', '9RD8PT');
65
66-- --------------------------------------------------------
67
68--
69-- Struktura tabeli dla tabeli `chargegarbage`
70--
71
72CREATE TABLE IF NOT EXISTS `chargegarbage` (
73 `chargeId` int(11) NOT NULL,
74 `amountToPay` double DEFAULT NULL,
75 `name` varchar(255) COLLATE cp1250_polish_ci DEFAULT NULL,
76 `numberOfPeople` int(11) DEFAULT NULL,
77 `paymentDate` date DEFAULT NULL,
78 `pricePerPerson` double DEFAULT NULL,
79 `status` bit(1) DEFAULT NULL,
80 `captchaCode` varchar(255) COLLATE cp1250_polish_ci DEFAULT NULL
81) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=cp1250 COLLATE=cp1250_polish_ci;
82
83--
84-- Zrzut danych tabeli `chargegarbage`
85--
86
87INSERT INTO `chargegarbage` (`chargeId`, `amountToPay`, `name`, `numberOfPeople`, `paymentDate`, `pricePerPerson`, `status`, `captchaCode`) VALUES
88(3, 51, 'Op?ata za ?mieci | CZERWIEC', 6, '2016-07-23', 8.5, b'1', 'PEEJ'),
89(4, 120, 'Op?ata za ?mieci | LIPIEC', 6, '2016-08-18', 20, b'0', NULL);
90
91-- --------------------------------------------------------
92
93--
94-- Struktura tabeli dla tabeli `chargegas`
95--
96
97CREATE TABLE IF NOT EXISTS `chargegas` (
98 `chargeId` int(11) NOT NULL,
99 `amountToPay` double DEFAULT NULL,
100 `finalState` double DEFAULT NULL,
101 `initialState` double DEFAULT NULL,
102 `name` varchar(255) COLLATE cp1250_polish_ci DEFAULT NULL,
103 `paymentDate` date DEFAULT NULL,
104 `pricePerUnit` double DEFAULT NULL,
105 `status` bit(1) DEFAULT NULL,
106 `captchaCode` varchar(255) COLLATE cp1250_polish_ci DEFAULT NULL
107) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=cp1250 COLLATE=cp1250_polish_ci;
108
109--
110-- Zrzut danych tabeli `chargegas`
111--
112
113INSERT INTO `chargegas` (`chargeId`, `amountToPay`, `finalState`, `initialState`, `name`, `paymentDate`, `pricePerUnit`, `status`, `captchaCode`) VALUES
114(1, 222.6, 32, 18, 'Op?ata za gaz | CZERWIEC', '2016-07-22', 15.9, b'1', 'MY4K'),
115(2, 0, 0, 18, 'Op?ata za gaz | LIPIEC', '2016-08-25', 13, b'0', NULL);
116
117-- --------------------------------------------------------
118
119--
120-- Struktura tabeli dla tabeli `chargeheating`
121--
122
123CREATE TABLE IF NOT EXISTS `chargeheating` (
124 `chargeId` int(11) NOT NULL,
125 `amountToPay` double DEFAULT NULL,
126 `finalState` double DEFAULT NULL,
127 `initialState` double DEFAULT NULL,
128 `name` varchar(255) COLLATE cp1250_polish_ci DEFAULT NULL,
129 `paymentDate` date DEFAULT NULL,
130 `pricePerUnit` double DEFAULT NULL,
131 `status` bit(1) DEFAULT NULL,
132 `captchaCode` varchar(255) COLLATE cp1250_polish_ci DEFAULT NULL
133) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=cp1250 COLLATE=cp1250_polish_ci;
134
135--
136-- Zrzut danych tabeli `chargeheating`
137--
138
139INSERT INTO `chargeheating` (`chargeId`, `amountToPay`, `finalState`, `initialState`, `name`, `paymentDate`, `pricePerUnit`, `status`, `captchaCode`) VALUES
140(1, 113.5, 58, 12.6, 'Op?ata za ogrzewanie | 2015', '2016-06-18', 2.5, b'1', '46V4VE'),
141(2, 0, 0, 12.6, 'Op?ata za ogrzewanie | 2016', '2017-06-16', 1.85, b'0', NULL);
142
143-- --------------------------------------------------------
144
145--
146-- Struktura tabeli dla tabeli `chargeother`
147--
148
149CREATE TABLE IF NOT EXISTS `chargeother` (
150 `chargeId` int(11) NOT NULL,
151 `amountToPay` double DEFAULT NULL,
152 `name` varchar(255) COLLATE cp1250_polish_ci DEFAULT NULL,
153 `paymentDate` date DEFAULT NULL,
154 `status` bit(1) DEFAULT NULL,
155 `captchaCode` varchar(255) COLLATE cp1250_polish_ci DEFAULT NULL
156) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=cp1250 COLLATE=cp1250_polish_ci;
157
158--
159-- Zrzut danych tabeli `chargeother`
160--
161
162INSERT INTO `chargeother` (`chargeId`, `amountToPay`, `name`, `paymentDate`, `status`, `captchaCode`) VALUES
163(1, 120, 'Op?ata inna | DOMOFON', '2016-09-09', b'1', 'WD96K3'),
164(2, 65, 'Op?ata inna | TRAWNIK', '2016-06-24', b'0', NULL);
165
166-- --------------------------------------------------------
167
168--
169-- Struktura tabeli dla tabeli `chargesevage`
170--
171
172CREATE TABLE IF NOT EXISTS `chargesevage` (
173 `chargeId` int(11) NOT NULL,
174 `amountToPay` double DEFAULT NULL,
175 `finalState` double DEFAULT NULL,
176 `initialState` double DEFAULT NULL,
177 `name` varchar(255) COLLATE cp1250_polish_ci DEFAULT NULL,
178 `paymentDate` date DEFAULT NULL,
179 `pricePerUnit` double DEFAULT NULL,
180 `status` bit(1) DEFAULT NULL,
181 `captchaCode` varchar(255) COLLATE cp1250_polish_ci DEFAULT NULL
182) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=cp1250 COLLATE=cp1250_polish_ci;
183
184--
185-- Zrzut danych tabeli `chargesevage`
186--
187
188INSERT INTO `chargesevage` (`chargeId`, `amountToPay`, `finalState`, `initialState`, `name`, `paymentDate`, `pricePerUnit`, `status`, `captchaCode`) VALUES
189(1, 26, 14, 9, 'Op?ata za ?cieki | CZERWIEC', '2016-07-21', 5.2, b'1', 'S845J'),
190(2, 0, 0, 9, 'Op?ata za ?cieki | LIPIEC', '2016-08-20', 3.89, b'0', NULL);
191
192-- --------------------------------------------------------
193
194--
195-- Struktura tabeli dla tabeli `chargewater`
196--
197
198CREATE TABLE IF NOT EXISTS `chargewater` (
199 `chargeId` int(11) NOT NULL,
200 `amountToPay` double DEFAULT NULL,
201 `finalStateCold` double DEFAULT NULL,
202 `finalStateHot` double DEFAULT NULL,
203 `initialStateCold` double DEFAULT NULL,
204 `initialStateHot` double DEFAULT NULL,
205 `name` varchar(255) COLLATE cp1250_polish_ci DEFAULT NULL,
206 `paymentDate` date DEFAULT NULL,
207 `pricePerUnitCold` double DEFAULT NULL,
208 `pricePerUnitHot` double DEFAULT NULL,
209 `status` bit(1) DEFAULT NULL,
210 `captchaCode` varchar(255) COLLATE cp1250_polish_ci DEFAULT NULL
211) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=cp1250 COLLATE=cp1250_polish_ci;
212
213--
214-- Zrzut danych tabeli `chargewater`
215--
216
217INSERT INTO `chargewater` (`chargeId`, `amountToPay`, `finalStateCold`, `finalStateHot`, `initialStateCold`, `initialStateHot`, `name`, `paymentDate`, `pricePerUnitCold`, `pricePerUnitHot`, `status`, `captchaCode`) VALUES
218(1, 50.11, 14.99, 15, 3.2, 14.9, 'Op?ata za wod? | CZERWIEC', '2016-07-22', 4.2, 5.9, b'1', 'SS5N'),
219(2, 0, 0, 0, 3.2, 14.9, 'Op?ata za wod? | LIPIEC', '2016-08-12', 3.4, 8.2, b'0', NULL);
220
221-- --------------------------------------------------------
222
223--
224-- Struktura tabeli dla tabeli `user`
225--
226
227CREATE TABLE IF NOT EXISTS `user` (
228 `userId` int(11) NOT NULL,
229 `buildingNumber` int(11) DEFAULT NULL,
230 `city` varchar(255) CHARACTER SET latin1 DEFAULT NULL,
231 `enabled` bit(1) DEFAULT NULL,
232 `firstname` varchar(255) CHARACTER SET latin1 DEFAULT NULL,
233 `flatNumber` int(11) DEFAULT NULL,
234 `mail` varchar(255) CHARACTER SET latin1 DEFAULT NULL,
235 `password` varchar(255) CHARACTER SET latin1 DEFAULT NULL,
236 `peopleNumber` int(11) DEFAULT NULL,
237 `phone` varchar(255) CHARACTER SET latin1 DEFAULT NULL,
238 `street` varchar(255) CHARACTER SET latin1 DEFAULT NULL,
239 `surname` varchar(255) CHARACTER SET latin1 DEFAULT NULL,
240 `stateColdWater` double DEFAULT NULL,
241 `stateElectricity` double DEFAULT NULL,
242 `stateGas` double DEFAULT NULL,
243 `stateHeating` double DEFAULT NULL,
244 `stateHotWater` double DEFAULT NULL,
245 `stateSevage` double DEFAULT NULL
246) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
247
248--
249-- Zrzut danych tabeli `user`
250--
251
252INSERT INTO `user` (`userId`, `buildingNumber`, `city`, `enabled`, `firstname`, `flatNumber`, `mail`, `password`, `peopleNumber`, `phone`, `street`, `surname`, `stateColdWater`, `stateElectricity`, `stateGas`, `stateHeating`, `stateHotWater`, `stateSevage`) VALUES
253(1, 34, 'Pabianice', b'1', 'Artur', 7, 'test@test.pl', 'password', 2, '530-445-864', 'Pasterska', 'Kolasa', 20.5, 20.4, 20.5, 30, 20.7, 40.5),
254(8, 2, 'Katowice', b'1', 'Karolina', 3, 'tester2@test.pl', '$2a$10$xkLfmPvoSt1EYutLwae1denA9OpWC0ToV49T0wcIdTOrPeJkcsPKW', 6, '530-852-854', 'Pasterska', 'Szczepaniak', 3.2, 5.6, 18, 12.6, 14.9, 9);
255
256-- --------------------------------------------------------
257
258--
259-- Struktura tabeli dla tabeli `userrole`
260--
261
262CREATE TABLE IF NOT EXISTS `userrole` (
263 `id` int(11) NOT NULL,
264 `role` varchar(255) DEFAULT NULL
265) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
266
267--
268-- Zrzut danych tabeli `userrole`
269--
270
271INSERT INTO `userrole` (`id`, `role`) VALUES
272(1, 'ROLE_ADMIN'),
273(2, 'ROLE_USER');
274
275-- --------------------------------------------------------
276
277--
278-- Struktura tabeli dla tabeli `user_chargeelectricity`
279--
280
281CREATE TABLE IF NOT EXISTS `user_chargeelectricity` (
282 `User_userId` int(11) NOT NULL,
283 `chargeElectricity_chargeId` int(11) NOT NULL
284) ENGINE=InnoDB DEFAULT CHARSET=cp1250 COLLATE=cp1250_polish_ci;
285
286--
287-- Zrzut danych tabeli `user_chargeelectricity`
288--
289
290INSERT INTO `user_chargeelectricity` (`User_userId`, `chargeElectricity_chargeId`) VALUES
291(8, 1),
292(8, 5);
293
294-- --------------------------------------------------------
295
296--
297-- Struktura tabeli dla tabeli `user_chargegarbage`
298--
299
300CREATE TABLE IF NOT EXISTS `user_chargegarbage` (
301 `User_userId` int(11) NOT NULL,
302 `chargeGarbage_chargeId` int(11) NOT NULL
303) ENGINE=InnoDB DEFAULT CHARSET=cp1250 COLLATE=cp1250_polish_ci;
304
305--
306-- Zrzut danych tabeli `user_chargegarbage`
307--
308
309INSERT INTO `user_chargegarbage` (`User_userId`, `chargeGarbage_chargeId`) VALUES
310(8, 3),
311(8, 4);
312
313-- --------------------------------------------------------
314
315--
316-- Struktura tabeli dla tabeli `user_chargegas`
317--
318
319CREATE TABLE IF NOT EXISTS `user_chargegas` (
320 `User_userId` int(11) NOT NULL,
321 `chargeGas_chargeId` int(11) NOT NULL
322) ENGINE=InnoDB DEFAULT CHARSET=cp1250 COLLATE=cp1250_polish_ci;
323
324--
325-- Zrzut danych tabeli `user_chargegas`
326--
327
328INSERT INTO `user_chargegas` (`User_userId`, `chargeGas_chargeId`) VALUES
329(8, 1),
330(8, 2);
331
332-- --------------------------------------------------------
333
334--
335-- Struktura tabeli dla tabeli `user_chargeheating`
336--
337
338CREATE TABLE IF NOT EXISTS `user_chargeheating` (
339 `User_userId` int(11) NOT NULL,
340 `chargeHeating_chargeId` int(11) NOT NULL
341) ENGINE=InnoDB DEFAULT CHARSET=cp1250 COLLATE=cp1250_polish_ci;
342
343--
344-- Zrzut danych tabeli `user_chargeheating`
345--
346
347INSERT INTO `user_chargeheating` (`User_userId`, `chargeHeating_chargeId`) VALUES
348(8, 1),
349(8, 2);
350
351-- --------------------------------------------------------
352
353--
354-- Struktura tabeli dla tabeli `user_chargeother`
355--
356
357CREATE TABLE IF NOT EXISTS `user_chargeother` (
358 `User_userId` int(11) NOT NULL,
359 `chargeOther_chargeId` int(11) NOT NULL
360) ENGINE=InnoDB DEFAULT CHARSET=cp1250 COLLATE=cp1250_polish_ci;
361
362--
363-- Zrzut danych tabeli `user_chargeother`
364--
365
366INSERT INTO `user_chargeother` (`User_userId`, `chargeOther_chargeId`) VALUES
367(8, 1),
368(8, 2);
369
370-- --------------------------------------------------------
371
372--
373-- Struktura tabeli dla tabeli `user_chargesevage`
374--
375
376CREATE TABLE IF NOT EXISTS `user_chargesevage` (
377 `User_userId` int(11) NOT NULL,
378 `chargeSevage_chargeId` int(11) NOT NULL
379) ENGINE=InnoDB DEFAULT CHARSET=cp1250 COLLATE=cp1250_polish_ci;
380
381--
382-- Zrzut danych tabeli `user_chargesevage`
383--
384
385INSERT INTO `user_chargesevage` (`User_userId`, `chargeSevage_chargeId`) VALUES
386(8, 1),
387(8, 2);
388
389-- --------------------------------------------------------
390
391--
392-- Struktura tabeli dla tabeli `user_chargewater`
393--
394
395CREATE TABLE IF NOT EXISTS `user_chargewater` (
396 `User_userId` int(11) NOT NULL,
397 `chargeWater_chargeId` int(11) NOT NULL
398) ENGINE=InnoDB DEFAULT CHARSET=cp1250 COLLATE=cp1250_polish_ci;
399
400--
401-- Zrzut danych tabeli `user_chargewater`
402--
403
404INSERT INTO `user_chargewater` (`User_userId`, `chargeWater_chargeId`) VALUES
405(8, 1),
406(8, 2);
407
408-- --------------------------------------------------------
409
410--
411-- Struktura tabeli dla tabeli `user_userrole`
412--
413
414CREATE TABLE IF NOT EXISTS `user_userrole` (
415 `User_userId` int(11) NOT NULL,
416 `userRole_id` int(11) NOT NULL
417) ENGINE=InnoDB DEFAULT CHARSET=latin1;
418
419--
420-- Zrzut danych tabeli `user_userrole`
421--
422
423INSERT INTO `user_userrole` (`User_userId`, `userRole_id`) VALUES
424(1, 1),
425(8, 2);
426
427--
428-- Indeksy dla zrzutów tabel
429--
430
431--
432-- Indexes for table `building`
433--
434ALTER TABLE `building`
435 ADD PRIMARY KEY (`buildingId`);
436
437--
438-- Indexes for table `chargeelectricity`
439--
440ALTER TABLE `chargeelectricity`
441 ADD PRIMARY KEY (`chargeId`);
442
443--
444-- Indexes for table `chargegarbage`
445--
446ALTER TABLE `chargegarbage`
447 ADD PRIMARY KEY (`chargeId`);
448
449--
450-- Indexes for table `chargegas`
451--
452ALTER TABLE `chargegas`
453 ADD PRIMARY KEY (`chargeId`);
454
455--
456-- Indexes for table `chargeheating`
457--
458ALTER TABLE `chargeheating`
459 ADD PRIMARY KEY (`chargeId`);
460
461--
462-- Indexes for table `chargeother`
463--
464ALTER TABLE `chargeother`
465 ADD PRIMARY KEY (`chargeId`);
466
467--
468-- Indexes for table `chargesevage`
469--
470ALTER TABLE `chargesevage`
471 ADD PRIMARY KEY (`chargeId`);
472
473--
474-- Indexes for table `chargewater`
475--
476ALTER TABLE `chargewater`
477 ADD PRIMARY KEY (`chargeId`);
478
479--
480-- Indexes for table `user`
481--
482ALTER TABLE `user`
483 ADD PRIMARY KEY (`userId`);
484
485--
486-- Indexes for table `userrole`
487--
488ALTER TABLE `userrole`
489 ADD PRIMARY KEY (`id`);
490
491--
492-- Indexes for table `user_chargeelectricity`
493--
494ALTER TABLE `user_chargeelectricity`
495 ADD PRIMARY KEY (`User_userId`,`chargeElectricity_chargeId`),
496 ADD KEY `FK_cs1502a0lngsn7vsh0vaf35d0` (`chargeElectricity_chargeId`);
497
498--
499-- Indexes for table `user_chargegarbage`
500--
501ALTER TABLE `user_chargegarbage`
502 ADD PRIMARY KEY (`User_userId`,`chargeGarbage_chargeId`),
503 ADD KEY `FK_rrjo2a2bbkjalebmbnh6tnn2k` (`chargeGarbage_chargeId`);
504
505--
506-- Indexes for table `user_chargegas`
507--
508ALTER TABLE `user_chargegas`
509 ADD PRIMARY KEY (`User_userId`,`chargeGas_chargeId`),
510 ADD KEY `FK_73p62mc2h24qbaobkcv2sqmc6` (`chargeGas_chargeId`);
511
512--
513-- Indexes for table `user_chargeheating`
514--
515ALTER TABLE `user_chargeheating`
516 ADD PRIMARY KEY (`User_userId`,`chargeHeating_chargeId`),
517 ADD KEY `FK_ahf60oo1d0fse05u0qfaih0ty` (`chargeHeating_chargeId`);
518
519--
520-- Indexes for table `user_chargeother`
521--
522ALTER TABLE `user_chargeother`
523 ADD PRIMARY KEY (`User_userId`,`chargeOther_chargeId`),
524 ADD KEY `FK_7tquax8ttyxc2w1mh25cudsys` (`chargeOther_chargeId`);
525
526--
527-- Indexes for table `user_chargesevage`
528--
529ALTER TABLE `user_chargesevage`
530 ADD PRIMARY KEY (`User_userId`,`chargeSevage_chargeId`),
531 ADD KEY `FK_x6jvy6imc31toq6tn3yu89ry` (`chargeSevage_chargeId`);
532
533--
534-- Indexes for table `user_chargewater`
535--
536ALTER TABLE `user_chargewater`
537 ADD PRIMARY KEY (`User_userId`,`chargeWater_chargeId`),
538 ADD KEY `FK_40afpi3rdqtqkrjyo0upct8ce` (`chargeWater_chargeId`);
539
540--
541-- Indexes for table `user_userrole`
542--
543ALTER TABLE `user_userrole`
544 ADD PRIMARY KEY (`User_userId`,`userRole_id`),
545 ADD KEY `FK_lr2ksams5rjgculd1ai6c5bo9` (`userRole_id`);
546
547--
548-- AUTO_INCREMENT for dumped tables
549--
550
551--
552-- AUTO_INCREMENT dla tabeli `building`
553--
554ALTER TABLE `building`
555 MODIFY `buildingId` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=4;
556--
557-- AUTO_INCREMENT dla tabeli `chargeelectricity`
558--
559ALTER TABLE `chargeelectricity`
560 MODIFY `chargeId` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=6;
561--
562-- AUTO_INCREMENT dla tabeli `chargegarbage`
563--
564ALTER TABLE `chargegarbage`
565 MODIFY `chargeId` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=5;
566--
567-- AUTO_INCREMENT dla tabeli `chargegas`
568--
569ALTER TABLE `chargegas`
570 MODIFY `chargeId` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3;
571--
572-- AUTO_INCREMENT dla tabeli `chargeheating`
573--
574ALTER TABLE `chargeheating`
575 MODIFY `chargeId` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3;
576--
577-- AUTO_INCREMENT dla tabeli `chargeother`
578--
579ALTER TABLE `chargeother`
580 MODIFY `chargeId` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3;
581--
582-- AUTO_INCREMENT dla tabeli `chargesevage`
583--
584ALTER TABLE `chargesevage`
585 MODIFY `chargeId` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3;
586--
587-- AUTO_INCREMENT dla tabeli `chargewater`
588--
589ALTER TABLE `chargewater`
590 MODIFY `chargeId` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3;
591--
592-- AUTO_INCREMENT dla tabeli `user`
593--
594ALTER TABLE `user`
595 MODIFY `userId` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=9;
596--
597-- AUTO_INCREMENT dla tabeli `userrole`
598--
599ALTER TABLE `userrole`
600 MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3;
601--
602-- Ograniczenia dla zrzutów tabel
603--
604
605--
606-- Ograniczenia dla tabeli `user_chargeelectricity`
607--
608ALTER TABLE `user_chargeelectricity`
609 ADD CONSTRAINT `FK_cs1502a0lngsn7vsh0vaf35d0` FOREIGN KEY (`chargeElectricity_chargeId`) REFERENCES `chargeelectricity` (`chargeId`),
610 ADD CONSTRAINT `FK_p8aa83jxx5envkw7cjifp0i0r` FOREIGN KEY (`User_userId`) REFERENCES `user` (`userId`);
611
612--
613-- Ograniczenia dla tabeli `user_chargegarbage`
614--
615ALTER TABLE `user_chargegarbage`
616 ADD CONSTRAINT `FK_7ls0vnl83qa3vn4cc05bg6gbu` FOREIGN KEY (`User_userId`) REFERENCES `user` (`userId`),
617 ADD CONSTRAINT `FK_rrjo2a2bbkjalebmbnh6tnn2k` FOREIGN KEY (`chargeGarbage_chargeId`) REFERENCES `chargegarbage` (`chargeId`);
618
619--
620-- Ograniczenia dla tabeli `user_chargegas`
621--
622ALTER TABLE `user_chargegas`
623 ADD CONSTRAINT `FK_73p62mc2h24qbaobkcv2sqmc6` FOREIGN KEY (`chargeGas_chargeId`) REFERENCES `chargegas` (`chargeId`),
624 ADD CONSTRAINT `FK_nrir9x7s6ev09xogd09s4ge3a` FOREIGN KEY (`User_userId`) REFERENCES `user` (`userId`);
625
626--
627-- Ograniczenia dla tabeli `user_chargeheating`
628--
629ALTER TABLE `user_chargeheating`
630 ADD CONSTRAINT `FK_1uufv4lmfoxj8wh5oun86w9y9` FOREIGN KEY (`User_userId`) REFERENCES `user` (`userId`),
631 ADD CONSTRAINT `FK_ahf60oo1d0fse05u0qfaih0ty` FOREIGN KEY (`chargeHeating_chargeId`) REFERENCES `chargeheating` (`chargeId`);
632
633--
634-- Ograniczenia dla tabeli `user_chargeother`
635--
636ALTER TABLE `user_chargeother`
637 ADD CONSTRAINT `FK_7tquax8ttyxc2w1mh25cudsys` FOREIGN KEY (`chargeOther_chargeId`) REFERENCES `chargeother` (`chargeId`),
638 ADD CONSTRAINT `FK_hh8jmgsxstm212lb7kx2rbf69` FOREIGN KEY (`User_userId`) REFERENCES `user` (`userId`);
639
640--
641-- Ograniczenia dla tabeli `user_chargesevage`
642--
643ALTER TABLE `user_chargesevage`
644 ADD CONSTRAINT `FK_ptraxxtisn1h5p2qr3wvb62p3` FOREIGN KEY (`User_userId`) REFERENCES `user` (`userId`),
645 ADD CONSTRAINT `FK_x6jvy6imc31toq6tn3yu89ry` FOREIGN KEY (`chargeSevage_chargeId`) REFERENCES `chargesevage` (`chargeId`);
646
647--
648-- Ograniczenia dla tabeli `user_chargewater`
649--
650ALTER TABLE `user_chargewater`
651 ADD CONSTRAINT `FK_40afpi3rdqtqkrjyo0upct8ce` FOREIGN KEY (`chargeWater_chargeId`) REFERENCES `chargewater` (`chargeId`),
652 ADD CONSTRAINT `FK_o8cn8hvvfydnh4jd9pfo1rceq` FOREIGN KEY (`User_userId`) REFERENCES `user` (`userId`);
653
654--
655-- Ograniczenia dla tabeli `user_userrole`
656--
657ALTER TABLE `user_userrole`
658 ADD CONSTRAINT `FK_kf5wh5kueiaw99k48m360cko1` FOREIGN KEY (`User_userId`) REFERENCES `user` (`userId`),
659 ADD CONSTRAINT `FK_lr2ksams5rjgculd1ai6c5bo9` FOREIGN KEY (`userRole_id`) REFERENCES `userrole` (`id`);
660
661/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
662/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
663/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;