Browse code

- regenerated with insert into version statements

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