Browse code

- removed version table which is not needed anymore in 2.1

Jan Janak authored on 26/06/2008 00:43:06
Showing 8 changed files
... ...
@@ -10,8 +10,6 @@
10 10
 <database xmlns:xi="http://www.w3.org/2001/XInclude">
11 11
   <name>ser</name>
12 12
 
13
-  <xi:include href="version.xml"/>
14
-
15 13
   <!-- Accounting related tables -->
16 14
   <xi:include href="acc.xml"/>
17 15
   <xi:include href="missed_calls.xml"/>
18 16
deleted file mode 100644
... ...
@@ -1,19 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<!DOCTYPE table PUBLIC "-//iptel.org//DTD DBSchema V1.0//EN"
3
-  "http://iptel.org/dbschema/dtd/1.0/dbschema.dtd">
4
-
5
-<table id="version" xmlns:xi="http://www.w3.org/2001/XInclude">
6
-  <name>version</name>
7
-
8
-  <column id="tn">
9
-	<name>table_name</name>
10
-	<type>string</type>
11
-	<size>32</size>
12
-  </column>
13
-
14
-  <column id="tv">
15
-	<name>table_version</name>
16
-	<type>unsigned int</type>
17
-	<default>0</default>
18
-  </column>
19
-</table>
... ...
@@ -88,9 +88,6 @@
88 88
 	  <xsl:call-template name="get-name"/>
89 89
 	</xsl:variable>
90 90
 
91
-	<!-- Create row in version table -->
92
-	<xsl:apply-templates select="version"/>
93
-
94 91
 	<xsl:text>CREATE TABLE </xsl:text>
95 92
 	<xsl:value-of select="$table.name"/>
96 93
 	<xsl:text> (&#x0A;</xsl:text>
... ...
@@ -46,9 +46,6 @@
46 46
 	  <xsl:call-template name="get-name"/>
47 47
 	</xsl:variable>
48 48
 
49
-	<!-- Create row in version table -->
50
-	<xsl:apply-templates select="version"/>
51
-
52 49
 	<xsl:text>CREATE TABLE </xsl:text>
53 50
 	<xsl:value-of select="$table.name"/>
54 51
 	<xsl:text> (&#x0A;</xsl:text>
... ...
@@ -73,16 +70,6 @@
73 73
 	<xsl:text>);&#x0A;&#x0A;</xsl:text>
74 74
   </xsl:template>
75 75
 
76
-  <xsl:template match="version">
77
-	<xsl:text>INSERT INTO version (table_name, table_version) values ('</xsl:text>
78
-	<xsl:call-template name="get-name">
79
-	  <xsl:with-param name="select" select="parent::table"/>
80
-	</xsl:call-template>
81
-	<xsl:text>','</xsl:text>
82
-	<xsl:value-of select="text()"/>
83
-	<xsl:text>');&#x0A;</xsl:text>
84
-  </xsl:template>
85
-  
86 76
   <!-- ################ /TABLE ################  -->
87 77
 
88 78
 
89 79
deleted file mode 100644
... ...
@@ -1 +0,0 @@
1
-table_name(str) table_version(int) 
... ...
@@ -1,9 +1,3 @@
1
-CREATE TABLE version (
2
-    table_name VARCHAR(32) NOT NULL,
3
-    table_version INT UNSIGNED NOT NULL DEFAULT '0'
4
-);
5
-
6
-INSERT INTO version (table_name, table_version) values ('acc','4');
7 1
 CREATE TABLE acc (
8 2
     id INT AUTO_INCREMENT NOT NULL,
9 3
     server_id INT NOT NULL DEFAULT '0',
... ...
@@ -37,7 +31,6 @@ CREATE TABLE acc (
37 37
     KEY acc_to_uid (to_uid)
38 38
 );
39 39
 
40
-INSERT INTO version (table_name, table_version) values ('missed_calls','4');
41 40
 CREATE TABLE missed_calls (
42 41
     id INT AUTO_INCREMENT NOT NULL,
43 42
     server_id INT NOT NULL DEFAULT '0',
... ...
@@ -70,7 +63,6 @@ CREATE TABLE missed_calls (
70 70
     KEY mc_to_uid (to_uid)
71 71
 );
72 72
 
73
-INSERT INTO version (table_name, table_version) values ('credentials','7');
74 73
 CREATE TABLE credentials (
75 74
     auth_username VARCHAR(64) NOT NULL,
76 75
     did VARCHAR(64) NOT NULL DEFAULT '_default',
... ...
@@ -86,7 +78,6 @@ CREATE TABLE credentials (
86 86
     KEY realm_idx (realm)
87 87
 );
88 88
 
89
-INSERT INTO version (table_name, table_version) values ('attr_types','4');
90 89
 CREATE TABLE attr_types (
91 90
     name VARCHAR(32) NOT NULL,
92 91
     rich_type VARCHAR(32) NOT NULL DEFAULT 'string',
... ...
@@ -102,7 +93,6 @@ CREATE TABLE attr_types (
102 102
     UNIQUE KEY upt_idx1 (name)
103 103
 );
104 104
 
105
-INSERT INTO version (table_name, table_version) values ('global_attrs','1');
106 105
 CREATE TABLE global_attrs (
107 106
     name VARCHAR(32) NOT NULL,
108 107
     type INT NOT NULL DEFAULT '0',
... ...
@@ -111,7 +101,6 @@ CREATE TABLE global_attrs (
111 111
     UNIQUE KEY global_attrs_idx (name, value)
112 112
 );
113 113
 
114
-INSERT INTO version (table_name, table_version) values ('domain_attrs','1');
115 114
 CREATE TABLE domain_attrs (
116 115
     did VARCHAR(64),
117 116
     name VARCHAR(32) NOT NULL,
... ...
@@ -122,7 +111,6 @@ CREATE TABLE domain_attrs (
122 122
     KEY domain_did (did, flags)
123 123
 );
124 124
 
125
-INSERT INTO version (table_name, table_version) values ('user_attrs','3');
126 125
 CREATE TABLE user_attrs (
127 126
     uid VARCHAR(64) NOT NULL,
128 127
     name VARCHAR(32) NOT NULL,
... ...
@@ -132,7 +120,6 @@ CREATE TABLE user_attrs (
132 132
     UNIQUE KEY userattrs_idx (uid, name, value)
133 133
 );
134 134
 
135
-INSERT INTO version (table_name, table_version) values ('uri_attrs','2');
136 135
 CREATE TABLE uri_attrs (
137 136
     username VARCHAR(64) NOT NULL,
138 137
     did VARCHAR(64) NOT NULL,
... ...
@@ -144,7 +131,6 @@ CREATE TABLE uri_attrs (
144 144
     UNIQUE KEY uriattrs_idx (username, did, name, value, scheme)
145 145
 );
146 146
 
147
-INSERT INTO version (table_name, table_version) values ('domain','2');
148 147
 CREATE TABLE domain (
149 148
     did VARCHAR(64) NOT NULL,
150 149
     domain VARCHAR(128) NOT NULL,
... ...
@@ -153,7 +139,6 @@ CREATE TABLE domain (
153 153
     KEY did_idx (did)
154 154
 );
155 155
 
156
-INSERT INTO version (table_name, table_version) values ('domain_settings','1');
157 156
 CREATE TABLE domain_settings (
158 157
     did VARCHAR(64) NOT NULL,
159 158
     filename VARCHAR(255) NOT NULL,
... ...
@@ -165,7 +150,6 @@ CREATE TABLE domain_settings (
165 165
     KEY ds_df (did, filename)
166 166
 );
167 167
 
168
-INSERT INTO version (table_name, table_version) values ('location','9');
169 168
 CREATE TABLE location (
170 169
     uid VARCHAR(64) NOT NULL,
171 170
     aor VARCHAR(255) NOT NULL,
... ...
@@ -184,7 +168,6 @@ CREATE TABLE location (
184 184
     KEY location_expires (expires)
185 185
 );
186 186
 
187
-INSERT INTO version (table_name, table_version) values ('contact_attrs','1');
188 187
 CREATE TABLE contact_attrs (
189 188
     uid VARCHAR(64) NOT NULL,
190 189
     contact VARCHAR(255) NOT NULL,
... ...
@@ -195,7 +178,6 @@ CREATE TABLE contact_attrs (
195 195
     UNIQUE KEY contactattrs_idx (uid, contact, name)
196 196
 );
197 197
 
198
-INSERT INTO version (table_name, table_version) values ('trusted','1');
199 198
 CREATE TABLE trusted (
200 199
     src_ip VARCHAR(39) NOT NULL,
201 200
     proto VARCHAR(4) NOT NULL,
... ...
@@ -203,7 +185,6 @@ CREATE TABLE trusted (
203 203
     UNIQUE KEY trusted_idx (src_ip, proto, from_pattern)
204 204
 );
205 205
 
206
-INSERT INTO version (table_name, table_version) values ('ipmatch','1');
207 206
 CREATE TABLE ipmatch (
208 207
     ip VARCHAR(50) NOT NULL DEFAULT '',
209 208
     avp_val VARCHAR(30) DEFAULT NULL,
... ...
@@ -212,7 +193,6 @@ CREATE TABLE ipmatch (
212 212
     UNIQUE KEY ipmatch_idx (ip, mark)
213 213
 );
214 214
 
215
-INSERT INTO version (table_name, table_version) values ('phonebook','1');
216 215
 CREATE TABLE phonebook (
217 216
     id INT AUTO_INCREMENT NOT NULL,
218 217
     uid VARCHAR(64) NOT NULL,
... ...
@@ -223,7 +203,6 @@ CREATE TABLE phonebook (
223 223
     KEY pb_uid (uid)
224 224
 );
225 225
 
226
-INSERT INTO version (table_name, table_version) values ('gw','3');
227 226
 CREATE TABLE gw (
228 227
     gw_name VARCHAR(128) NOT NULL,
229 228
     ip_addr INT UNSIGNED NOT NULL,
... ...
@@ -236,14 +215,12 @@ CREATE TABLE gw (
236 236
     KEY gw_idx2 (grp_id)
237 237
 );
238 238
 
239
-INSERT INTO version (table_name, table_version) values ('gw_grp','2');
240 239
 CREATE TABLE gw_grp (
241 240
     grp_id INT AUTO_INCREMENT NOT NULL,
242 241
     grp_name VARCHAR(64) NOT NULL,
243 242
     UNIQUE KEY gwgrp_idx (grp_id)
244 243
 );
245 244
 
246
-INSERT INTO version (table_name, table_version) values ('lcr','1');
247 245
 CREATE TABLE lcr (
248 246
     prefix VARCHAR(16) NOT NULL,
249 247
     from_uri VARCHAR(255) NOT NULL DEFAULT '%',
... ...
@@ -254,7 +231,6 @@ CREATE TABLE lcr (
254 254
     KEY lcr_idx3 (grp_id)
255 255
 );
256 256
 
257
-INSERT INTO version (table_name, table_version) values ('grp','3');
258 257
 CREATE TABLE grp (
259 258
     uid VARCHAR(64) NOT NULL DEFAULT '',
260 259
     grp VARCHAR(64) NOT NULL DEFAULT '',
... ...
@@ -262,7 +238,6 @@ CREATE TABLE grp (
262 262
     KEY grp_idx (uid, grp)
263 263
 );
264 264
 
265
-INSERT INTO version (table_name, table_version) values ('silo','4');
266 265
 CREATE TABLE silo (
267 266
     mid INT AUTO_INCREMENT NOT NULL,
268 267
     from_hdr VARCHAR(255) NOT NULL,
... ...
@@ -276,7 +251,6 @@ CREATE TABLE silo (
276 276
     UNIQUE KEY silo_idx1 (mid)
277 277
 );
278 278
 
279
-INSERT INTO version (table_name, table_version) values ('uri','3');
280 279
 CREATE TABLE uri (
281 280
     uid VARCHAR(64) NOT NULL,
282 281
     did VARCHAR(64) NOT NULL,
... ...
@@ -287,7 +261,6 @@ CREATE TABLE uri (
287 287
     KEY uri_uid (uid)
288 288
 );
289 289
 
290
-INSERT INTO version (table_name, table_version) values ('speed_dial','2');
291 290
 CREATE TABLE speed_dial (
292 291
     id INT AUTO_INCREMENT NOT NULL,
293 292
     uid VARCHAR(64) NOT NULL,
... ...
@@ -299,7 +272,6 @@ CREATE TABLE speed_dial (
299 299
     KEY speeddial_uid (uid)
300 300
 );
301 301
 
302
-INSERT INTO version (table_name, table_version) values ('sd_attrs','1');
303 302
 CREATE TABLE sd_attrs (
304 303
     id VARCHAR(64) NOT NULL,
305 304
     name VARCHAR(32) NOT NULL,
... ...
@@ -309,7 +281,6 @@ CREATE TABLE sd_attrs (
309 309
     UNIQUE KEY sd_idx (id, name, value)
310 310
 );
311 311
 
312
-INSERT INTO version (table_name, table_version) values ('presentity','5');
313 312
 CREATE TABLE presentity (
314 313
     pres_id VARCHAR(64) NOT NULL,
315 314
     uri VARCHAR(255) NOT NULL,
... ...
@@ -319,7 +290,6 @@ CREATE TABLE presentity (
319 319
     UNIQUE KEY presentity_key (pres_id)
320 320
 );
321 321
 
322
-INSERT INTO version (table_name, table_version) values ('presentity_notes','5');
323 322
 CREATE TABLE presentity_notes (
324 323
     dbid VARCHAR(64) NOT NULL,
325 324
     pres_id VARCHAR(64) NOT NULL,
... ...
@@ -330,7 +300,6 @@ CREATE TABLE presentity_notes (
330 330
     UNIQUE KEY pnotes_idx1 (dbid)
331 331
 );
332 332
 
333
-INSERT INTO version (table_name, table_version) values ('presentity_extensions','5');
334 333
 CREATE TABLE presentity_extensions (
335 334
     dbid VARCHAR(64) NOT NULL,
336 335
     pres_id VARCHAR(64) NOT NULL,
... ...
@@ -340,7 +309,6 @@ CREATE TABLE presentity_extensions (
340 340
     UNIQUE KEY presextensions_idx1 (dbid)
341 341
 );
342 342
 
343
-INSERT INTO version (table_name, table_version) values ('presentity_contact','5');
344 343
 CREATE TABLE presentity_contact (
345 344
     pres_id VARCHAR(64) NOT NULL,
346 345
     basic INT(3) NOT NULL,
... ...
@@ -353,7 +321,6 @@ CREATE TABLE presentity_contact (
353 353
     UNIQUE KEY presid_index (pres_id, tupleid)
354 354
 );
355 355
 
356
-INSERT INTO version (table_name, table_version) values ('watcherinfo','5');
357 356
 CREATE TABLE watcherinfo (
358 357
     w_uri VARCHAR(255) NOT NULL,
359 358
     display_name VARCHAR(128) NOT NULL,
... ...
@@ -370,7 +337,6 @@ CREATE TABLE watcherinfo (
370 370
     UNIQUE KEY wi_idx1 (s_id)
371 371
 );
372 372
 
373
-INSERT INTO version (table_name, table_version) values ('tuple_notes','5');
374 373
 CREATE TABLE tuple_notes (
375 374
     pres_id VARCHAR(64) NOT NULL,
376 375
     tupleid VARCHAR(64) NOT NULL,
... ...
@@ -378,7 +344,6 @@ CREATE TABLE tuple_notes (
378 378
     lang VARCHAR(64) NOT NULL
379 379
 );
380 380
 
381
-INSERT INTO version (table_name, table_version) values ('tuple_extensions','5');
382 381
 CREATE TABLE tuple_extensions (
383 382
     pres_id VARCHAR(64) NOT NULL,
384 383
     tupleid VARCHAR(64) NOT NULL,
... ...
@@ -386,7 +351,6 @@ CREATE TABLE tuple_extensions (
386 386
     status_extension INT(1) NOT NULL
387 387
 );
388 388
 
389
-INSERT INTO version (table_name, table_version) values ('offline_winfo','5');
390 389
 CREATE TABLE offline_winfo (
391 390
     uid VARCHAR(64) NOT NULL,
392 391
     watcher VARCHAR(255) NOT NULL,
... ...
@@ -399,7 +363,6 @@ CREATE TABLE offline_winfo (
399 399
     UNIQUE KEY offline_winfo_key (dbid)
400 400
 );
401 401
 
402
-INSERT INTO version (table_name, table_version) values ('rls_subscription','1');
403 402
 CREATE TABLE rls_subscription (
404 403
     id VARCHAR(48) NOT NULL,
405 404
     doc_version INT NOT NULL,
... ...
@@ -414,7 +377,6 @@ CREATE TABLE rls_subscription (
414 414
     UNIQUE KEY rls_subscription_key (id)
415 415
 );
416 416
 
417
-INSERT INTO version (table_name, table_version) values ('rls_vs','1');
418 417
 CREATE TABLE rls_vs (
419 418
     id VARCHAR(48) NOT NULL,
420 419
     rls_id VARCHAR(48) NOT NULL,
... ...
@@ -422,14 +384,12 @@ CREATE TABLE rls_vs (
422 422
     UNIQUE KEY rls_vs_key (id)
423 423
 );
424 424
 
425
-INSERT INTO version (table_name, table_version) values ('rls_vs_names','1');
426 425
 CREATE TABLE rls_vs_names (
427 426
     id VARCHAR(48) NOT NULL,
428 427
     name VARCHAR(64),
429 428
     lang VARCHAR(64)
430 429
 );
431 430
 
432
-INSERT INTO version (table_name, table_version) values ('i18n','1');
433 431
 CREATE TABLE i18n (
434 432
     code INT NOT NULL,
435 433
     reason_re VARCHAR(255) DEFAULT NULL,
... ...
@@ -439,14 +399,12 @@ CREATE TABLE i18n (
439 439
     UNIQUE KEY i18n_uniq_idx (code, lang)
440 440
 );
441 441
 
442
-INSERT INTO version (table_name, table_version) values ('pdt','1');
443 442
 CREATE TABLE pdt (
444 443
     prefix VARCHAR(32) NOT NULL,
445 444
     domain VARCHAR(255) NOT NULL,
446 445
     UNIQUE KEY pdt_idx (prefix)
447 446
 );
448 447
 
449
-INSERT INTO version (table_name, table_version) values ('cpl','2');
450 448
 CREATE TABLE cpl (
451 449
     uid VARCHAR(64) NOT NULL,
452 450
     cpl_xml BLOB,
... ...
@@ -454,7 +412,6 @@ CREATE TABLE cpl (
454 454
     UNIQUE KEY cpl_key (uid)
455 455
 );
456 456
 
457
-INSERT INTO version (table_name, table_version) values ('customers','1');
458 457
 CREATE TABLE customers (
459 458
     cid INT AUTO_INCREMENT NOT NULL,
460 459
     name VARCHAR(128) NOT NULL,
... ...
@@ -1,9 +1,3 @@
1
-CREATE TABLE version (
2
-    table_name VARCHAR(32) NOT NULL,
3
-    table_version INT UNSIGNED NOT NULL DEFAULT '0'
4
-);
5
-
6
-INSERT INTO version (table_name, table_version) values ('acc','4');
7 1
 CREATE TABLE acc (
8 2
     id INT NOT NULL,
9 3
     server_id INT NOT NULL DEFAULT '0',
... ...
@@ -37,7 +31,6 @@ CREATE TABLE acc (
37 37
     KEY acc_to_uid (to_uid)
38 38
 );
39 39
 
40
-INSERT INTO version (table_name, table_version) values ('missed_calls','4');
41 40
 CREATE TABLE missed_calls (
42 41
     id INT NOT NULL,
43 42
     server_id INT NOT NULL DEFAULT '0',
... ...
@@ -70,7 +63,6 @@ CREATE TABLE missed_calls (
70 70
     KEY mc_to_uid (to_uid)
71 71
 );
72 72
 
73
-INSERT INTO version (table_name, table_version) values ('credentials','7');
74 73
 CREATE TABLE credentials (
75 74
     auth_username VARCHAR(64) NOT NULL,
76 75
     did VARCHAR(64) NOT NULL DEFAULT '_default',
... ...
@@ -86,7 +78,6 @@ CREATE TABLE credentials (
86 86
     KEY realm_idx (realm)
87 87
 );
88 88
 
89
-INSERT INTO version (table_name, table_version) values ('attr_types','4');
90 89
 CREATE TABLE attr_types (
91 90
     name VARCHAR(32) NOT NULL,
92 91
     rich_type VARCHAR(32) NOT NULL DEFAULT 'string',
... ...
@@ -102,7 +93,6 @@ CREATE TABLE attr_types (
102 102
     UNIQUE KEY upt_idx1 (name)
103 103
 );
104 104
 
105
-INSERT INTO version (table_name, table_version) values ('global_attrs','1');
106 105
 CREATE TABLE global_attrs (
107 106
     name VARCHAR(32) NOT NULL,
108 107
     type INT NOT NULL DEFAULT '0',
... ...
@@ -111,7 +101,6 @@ CREATE TABLE global_attrs (
111 111
     UNIQUE KEY global_attrs_idx (name, value)
112 112
 );
113 113
 
114
-INSERT INTO version (table_name, table_version) values ('domain_attrs','1');
115 114
 CREATE TABLE domain_attrs (
116 115
     did VARCHAR(64),
117 116
     name VARCHAR(32) NOT NULL,
... ...
@@ -122,7 +111,6 @@ CREATE TABLE domain_attrs (
122 122
     KEY domain_did (did, flags)
123 123
 );
124 124
 
125
-INSERT INTO version (table_name, table_version) values ('user_attrs','3');
126 125
 CREATE TABLE user_attrs (
127 126
     uuid VARCHAR(64) NOT NULL,
128 127
     name VARCHAR(32) NOT NULL,
... ...
@@ -132,7 +120,6 @@ CREATE TABLE user_attrs (
132 132
     UNIQUE KEY userattrs_idx (uuid, name, value)
133 133
 );
134 134
 
135
-INSERT INTO version (table_name, table_version) values ('uri_attrs','2');
136 135
 CREATE TABLE uri_attrs (
137 136
     username VARCHAR(64) NOT NULL,
138 137
     did VARCHAR(64) NOT NULL,
... ...
@@ -144,7 +131,6 @@ CREATE TABLE uri_attrs (
144 144
     UNIQUE KEY uriattrs_idx (username, did, name, value, scheme)
145 145
 );
146 146
 
147
-INSERT INTO version (table_name, table_version) values ('domain','2');
148 147
 CREATE TABLE domain (
149 148
     did VARCHAR(64) NOT NULL,
150 149
     domain VARCHAR(128) NOT NULL,
... ...
@@ -153,7 +139,6 @@ CREATE TABLE domain (
153 153
     KEY did_idx (did)
154 154
 );
155 155
 
156
-INSERT INTO version (table_name, table_version) values ('domain_settings','1');
157 156
 CREATE TABLE domain_settings (
158 157
     did VARCHAR(64) NOT NULL,
159 158
     filename VARCHAR(255) NOT NULL,
... ...
@@ -165,7 +150,6 @@ CREATE TABLE domain_settings (
165 165
     KEY ds_df (did, filename)
166 166
 );
167 167
 
168
-INSERT INTO version (table_name, table_version) values ('location','9');
169 168
 CREATE TABLE location (
170 169
     uuid VARCHAR(64) NOT NULL,
171 170
     aor VARCHAR(255) NOT NULL,
... ...
@@ -184,7 +168,6 @@ CREATE TABLE location (
184 184
     KEY location_expires (expires)
185 185
 );
186 186
 
187
-INSERT INTO version (table_name, table_version) values ('contact_attrs','1');
188 187
 CREATE TABLE contact_attrs (
189 188
     uuid VARCHAR(64) NOT NULL,
190 189
     contact VARCHAR(255) NOT NULL,
... ...
@@ -195,7 +178,6 @@ CREATE TABLE contact_attrs (
195 195
     UNIQUE KEY contactattrs_idx (uuid, contact, name)
196 196
 );
197 197
 
198
-INSERT INTO version (table_name, table_version) values ('trusted','1');
199 198
 CREATE TABLE trusted (
200 199
     src_ip VARCHAR(39) NOT NULL,
201 200
     proto VARCHAR(4) NOT NULL,
... ...
@@ -203,7 +185,6 @@ CREATE TABLE trusted (
203 203
     UNIQUE KEY trusted_idx (src_ip, proto, from_pattern)
204 204
 );
205 205
 
206
-INSERT INTO version (table_name, table_version) values ('ipmatch','1');
207 206
 CREATE TABLE ipmatch (
208 207
     ip VARCHAR(50) NOT NULL DEFAULT '',
209 208
     avp_val VARCHAR(30) DEFAULT NULL,
... ...
@@ -212,7 +193,6 @@ CREATE TABLE ipmatch (
212 212
     UNIQUE KEY ipmatch_idx (ip, mark)
213 213
 );
214 214
 
215
-INSERT INTO version (table_name, table_version) values ('phonebook','1');
216 215
 CREATE TABLE phonebook (
217 216
     id INT UNSIGNED NOT NULL,
218 217
     uuid VARCHAR(64) NOT NULL,
... ...
@@ -223,7 +203,6 @@ CREATE TABLE phonebook (
223 223
     KEY pb_uid (uuid)
224 224
 );
225 225
 
226
-INSERT INTO version (table_name, table_version) values ('gw','3');
227 226
 CREATE TABLE gw (
228 227
     gw_name VARCHAR(128) NOT NULL,
229 228
     ip_addr INT UNSIGNED NOT NULL,
... ...
@@ -236,14 +215,12 @@ CREATE TABLE gw (
236 236
     KEY gw_idx2 (grp_id)
237 237
 );
238 238
 
239
-INSERT INTO version (table_name, table_version) values ('gw_grp','2');
240 239
 CREATE TABLE gw_grp (
241 240
     grp_id INT NOT NULL,
242 241
     grp_name VARCHAR(64) NOT NULL,
243 242
     UNIQUE KEY gwgrp_idx (grp_id)
244 243
 );
245 244
 
246
-INSERT INTO version (table_name, table_version) values ('lcr','1');
247 245
 CREATE TABLE lcr (
248 246
     prefix VARCHAR(16) NOT NULL,
249 247
     from_uri VARCHAR(255) NOT NULL DEFAULT '%',
... ...
@@ -254,7 +231,6 @@ CREATE TABLE lcr (
254 254
     KEY lcr_idx3 (grp_id)
255 255
 );
256 256
 
257
-INSERT INTO version (table_name, table_version) values ('grp','3');
258 257
 CREATE TABLE grp (
259 258
     uuid VARCHAR(64) NOT NULL DEFAULT '',
260 259
     grp VARCHAR(64) NOT NULL DEFAULT '',
... ...
@@ -262,7 +238,6 @@ CREATE TABLE grp (
262 262
     KEY grp_idx (uuid, grp)
263 263
 );
264 264
 
265
-INSERT INTO version (table_name, table_version) values ('silo','4');
266 265
 CREATE TABLE silo (
267 266
     mid INT NOT NULL,
268 267
     from_hdr VARCHAR(255) NOT NULL,
... ...
@@ -276,7 +251,6 @@ CREATE TABLE silo (
276 276
     UNIQUE KEY silo_idx1 (mid)
277 277
 );
278 278
 
279
-INSERT INTO version (table_name, table_version) values ('uri','3');
280 279
 CREATE TABLE uri (
281 280
     uuid VARCHAR(64) NOT NULL,
282 281
     did VARCHAR(64) NOT NULL,
... ...
@@ -287,7 +261,6 @@ CREATE TABLE uri (
287 287
     KEY uri_uid (uuid)
288 288
 );
289 289
 
290
-INSERT INTO version (table_name, table_version) values ('speed_dial','2');
291 290
 CREATE TABLE speed_dial (
292 291
     id INT NOT NULL,
293 292
     uuid VARCHAR(64) NOT NULL,
... ...
@@ -299,7 +272,6 @@ CREATE TABLE speed_dial (
299 299
     KEY speeddial_uid (uuid)
300 300
 );
301 301
 
302
-INSERT INTO version (table_name, table_version) values ('sd_attrs','1');
303 302
 CREATE TABLE sd_attrs (
304 303
     id VARCHAR(64) NOT NULL,
305 304
     name VARCHAR(32) NOT NULL,
... ...
@@ -309,7 +281,6 @@ CREATE TABLE sd_attrs (
309 309
     UNIQUE KEY sd_idx (id, name, value)
310 310
 );
311 311
 
312
-INSERT INTO version (table_name, table_version) values ('presentity','5');
313 312
 CREATE TABLE presentity (
314 313
     pres_id VARCHAR(64) NOT NULL,
315 314
     uri VARCHAR(255) NOT NULL,
... ...
@@ -319,7 +290,6 @@ CREATE TABLE presentity (
319 319
     UNIQUE KEY presentity_key (pres_id)
320 320
 );
321 321
 
322
-INSERT INTO version (table_name, table_version) values ('presentity_notes','5');
323 322
 CREATE TABLE presentity_notes (
324 323
     dbid VARCHAR(64) NOT NULL,
325 324
     pres_id VARCHAR(64) NOT NULL,
... ...
@@ -330,7 +300,6 @@ CREATE TABLE presentity_notes (
330 330
     UNIQUE KEY pnotes_idx1 (dbid)
331 331
 );
332 332
 
333
-INSERT INTO version (table_name, table_version) values ('presentity_extensions','5');
334 333
 CREATE TABLE presentity_extensions (
335 334
     dbid VARCHAR(64) NOT NULL,
336 335
     pres_id VARCHAR(64) NOT NULL,
... ...
@@ -340,7 +309,6 @@ CREATE TABLE presentity_extensions (
340 340
     UNIQUE KEY presextensions_idx1 (dbid)
341 341
 );
342 342
 
343
-INSERT INTO version (table_name, table_version) values ('presentity_contact','5');
344 343
 CREATE TABLE presentity_contact (
345 344
     pres_id VARCHAR(64) NOT NULL,
346 345
     basic INT(3) NOT NULL,
... ...
@@ -353,7 +321,6 @@ CREATE TABLE presentity_contact (
353 353
     UNIQUE KEY presid_index (pres_id, tupleid)
354 354
 );
355 355
 
356
-INSERT INTO version (table_name, table_version) values ('watcherinfo','5');
357 356
 CREATE TABLE watcherinfo (
358 357
     w_uri VARCHAR(255) NOT NULL,
359 358
     display_name VARCHAR(128) NOT NULL,
... ...
@@ -370,7 +337,6 @@ CREATE TABLE watcherinfo (
370 370
     UNIQUE KEY wi_idx1 (s_id)
371 371
 );
372 372
 
373
-INSERT INTO version (table_name, table_version) values ('tuple_notes','5');
374 373
 CREATE TABLE tuple_notes (
375 374
     pres_id VARCHAR(64) NOT NULL,
376 375
     tupleid VARCHAR(64) NOT NULL,
... ...
@@ -378,7 +344,6 @@ CREATE TABLE tuple_notes (
378 378
     lang VARCHAR(64) NOT NULL
379 379
 );
380 380
 
381
-INSERT INTO version (table_name, table_version) values ('tuple_extensions','5');
382 381
 CREATE TABLE tuple_extensions (
383 382
     pres_id VARCHAR(64) NOT NULL,
384 383
     tupleid VARCHAR(64) NOT NULL,
... ...
@@ -386,7 +351,6 @@ CREATE TABLE tuple_extensions (
386 386
     status_extension INT(1) NOT NULL
387 387
 );
388 388
 
389
-INSERT INTO version (table_name, table_version) values ('offline_winfo','5');
390 389
 CREATE TABLE offline_winfo (
391 390
     uuid VARCHAR(64) NOT NULL,
392 391
     watcher VARCHAR(255) NOT NULL,
... ...
@@ -399,7 +363,6 @@ CREATE TABLE offline_winfo (
399 399
     UNIQUE KEY offline_winfo_key (dbid)
400 400
 );
401 401
 
402
-INSERT INTO version (table_name, table_version) values ('rls_subscription','1');
403 402
 CREATE TABLE rls_subscription (
404 403
     id VARCHAR(48) NOT NULL,
405 404
     doc_version INT NOT NULL,
... ...
@@ -414,7 +377,6 @@ CREATE TABLE rls_subscription (
414 414
     UNIQUE KEY rls_subscription_key (id)
415 415
 );
416 416
 
417
-INSERT INTO version (table_name, table_version) values ('rls_vs','1');
418 417
 CREATE TABLE rls_vs (
419 418
     id VARCHAR(48) NOT NULL,
420 419
     rls_id VARCHAR(48) NOT NULL,
... ...
@@ -422,14 +384,12 @@ CREATE TABLE rls_vs (
422 422
     UNIQUE KEY rls_vs_key (id)
423 423
 );
424 424
 
425
-INSERT INTO version (table_name, table_version) values ('rls_vs_names','1');
426 425
 CREATE TABLE rls_vs_names (
427 426
     id VARCHAR(48) NOT NULL,
428 427
     name VARCHAR(64),
429 428
     lang VARCHAR(64)
430 429
 );
431 430
 
432
-INSERT INTO version (table_name, table_version) values ('i18n','1');
433 431
 CREATE TABLE i18n (
434 432
     code INT NOT NULL,
435 433
     reason_re VARCHAR(255) DEFAULT NULL,
... ...
@@ -439,14 +399,12 @@ CREATE TABLE i18n (
439 439
     UNIQUE KEY i18n_uniq_idx (code, lang)
440 440
 );
441 441
 
442
-INSERT INTO version (table_name, table_version) values ('pdt','1');
443 442
 CREATE TABLE pdt (
444 443
     prefix VARCHAR(32) NOT NULL,
445 444
     domain VARCHAR(255) NOT NULL,
446 445
     UNIQUE KEY pdt_idx (prefix)
447 446
 );
448 447
 
449
-INSERT INTO version (table_name, table_version) values ('cpl','2');
450 448
 CREATE TABLE cpl (
451 449
     uuid VARCHAR(64) NOT NULL,
452 450
     cpl_xml BLOB,
... ...
@@ -454,7 +412,6 @@ CREATE TABLE cpl (
454 454
     UNIQUE KEY cpl_key (uuid)
455 455
 );
456 456
 
457
-INSERT INTO version (table_name, table_version) values ('customers','1');
458 457
 CREATE TABLE customers (
459 458
     cid INT UNSIGNED NOT NULL,
460 459
     name VARCHAR(128) NOT NULL,
... ...
@@ -1,10 +1,4 @@
1 1
 
2
-CREATE TABLE version (
3
-    table_name VARCHAR(32) NOT NULL,
4
-    table_version INTEGER NOT NULL DEFAULT '0'
5
-);
6
-
7
-INSERT INTO version (table_name, table_version) values ('acc','4');
8 2
 CREATE TABLE acc (
9 3
     id SERIAL NOT NULL,
10 4
     server_id INTEGER NOT NULL DEFAULT '0',
... ...
@@ -39,7 +33,6 @@ CREATE INDEX acc_cid_key ON acc (sip_callid);
39 39
 CREATE INDEX acc_from_uid ON acc (from_uid);
40 40
 CREATE INDEX acc_to_uid ON acc (to_uid);
41 41
 
42
-INSERT INTO version (table_name, table_version) values ('missed_calls','4');
43 42
 CREATE TABLE missed_calls (
44 43
     id SERIAL NOT NULL,
45 44
     server_id INTEGER NOT NULL DEFAULT '0',
... ...
@@ -73,7 +66,6 @@ CREATE TABLE missed_calls (
73 73
 CREATE INDEX mc_cid_key ON missed_calls (sip_callid);
74 74
 CREATE INDEX mc_to_uid ON missed_calls (to_uid);
75 75
 
76
-INSERT INTO version (table_name, table_version) values ('credentials','7');
77 76
 CREATE TABLE credentials (
78 77
     auth_username VARCHAR(64) NOT NULL,
79 78
     did VARCHAR(64) NOT NULL DEFAULT '_default',
... ...
@@ -90,7 +82,6 @@ CREATE INDEX uid ON credentials (uid);
90 90
 CREATE INDEX did_idx ON credentials (did);
91 91
 CREATE INDEX realm_idx ON credentials (realm);
92 92
 
93
-INSERT INTO version (table_name, table_version) values ('attr_types','4');
94 93
 CREATE TABLE attr_types (
95 94
     name VARCHAR(32) NOT NULL,
96 95
     rich_type VARCHAR(32) NOT NULL DEFAULT 'string',
... ...
@@ -106,7 +97,6 @@ CREATE TABLE attr_types (
106 106
     CONSTRAINT upt_idx1 UNIQUE (name)
107 107
 );
108 108
 
109
-INSERT INTO version (table_name, table_version) values ('global_attrs','1');
110 109
 CREATE TABLE global_attrs (
111 110
     name VARCHAR(32) NOT NULL,
112 111
     type INTEGER NOT NULL DEFAULT '0',
... ...
@@ -115,7 +105,6 @@ CREATE TABLE global_attrs (
115 115
     CONSTRAINT global_attrs_idx UNIQUE (name, value)
116 116
 );
117 117
 
118
-INSERT INTO version (table_name, table_version) values ('domain_attrs','1');
119 118
 CREATE TABLE domain_attrs (
120 119
     did VARCHAR(64),
121 120
     name VARCHAR(32) NOT NULL,
... ...
@@ -127,7 +116,6 @@ CREATE TABLE domain_attrs (
127 127
 
128 128
 CREATE INDEX domain_did ON domain_attrs (did, flags);
129 129
 
130
-INSERT INTO version (table_name, table_version) values ('user_attrs','3');
131 130
 CREATE TABLE user_attrs (
132 131
     uid VARCHAR(64) NOT NULL,
133 132
     name VARCHAR(32) NOT NULL,
... ...
@@ -137,7 +125,6 @@ CREATE TABLE user_attrs (
137 137
     CONSTRAINT userattrs_idx UNIQUE (uid, name, value)
138 138
 );
139 139
 
140
-INSERT INTO version (table_name, table_version) values ('uri_attrs','2');
141 140
 CREATE TABLE uri_attrs (
142 141
     username VARCHAR(64) NOT NULL,
143 142
     did VARCHAR(64) NOT NULL,
... ...
@@ -149,7 +136,6 @@ CREATE TABLE uri_attrs (
149 149
     CONSTRAINT uriattrs_idx UNIQUE (username, did, name, value, scheme)
150 150
 );
151 151
 
152
-INSERT INTO version (table_name, table_version) values ('domain','2');
153 152
 CREATE TABLE domain (
154 153
     did VARCHAR(64) NOT NULL,
155 154
     domain VARCHAR(128) NOT NULL,
... ...
@@ -159,7 +145,6 @@ CREATE TABLE domain (
159 159
 
160 160
 CREATE INDEX did_idx ON domain (did);
161 161
 
162
-INSERT INTO version (table_name, table_version) values ('domain_settings','1');
163 162
 CREATE TABLE domain_settings (
164 163
     did VARCHAR(64) NOT NULL,
165 164
     filename VARCHAR(255) NOT NULL,
... ...
@@ -172,7 +157,6 @@ CREATE TABLE domain_settings (
172 172
 
173 173
 CREATE INDEX ds_df ON domain_settings (did, filename);
174 174
 
175
-INSERT INTO version (table_name, table_version) values ('location','9');
176 175
 CREATE TABLE location (
177 176
     uid VARCHAR(64) NOT NULL,
178 177
     aor VARCHAR(255) NOT NULL,
... ...
@@ -192,7 +176,6 @@ CREATE TABLE location (
192 192
 CREATE INDEX location_contact ON location (contact);
193 193
 CREATE INDEX location_expires ON location (expires);
194 194
 
195
-INSERT INTO version (table_name, table_version) values ('contact_attrs','1');
196 195
 CREATE TABLE contact_attrs (
197 196
     uid VARCHAR(64) NOT NULL,
198 197
     contact VARCHAR(255) NOT NULL,
... ...
@@ -203,7 +186,6 @@ CREATE TABLE contact_attrs (
203 203
     CONSTRAINT contactattrs_idx UNIQUE (uid, contact, name)
204 204
 );
205 205
 
206
-INSERT INTO version (table_name, table_version) values ('trusted','1');
207 206
 CREATE TABLE trusted (
208 207
     src_ip VARCHAR(39) NOT NULL,
209 208
     proto VARCHAR(4) NOT NULL,
... ...
@@ -211,7 +193,6 @@ CREATE TABLE trusted (
211 211
     CONSTRAINT trusted_idx UNIQUE (src_ip, proto, from_pattern)
212 212
 );
213 213
 
214
-INSERT INTO version (table_name, table_version) values ('ipmatch','1');
215 214
 CREATE TABLE ipmatch (
216 215
     ip VARCHAR(50) NOT NULL DEFAULT '',
217 216
     avp_val VARCHAR(30) DEFAULT NULL,
... ...
@@ -220,7 +201,6 @@ CREATE TABLE ipmatch (
220 220
     CONSTRAINT ipmatch_idx UNIQUE (ip, mark)
221 221
 );
222 222
 
223
-INSERT INTO version (table_name, table_version) values ('phonebook','1');
224 223
 CREATE TABLE phonebook (
225 224
     id SERIAL NOT NULL,
226 225
     uid VARCHAR(64) NOT NULL,
... ...
@@ -232,7 +212,6 @@ CREATE TABLE phonebook (
232 232
 
233 233
 CREATE INDEX pb_uid ON phonebook (uid);
234 234
 
235
-INSERT INTO version (table_name, table_version) values ('gw','3');
236 235
 CREATE TABLE gw (
237 236
     gw_name VARCHAR(128) NOT NULL,
238 237
     ip_addr INTEGER NOT NULL,
... ...
@@ -246,14 +225,12 @@ CREATE TABLE gw (
246 246
 
247 247
 CREATE INDEX gw_idx2 ON gw (grp_id);
248 248
 
249
-INSERT INTO version (table_name, table_version) values ('gw_grp','2');
250 249
 CREATE TABLE gw_grp (
251 250
     grp_id SERIAL NOT NULL,
252 251
     grp_name VARCHAR(64) NOT NULL,
253 252
     CONSTRAINT gwgrp_idx UNIQUE (grp_id)
254 253
 );
255 254
 
256
-INSERT INTO version (table_name, table_version) values ('lcr','1');
257 255
 CREATE TABLE lcr (
258 256
     prefix VARCHAR(16) NOT NULL,
259 257
     from_uri VARCHAR(255) NOT NULL DEFAULT '%',
... ...
@@ -265,7 +242,6 @@ CREATE INDEX lcr_idx1 ON lcr (prefix);
265 265
 CREATE INDEX lcr_idx2 ON lcr (from_uri);
266 266
 CREATE INDEX lcr_idx3 ON lcr (grp_id);
267 267
 
268
-INSERT INTO version (table_name, table_version) values ('grp','3');
269 268
 CREATE TABLE grp (
270 269
     uid VARCHAR(64) NOT NULL DEFAULT '',
271 270
     grp VARCHAR(64) NOT NULL DEFAULT '',
... ...
@@ -274,7 +250,6 @@ CREATE TABLE grp (
274 274
 
275 275
 CREATE INDEX grp_idx ON grp (uid, grp);
276 276
 
277
-INSERT INTO version (table_name, table_version) values ('silo','4');
278 277
 CREATE TABLE silo (
279 278
     mid SERIAL NOT NULL,
280 279
     from_hdr VARCHAR(255) NOT NULL,
... ...
@@ -288,7 +263,6 @@ CREATE TABLE silo (
288 288
     CONSTRAINT silo_idx1 UNIQUE (mid)
289 289
 );
290 290
 
291
-INSERT INTO version (table_name, table_version) values ('uri','3');
292 291
 CREATE TABLE uri (
293 292
     uid VARCHAR(64) NOT NULL,
294 293
     did VARCHAR(64) NOT NULL,
... ...
@@ -300,7 +274,6 @@ CREATE TABLE uri (
300 300
 CREATE INDEX uri_idx1 ON uri (username, did, scheme);
301 301
 CREATE INDEX uri_uid ON uri (uid);
302 302
 
303
-INSERT INTO version (table_name, table_version) values ('speed_dial','2');
304 303
 CREATE TABLE speed_dial (
305 304
     id SERIAL NOT NULL,
306 305
     uid VARCHAR(64) NOT NULL,
... ...
@@ -313,7 +286,6 @@ CREATE TABLE speed_dial (
313 313
 
314 314
 CREATE INDEX speeddial_uid ON speed_dial (uid);
315 315
 
316
-INSERT INTO version (table_name, table_version) values ('sd_attrs','1');
317 316
 CREATE TABLE sd_attrs (
318 317
     id VARCHAR(64) NOT NULL,
319 318
     name VARCHAR(32) NOT NULL,
... ...
@@ -323,7 +295,6 @@ CREATE TABLE sd_attrs (
323 323
     CONSTRAINT sd_idx UNIQUE (id, name, value)
324 324
 );
325 325
 
326
-INSERT INTO version (table_name, table_version) values ('presentity','5');
327 326
 CREATE TABLE presentity (
328 327
     pres_id VARCHAR(64) NOT NULL,
329 328
     uri VARCHAR(255) NOT NULL,
... ...
@@ -333,7 +304,6 @@ CREATE TABLE presentity (
333 333
     CONSTRAINT presentity_key UNIQUE (pres_id)
334 334
 );
335 335
 
336
-INSERT INTO version (table_name, table_version) values ('presentity_notes','5');
337 336
 CREATE TABLE presentity_notes (
338 337
     dbid VARCHAR(64) NOT NULL,
339 338
     pres_id VARCHAR(64) NOT NULL,
... ...
@@ -344,7 +314,6 @@ CREATE TABLE presentity_notes (
344 344
     CONSTRAINT pnotes_idx1 UNIQUE (dbid)
345 345
 );
346 346
 
347
-INSERT INTO version (table_name, table_version) values ('presentity_extensions','5');
348 347
 CREATE TABLE presentity_extensions (
349 348
     dbid VARCHAR(64) NOT NULL,
350 349
     pres_id VARCHAR(64) NOT NULL,
... ...
@@ -354,7 +323,6 @@ CREATE TABLE presentity_extensions (
354 354
     CONSTRAINT presextensions_idx1 UNIQUE (dbid)
355 355
 );
356 356
 
357
-INSERT INTO version (table_name, table_version) values ('presentity_contact','5');
358 357
 CREATE TABLE presentity_contact (
359 358
     pres_id VARCHAR(64) NOT NULL,
360 359
     basic INTEGER NOT NULL,
... ...
@@ -367,7 +335,6 @@ CREATE TABLE presentity_contact (
367 367
     CONSTRAINT presid_index UNIQUE (pres_id, tupleid)
368 368
 );
369 369
 
370
-INSERT INTO version (table_name, table_version) values ('watcherinfo','5');
371 370
 CREATE TABLE watcherinfo (
372 371
     w_uri VARCHAR(255) NOT NULL,
373 372
     display_name VARCHAR(128) NOT NULL,
... ...
@@ -384,7 +351,6 @@ CREATE TABLE watcherinfo (
384 384
     CONSTRAINT wi_idx1 UNIQUE (s_id)
385 385
 );
386 386
 
387
-INSERT INTO version (table_name, table_version) values ('tuple_notes','5');
388 387
 CREATE TABLE tuple_notes (
389 388
     pres_id VARCHAR(64) NOT NULL,
390 389
     tupleid VARCHAR(64) NOT NULL,
... ...
@@ -392,7 +358,6 @@ CREATE TABLE tuple_notes (
392 392
     lang VARCHAR(64) NOT NULL
393 393
 );
394 394
 
395
-INSERT INTO version (table_name, table_version) values ('tuple_extensions','5');
396 395
 CREATE TABLE tuple_extensions (
397 396
     pres_id VARCHAR(64) NOT NULL,
398 397
     tupleid VARCHAR(64) NOT NULL,
... ...
@@ -400,7 +365,6 @@ CREATE TABLE tuple_extensions (
400 400
     status_extension INTEGER NOT NULL
401 401
 );
402 402
 
403
-INSERT INTO version (table_name, table_version) values ('offline_winfo','5');
404 403
 CREATE TABLE offline_winfo (
405 404
     uid VARCHAR(64) NOT NULL,
406 405
     watcher VARCHAR(255) NOT NULL,
... ...
@@ -413,7 +377,6 @@ CREATE TABLE offline_winfo (
413 413
     CONSTRAINT offline_winfo_key UNIQUE (dbid)
414 414
 );
415 415
 
416
-INSERT INTO version (table_name, table_version) values ('rls_subscription','1');
417 416
 CREATE TABLE rls_subscription (
418 417
     id VARCHAR(48) NOT NULL,
419 418
     doc_version INTEGER NOT NULL,
... ...
@@ -428,7 +391,6 @@ CREATE TABLE rls_subscription (
428 428
     CONSTRAINT rls_subscription_key UNIQUE (id)
429 429
 );
430 430
 
431
-INSERT INTO version (table_name, table_version) values ('rls_vs','1');
432 431
 CREATE TABLE rls_vs (
433 432
     id VARCHAR(48) NOT NULL,
434 433
     rls_id VARCHAR(48) NOT NULL,
... ...
@@ -436,14 +398,12 @@ CREATE TABLE rls_vs (
436 436
     CONSTRAINT rls_vs_key UNIQUE (id)
437 437
 );
438 438
 
439
-INSERT INTO version (table_name, table_version) values ('rls_vs_names','1');
440 439
 CREATE TABLE rls_vs_names (
441 440
     id VARCHAR(48) NOT NULL,
442 441
     name VARCHAR(64),
443 442
     lang VARCHAR(64)
444 443
 );
445 444
 
446
-INSERT INTO version (table_name, table_version) values ('i18n','1');
447 445
 CREATE TABLE i18n (
448 446
     code INTEGER NOT NULL,
449 447
     reason_re VARCHAR(255) DEFAULT NULL,
... ...
@@ -454,14 +414,12 @@ CREATE TABLE i18n (
454 454
 
455 455
 CREATE INDEX i18n_idx ON i18n (code);
456 456
 
457
-INSERT INTO version (table_name, table_version) values ('pdt','1');
458 457
 CREATE TABLE pdt (
459 458
     prefix VARCHAR(32) NOT NULL,
460 459
     domain VARCHAR(255) NOT NULL,
461 460
     CONSTRAINT pdt_idx UNIQUE (prefix)
462 461
 );
463 462
 
464
-INSERT INTO version (table_name, table_version) values ('cpl','2');
465 463
 CREATE TABLE cpl (
466 464
     uid VARCHAR(64) NOT NULL,
467 465
     cpl_xml BYTEA,
... ...
@@ -469,7 +427,6 @@ CREATE TABLE cpl (
469 469
     CONSTRAINT cpl_key UNIQUE (uid)
470 470
 );
471 471
 
472
-INSERT INTO version (table_name, table_version) values ('customers','1');
473 472
 CREATE TABLE customers (
474 473
     cid SERIAL NOT NULL,
475 474
     name VARCHAR(128) NOT NULL,