This file is indexed.

/usr/share/biomaj/sql/hsql.sql is in biomaj 1.2.3-6build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
-- -----------------------------------------------------
-- Table remoteInfo
-- -----------------------------------------------------
* present ~
SELECT count(*) FROM information_schema.system_tables
WHERE table_schem='PUBLIC' AND table_name='REMOTEINFO';
* if (*present == 0)
	CREATE TABLE remoteInfo (
	  idremoteInfo INT GENERATED BY DEFAULT AS IDENTITY,
	  protocol VARCHAR(45) NULL ,
	  port INT NULL ,
	  dbName VARCHAR(45) NULL ,
	  dbFullname VARCHAR(512) NULL ,
	  dbType VARCHAR(128) NULL ,
	  server VARCHAR(256) NULL ,
	  remoteDir VARCHAR(256) NULL ,
	  PRIMARY KEY (idremoteInfo) );
* end if


-- -----------------------------------------------------
-- Table localInfo
-- -----------------------------------------------------
* present ~
SELECT count(*) FROM information_schema.system_tables
WHERE table_schem='PUBLIC' AND table_name='LOCALINFO';
* if (*present == 0)
	CREATE TABLE localInfo (
	  idlocalInfo INT GENERATED BY DEFAULT AS IDENTITY,
	  offlineDirectory VARCHAR(256) NULL ,
	  versionDirectory VARCHAR(256) NULL ,
	  frequency INT NULL ,
	  dolinkcopy BOOLEAN NULL ,
	  logfile BOOLEAN NULL ,
	  releaseFile VARCHAR(45) NULL ,
	  releaseRegexp VARCHAR(128) NULL ,
	  remoteFiles VARCHAR(128) NULL ,
	  remoteExcludedFiles VARCHAR(128) NULL ,
	  localFiles VARCHAR(128) NULL ,
	  nversions INT NULL ,
	  PRIMARY KEY (idlocalInfo) );
* end if




-- -----------------------------------------------------
-- Table bank
-- -----------------------------------------------------
* present ~
SELECT count(*) FROM information_schema.system_tables
WHERE table_schem='PUBLIC' AND table_name='BANK';
* if (*present == 0)
	CREATE TABLE bank (
	  idbank INT GENERATED BY DEFAULT AS IDENTITY,
	  name VARCHAR(45) NULL,
	  CONSTRAINT uniqueBankName UNIQUE (name),
	  PRIMARY KEY (idbank));
* end if


  
-- -----------------------------------------------------
-- Table configuration
-- -----------------------------------------------------
* present ~
SELECT count(*) FROM information_schema.system_tables
WHERE table_schem='PUBLIC' AND table_name='CONFIGURATION';
* if (*present == 0)
	CREATE TABLE configuration (
	  idconfiguration BIGINT,
	  ref_idremoteInfo INT NOT NULL ,
	  ref_idlocalInfo INT NOT NULL ,
	  ref_idbank INT NOT NULL ,
	  date DATETIME NULL ,
	  file VARCHAR(256) NULL ,
	  PRIMARY KEY (idconfiguration) ,
	  CONSTRAINT fk_configuration_remoteInfo1
	    FOREIGN KEY (ref_idremoteInfo )
	    REFERENCES remoteInfo (idremoteInfo )
	    ON DELETE CASCADE
	    ON UPDATE NO ACTION,
	  CONSTRAINT fk_configuration_localInfo1
	    FOREIGN KEY (ref_idlocalInfo )
	    REFERENCES localInfo (idlocalInfo )
	    ON DELETE CASCADE
	    ON UPDATE NO ACTION,
	  CONSTRAINT fk_configuration_bank1
	    FOREIGN KEY (ref_idbank )
	    REFERENCES bank (idbank )
	    ON DELETE CASCADE
	    ON UPDATE NO ACTION);
* end if



-- -----------------------------------------------------
-- Table updateBank
-- -----------------------------------------------------
* present ~
SELECT count(*) FROM information_schema.system_tables
WHERE table_schem='PUBLIC' AND table_name='UPDATEBANK';
* if (*present == 0)
	CREATE TABLE updateBank (
	  idupdateBank INT GENERATED BY DEFAULT AS IDENTITY,
	  ref_idconfiguration BIGINT NOT NULL ,
	  updateRelease VARCHAR(45) NULL ,
	  productionDirectoryPath VARCHAR(256) NULL ,
	  productionDirectoryDeployed BOOLEAN NULL ,
	  sizeDownload VARCHAR(45) NULL ,
	  sizeRelease VARCHAR(45) NULL ,
	  startTime DATETIME NULL ,
	  endTime DATETIME NULL ,
	  elapsedTime VARCHAR(45) NULL ,
	  isUpdated BOOLEAN NULL ,
	  nbSessions INT NULL ,
	  idLastSession BIGINT NULL ,
	  PRIMARY KEY (idupdateBank) ,
	  CONSTRAINT fk_updateBank_configuration1
	    FOREIGN KEY (ref_idconfiguration )
	    REFERENCES configuration (idconfiguration )
	    ON DELETE CASCADE
	    ON UPDATE NO ACTION);
* end if



-- -----------------------------------------------------
-- Table sessionTask
-- -----------------------------------------------------
* present ~
SELECT count(*) FROM information_schema.system_tables
WHERE table_schem='PUBLIC' AND table_name='SESSIONTASK';
* if (*present == 0)
	CREATE TABLE sessionTask (
	  idsessionTask INT GENERATED BY DEFAULT AS IDENTITY,
	  startTime DATETIME NULL ,
	  endTime DATETIME NULL ,
	  elapsedTime VARCHAR(45) NULL ,
	  status VARCHAR(45) NULL ,
	  value VARCHAR(128) NULL ,
	  nbExtract INT NULL ,
	  nbLocalOnlineFiles INT NULL ,
	  nbLocalOfflineFiles INT NULL ,
	  nbDownloadFiles INT NULL ,
	  bandwidth FLOAT NULL ,
	  nbFilesMoved INT NULL ,
	  nbFilesCopied INT NULL ,
	  taskType VARCHAR(45) NULL ,
	  nbreMetaProcess INT NULL ,
	  PRIMARY KEY (idsessionTask) );
* end if




-- -----------------------------------------------------
-- Table session
-- -----------------------------------------------------
* present ~
SELECT count(*) FROM information_schema.system_tables
WHERE table_schem='PUBLIC' AND table_name='SESSION';
* if (*present == 0)
	CREATE TABLE session (
	  idsession BIGINT NOT NULL ,
	  ref_idupdateBank INT NOT NULL ,
	  href VARCHAR(256) NULL ,
	  parse VARCHAR(45) NULL ,
	  status BOOLEAN NULL ,
	  startTime DATETIME NULL ,
	  endTime DATETIME NULL ,
	  elapsedTime VARCHAR(45) NULL ,
	  logfile VARCHAR(128) NULL ,
	  PRIMARY KEY (idsession) ,
	  CONSTRAINT fk_session_updateBank1
	    FOREIGN KEY (ref_idupdateBank )
	    REFERENCES updateBank (idupdateBank )
	    ON DELETE CASCADE
	    ON UPDATE NO ACTION);
* end if

	

-- -----------------------------------------------------
-- Table metaprocess
-- -----------------------------------------------------
* present ~
SELECT count(*) FROM information_schema.system_tables
WHERE table_schem='PUBLIC' AND table_name='METAPROCESS';
* if (*present == 0)
	CREATE TABLE metaprocess (
	  idmetaprocess VARCHAR(45) NOT NULL,
	  name VARCHAR(45) NULL ,
	  startTime DATETIME NULL ,
	  endTime DATETIME NULL ,
	  elapsedTime VARCHAR(45) NULL ,
	  status VARCHAR(45) NULL ,
	  logfile VARCHAR(256) NULL ,
	  block VARCHAR(45) NULL ,
	  ref_idsessionTask INT NOT NULL ,
	  PRIMARY KEY (idmetaprocess) ,
	  CONSTRAINT fk_metaprocess_sessionTask1
	    FOREIGN KEY (ref_idsessionTask )
	    REFERENCES sessionTask (idsessionTask )
	    ON DELETE CASCADE
	    ON UPDATE NO ACTION);
* end if




-- -----------------------------------------------------
-- Table process
-- -----------------------------------------------------
* present ~
SELECT count(*) FROM information_schema.system_tables
WHERE table_schem='PUBLIC' AND table_name='PROCESS';
* if (*present == 0)
	CREATE TABLE process (
	  idprocess INT GENERATED BY DEFAULT AS IDENTITY,
	  name VARCHAR(45) NULL ,
	  keyname VARCHAR(45) NULL ,
	  exe VARCHAR(128) NULL ,
	  args VARCHAR(128) NULL ,
	  description VARCHAR(512) NULL ,
	  type VARCHAR(45) NULL ,
	  startTime DATETIME NULL ,
	  endTime DATETIME NULL ,
	  elapsedTime VARCHAR(45) NULL ,
	  biomaj_error BOOLEAN NULL ,
	  timestamp BIGINT NULL ,
	  value VARCHAR(45) NULL ,
	  ref_idmetaprocess VARCHAR(45) NOT NULL ,
	  PRIMARY KEY (idprocess) ,
	  CONSTRAINT fk_process_metaprocess1
	    FOREIGN KEY (ref_idmetaprocess )
	    REFERENCES metaprocess (idmetaprocess )
	    ON DELETE CASCADE
	    ON UPDATE NO ACTION);
* end if




-- -----------------------------------------------------
-- Table file
-- -----------------------------------------------------
* present ~
SELECT count(*) FROM information_schema.system_tables
WHERE table_schem='PUBLIC' AND table_name='FILE';
* if (*present == 0)
	CREATE TABLE file (
	  idfile INT GENERATED BY DEFAULT AS IDENTITY ,
	  location VARCHAR(512) NULL ,
	  size BIGINT NULL ,
	  time BIGINT NULL ,
	  link BOOLEAN NULL ,
	  is_extract BOOLEAN NULL ,
	  volatile BOOLEAN NULL ,
	  refHash VARCHAR(45) NULL ,
	  fileType VARCHAR(45) NULL ,
	  ref_idprocess INT NULL ,
	  PRIMARY KEY (idfile) ,
	  CONSTRAINT fk_file_process1
	    FOREIGN KEY (ref_idprocess )
	    REFERENCES process (idprocess )
	    ON DELETE CASCADE
	    ON UPDATE NO ACTION);
* end if



-- -----------------------------------------------------
-- Table productionDirectory
-- -----------------------------------------------------
* present ~
SELECT count(*) FROM information_schema.system_tables
WHERE table_schem='PUBLIC' AND table_name='PRODUCTIONDIRECTORY';
* if (*present == 0)
	CREATE TABLE productionDirectory (
	  idproductionDirectory INT GENERATED BY DEFAULT AS IDENTITY,
	  remove DATETIME NULL ,
	  creation DATETIME NULL ,
	  size VARCHAR(45) NULL ,
	  state VARCHAR(45) NULL ,
	  session BIGINT NULL ,
	  path VARCHAR(256) NULL ,
	  ref_idbank INT NOT NULL ,
	  PRIMARY KEY (idproductionDirectory) ,
	  CONSTRAINT fk_productionDirectory_bank1
	    FOREIGN KEY (ref_idbank )
	    REFERENCES bank (idbank )
	    ON DELETE CASCADE
	    ON UPDATE NO ACTION);
* end if



-- -----------------------------------------------------
-- Table message
-- -----------------------------------------------------
* present ~
SELECT count(*) FROM information_schema.system_tables
WHERE table_schem='PUBLIC' AND table_name='MESSAGE';
* if (*present == 0)
	CREATE TABLE message (
	  idmessage INT GENERATED BY DEFAULT AS IDENTITY,
	  message VARCHAR(512) NULL ,
	  type VARCHAR(45) NULL ,
	  PRIMARY KEY (idmessage) );
* end if



-- -----------------------------------------------------
-- Table session_has_message
-- -----------------------------------------------------
* present ~
SELECT count(*) FROM information_schema.system_tables
WHERE table_schem='PUBLIC' AND table_name='SESSION_HAS_MESSAGE';
* if (*present == 0)
	CREATE TABLE session_has_message (
	  idsession_has_message INT GENERATED BY DEFAULT AS IDENTITY,
	  ref_idsession BIGINT NOT NULL ,
	  ref_idmessage INT NOT NULL ,
	  PRIMARY KEY (idsession_has_message) ,
	  CONSTRAINT fk_session_has_message_session1
	    FOREIGN KEY (ref_idsession )
	    REFERENCES session (idsession )
	    ON DELETE CASCADE
	    ON UPDATE NO ACTION,
	  CONSTRAINT fk_session_has_message_message1
	    FOREIGN KEY (ref_idmessage )
	    REFERENCES message (idmessage )
	    ON DELETE CASCADE
	    ON UPDATE NO ACTION);
* end if




-- -----------------------------------------------------
-- Table sessionTask_has_message
-- -----------------------------------------------------
* present ~
SELECT count(*) FROM information_schema.system_tables
WHERE table_schem='PUBLIC' AND table_name='SESSIONTASK_HAS_MESSAGE';
* if (*present == 0)
	CREATE TABLE sessionTask_has_message (
	  idsessionTask_has_message INT GENERATED BY DEFAULT AS IDENTITY,
	  ref_idsessionTask INT NOT NULL ,
	  ref_idmessage INT NOT NULL ,
	  PRIMARY KEY (idsessionTask_has_message) ,
	  CONSTRAINT fk_sessionTask_has_message_sessionTask1
	    FOREIGN KEY (ref_idsessionTask )
	    REFERENCES sessionTask (idsessionTask )
	    ON DELETE CASCADE
	    ON UPDATE NO ACTION,
	  CONSTRAINT fk_sessionTask_has_message_message1
	    FOREIGN KEY (ref_idmessage )
	    REFERENCES message (idmessage )
	    ON DELETE CASCADE
	    ON UPDATE NO ACTION);
* end if




-- -----------------------------------------------------
-- Table metaprocess_has_message
-- -----------------------------------------------------
* present ~
SELECT count(*) FROM information_schema.system_tables
WHERE table_schem='PUBLIC' AND table_name='METAPROCESS_HAS_MESSAGE';
* if (*present == 0)
	CREATE TABLE metaprocess_has_message (
	  idmetaprocess_has_message INT GENERATED BY DEFAULT AS IDENTITY,
	  ref_idmetaprocess VARCHAR(45) NOT NULL ,
	  ref_idmessage INT NOT NULL ,
	  PRIMARY KEY (idmetaprocess_has_message) ,
	  CONSTRAINT fk_metaprocess_has_message_metaprocess1
	    FOREIGN KEY (ref_idmetaprocess )
	    REFERENCES metaprocess (idmetaprocess )
	    ON DELETE CASCADE
	    ON UPDATE NO ACTION,
	  CONSTRAINT fk_metaprocess_has_message_message1
	    FOREIGN KEY (ref_idmessage )
	    REFERENCES message (idmessage )
	    ON DELETE CASCADE
	    ON UPDATE NO ACTION);
* end if




-- -----------------------------------------------------
-- Table process_has_message
-- -----------------------------------------------------
* present ~
SELECT count(*) FROM information_schema.system_tables
WHERE table_schem='PUBLIC' AND table_name='PROCESS_HAS_MESSAGE';
* if (*present == 0)
	CREATE TABLE process_has_message (
	  idprocess_has_message INT GENERATED BY DEFAULT AS IDENTITY,
	  ref_idprocess INT NOT NULL ,
	  ref_idmessage INT NOT NULL ,
	  PRIMARY KEY (idprocess_has_message) ,
	  CONSTRAINT fk_process_has_message_process1
	    FOREIGN KEY (ref_idprocess )
	    REFERENCES process (idprocess )
	    ON DELETE CASCADE
	    ON UPDATE NO ACTION,
	  CONSTRAINT fk_process_has_message_message1
	    FOREIGN KEY (ref_idmessage )
	    REFERENCES message (idmessage )
	    ON DELETE CASCADE
	    ON UPDATE NO ACTION);
* end if




-- -----------------------------------------------------
-- Table session_has_sessionTask
-- -----------------------------------------------------
* present ~
SELECT count(*) FROM information_schema.system_tables
WHERE table_schem='PUBLIC' AND table_name='SESSION_HAS_SESSIONTASK';
* if (*present == 0)
	CREATE TABLE session_has_sessionTask (
	  idsession_has_sessionTask INT GENERATED BY DEFAULT AS IDENTITY,
	  ref_idsession BIGINT NOT NULL ,
	  ref_idsessionTask INT NOT NULL ,
	  PRIMARY KEY (idsession_has_sessionTask) ,
	  CONSTRAINT fk_session_has_sessionTask_session1
	    FOREIGN KEY (ref_idsession )
	    REFERENCES session (idsession )
	    ON DELETE CASCADE
	    ON UPDATE NO ACTION,
	  CONSTRAINT fk_session_has_sessionTask_sessionTask1
	    FOREIGN KEY (ref_idsessionTask )
	    REFERENCES sessionTask (idsessionTask )
	    ON DELETE CASCADE
	    ON UPDATE NO ACTION);
* end if


-- -----------------------------------------------------
-- Table sessionTask_has_file
-- -----------------------------------------------------
* present ~
SELECT count(*) FROM information_schema.system_tables
WHERE table_schem='PUBLIC' AND table_name='SESSIONTASK_HAS_FILE';
* if (*present == 0)
	CREATE TABLE sessionTask_has_file (
	  idsessionTask_has_file INT GENERATED BY DEFAULT AS IDENTITY,
	  ref_idsessionTask INT NOT NULL ,
	  ref_idfile INT NOT NULL ,
	  PRIMARY KEY (idsessionTask_has_file) ,
	  CONSTRAINT fk_sessionTask_has_file_sessionTask1
	    FOREIGN KEY (ref_idsessionTask )
	    REFERENCES sessionTask (idsessionTask )
	    ON DELETE CASCADE
	    ON UPDATE NO ACTION,
	  CONSTRAINT fk_sessionTask_has_file_file1
	    FOREIGN KEY (ref_idfile )
	    REFERENCES file (idfile )
	    ON DELETE CASCADE
	    ON UPDATE NO ACTION);
* end if