comparison db_schema/lada_data.sql @ 1106:7ea01e09dff4

Fix setting sequences in test data. This did not survive the extinction of the bund schema. Should be safer now by using pg_get_serial_sequence() and the actual maximum of the respecitve ID column.
author Tom Gottfried <tom@intevation.de>
date Wed, 26 Oct 2016 18:54:48 +0200
parents 186d602e031a
children d1d7d684800c
comparison
equal deleted inserted replaced
1105:d9d57a107478 1106:7ea01e09dff4
87 406 000007589328X f 12020 12020 N0198FU12 2 0 1 D: 02 01 16 00 00 00 00 00 00 00 00 Grünfutter F12 2012-06-07 09:00:00+02 \N \N 2012-07-12 11:32:17 \N 1859 \N \N 2012-04-01 00:00:00 2012-06-30 21:59:59 2016-03-17 09:19:04.94469 87 406 000007589328X f 12020 12020 N0198FU12 2 0 1 D: 02 01 16 00 00 00 00 00 00 00 00 Grünfutter F12 2012-06-07 09:00:00+02 \N \N 2012-07-12 11:32:17 \N 1859 \N \N 2012-04-01 00:00:00 2012-06-30 21:59:59 2016-03-17 09:19:04.94469
88 \. 88 \.
89 89
90 90
91 ALTER TABLE probe ENABLE TRIGGER ALL; 91 ALTER TABLE probe ENABLE TRIGGER ALL;
92
93 SELECT setval(pg_get_serial_sequence('probe', 'id'),
94 (SELECT max(id) FROM probe));
95
92 96
93 -- 97 --
94 -- TOC entry 4687 (class 0 OID 1170823) 98 -- TOC entry 4687 (class 0 OID 1170823)
95 -- Dependencies: 289 99 -- Dependencies: 289
96 -- Data for Name: messung; Type: TABLE DATA; Schema: land; Owner: postgres 100 -- Data for Name: messung; Type: TABLE DATA; Schema: land; Owner: postgres
184 \. 188 \.
185 189
186 190
187 ALTER TABLE messung ENABLE TRIGGER ALL; 191 ALTER TABLE messung ENABLE TRIGGER ALL;
188 192
193 SELECT setval(pg_get_serial_sequence('messung', 'id'),
194 (SELECT max(id) FROM messung));
195
196
189 -- 197 --
190 -- TOC entry 4681 (class 0 OID 1170751) 198 -- TOC entry 4681 (class 0 OID 1170751)
191 -- Dependencies: 283 199 -- Dependencies: 283
192 -- Data for Name: kommentar_m; Type: TABLE DATA; Schema: land; Owner: postgres 200 -- Data for Name: kommentar_m; Type: TABLE DATA; Schema: land; Owner: postgres
193 -- 201 --
199 482 12020 2012-07-12 09:32:00 Messung FM\nFM/TM lt Stammdaten 195 207 482 12020 2012-07-12 09:32:00 Messung FM\nFM/TM lt Stammdaten 195
200 \. 208 \.
201 209
202 210
203 ALTER TABLE kommentar_m ENABLE TRIGGER ALL; 211 ALTER TABLE kommentar_m ENABLE TRIGGER ALL;
212
213 SELECT setval(pg_get_serial_sequence('kommentar_m', 'id'),
214 (SELECT max(id) FROM kommentar_m));
215
204 216
205 -- 217 --
206 -- TOC entry 4682 (class 0 OID 1170759) 218 -- TOC entry 4682 (class 0 OID 1170759)
207 -- Dependencies: 284 219 -- Dependencies: 284
208 -- Data for Name: kommentar_p; Type: TABLE DATA; Schema: land; Owner: postgres 220 -- Data for Name: kommentar_p; Type: TABLE DATA; Schema: land; Owner: postgres
223 455 12020 2012-07-12 09:32:00 FM/TM lt. Stammdaten /für Grüngetreide 406 235 455 12020 2012-07-12 09:32:00 FM/TM lt. Stammdaten /für Grüngetreide 406
224 \. 236 \.
225 237
226 238
227 ALTER TABLE kommentar_p ENABLE TRIGGER ALL; 239 ALTER TABLE kommentar_p ENABLE TRIGGER ALL;
240
241 SELECT setval(pg_get_serial_sequence('kommentar_p', 'id'),
242 (SELECT max(id) FROM kommentar_p));
243
228 244
229 -- 245 --
230 -- TOC entry 4684 (class 0 OID 1170769) 246 -- TOC entry 4684 (class 0 OID 1170769)
231 -- Dependencies: 286 247 -- Dependencies: 286
232 -- Data for Name: messprogramm; Type: TABLE DATA; Schema: land; Owner: postgres 248 -- Data for Name: messprogramm; Type: TABLE DATA; Schema: land; Owner: postgres
799 \. 815 \.
800 816
801 817
802 ALTER TABLE messwert ENABLE TRIGGER ALL; 818 ALTER TABLE messwert ENABLE TRIGGER ALL;
803 819
820 SELECT setval(pg_get_serial_sequence('messwert', 'id'),
821 (SELECT max(id) FROM messwert));
822
823
804 -- 824 --
805 -- TOC entry 4691 (class 0 OID 1170844) 825 -- TOC entry 4691 (class 0 OID 1170844)
806 -- Dependencies: 293 826 -- Dependencies: 293
807 -- Data for Name: ortszuordnung; Type: TABLE DATA; Schema: land; Owner: postgres 827 -- Data for Name: ortszuordnung; Type: TABLE DATA; Schema: land; Owner: postgres
808 -- 828 --
888 333 406 42 E \N 2013-08-12 07:57:26.600695 2016-03-17 09:19:04.94469 908 333 406 42 E \N 2013-08-12 07:57:26.600695 2016-03-17 09:19:04.94469
889 \. 909 \.
890 910
891 911
892 ALTER TABLE ortszuordnung ENABLE TRIGGER ALL; 912 ALTER TABLE ortszuordnung ENABLE TRIGGER ALL;
913
914 SELECT setval(pg_get_serial_sequence('ortszuordnung', 'id'),
915 (SELECT max(id) FROM ortszuordnung));
916
893 917
894 -- 918 --
895 -- TOC entry 4695 (class 0 OID 1170895) 919 -- TOC entry 4695 (class 0 OID 1170895)
896 -- Dependencies: 297 920 -- Dependencies: 297
897 -- Data for Name: status_protokoll; Type: TABLE DATA; Schema: land; Owner: postgres 921 -- Data for Name: status_protokoll; Type: TABLE DATA; Schema: land; Owner: postgres
985 \. 1009 \.
986 1010
987 1011
988 ALTER TABLE status_protokoll ENABLE TRIGGER ALL; 1012 ALTER TABLE status_protokoll ENABLE TRIGGER ALL;
989 1013
1014 SELECT setval(pg_get_serial_sequence('status_protokoll', 'id'),
1015 (SELECT max(id) FROM status_protokoll));
1016
1017
990 -- 1018 --
991 -- TOC entry 4696 (class 0 OID 1170904) 1019 -- TOC entry 4696 (class 0 OID 1170904)
992 -- Dependencies: 298 1020 -- Dependencies: 298
993 -- Data for Name: zusatz_wert; Type: TABLE DATA; Schema: land; Owner: postgres 1021 -- Data for Name: zusatz_wert; Type: TABLE DATA; Schema: land; Owner: postgres
994 -- 1022 --
1002 \. 1030 \.
1003 1031
1004 1032
1005 ALTER TABLE zusatz_wert ENABLE TRIGGER ALL; 1033 ALTER TABLE zusatz_wert ENABLE TRIGGER ALL;
1006 1034
1035 SELECT setval(pg_get_serial_sequence('zusatz_wert', 'id'),
1036 (SELECT max(id) FROM zusatz_wert));
1037
1007 -- 1038 --
1008 -- PostgreSQL database dump complete 1039 -- PostgreSQL database dump complete
1009 -- 1040 --
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)