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