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