• Views
  • Iteration Report
  • My Iteration Report
  •  
OMERO.server
  • Login
  • Help/Guide
  • About Trac
  • Preferences
  • Wiki
  • Timeline
  • Roadmap
  • Browse Source
  • View Tickets
  • Search

Context Navigation

  • Last Change
  • Annotate
  • Revision Log

root/branches/3.0-Beta2/sql/psql/OMERO3__1__schema.sql

Revision 1562, 162.3 kB (checked in by jmoore, 18 months ago)

#712 Initial update scripts from patch 1 to 4. See also #373

Line 
1
2    create table aberrationcorrection (
3        id int8 not null,
4        owner_id int8 not null,
5        group_id int8 not null,
6        creation_id int8 not null,
7        permissions int8 not null,
8        external_id int8 unique,
9        value varchar(255) not null unique,
10        primary key (id)
11    );
12
13    create table acquisitioncontext (
14        id int8 not null,
15        owner_id int8 not null,
16        group_id int8 not null,
17        creation_id int8 not null,
18        update_id int8 not null,
19        permissions int8 not null,
20        external_id int8 unique,
21        version int4 default 0,
22        photometricInterpretation int8 not null,
23        mode int8 not null,
24        primary key (id)
25    );
26
27    create table acquisitionmode (
28        id int8 not null,
29        owner_id int8 not null,
30        group_id int8 not null,
31        creation_id int8 not null,
32        permissions int8 not null,
33        external_id int8 unique,
34        value varchar(255) not null unique,
35        primary key (id)
36    );
37
38    create table arc (
39        lightsource_id int8 not null,
40        version int4 default 0,
41        type int8 not null,
42        primary key (lightsource_id)
43    );
44
45    create table arctype (
46        id int8 not null,
47        owner_id int8 not null,
48        group_id int8 not null,
49        creation_id int8 not null,
50        permissions int8 not null,
51        external_id int8 unique,
52        value varchar(255) not null unique,
53        primary key (id)
54    );
55
56    create table boundingbox (
57        id int8 not null,
58        owner_id int8 not null,
59        group_id int8 not null,
60        creation_id int8 not null,
61        update_id int8 not null,
62        permissions int8 not null,
63        external_id int8 unique,
64        version int4 default 0,
65        region int8 not null,
66        x1 int4 not null,
67        x2 int4 not null,
68        y1 int4 not null,
69        y2 int4 not null,
70        primary key (id)
71    );
72
73    create table category (
74        id int8 not null,
75        owner_id int8 not null,
76        group_id int8 not null,
77        creation_id int8 not null,
78        update_id int8 not null,
79        permissions int8 not null,
80        external_id int8 unique,
81        version int4 default 0,
82        name varchar(256) not null,
83        description text,
84        primary key (id)
85    );
86
87    create table categorygroup (
88        id int8 not null,
89        owner_id int8 not null,
90        group_id int8 not null,
91        creation_id int8 not null,
92        update_id int8 not null,
93        permissions int8 not null,
94        external_id int8 unique,
95        version int4 default 0,
96        name varchar(256) not null,
97        description text,
98        primary key (id)
99    );
100
101    create table categorygroupcategorylink (
102        id int8 not null,
103        owner_id int8 not null,
104        group_id int8 not null,
105        creation_id int8 not null,
106        update_id int8 not null,
107        permissions int8 not null,
108        external_id int8 unique,
109        version int4 default 0,
110        parent int8 not null,
111        child int8 not null,
112        primary key (id)
113    );
114
115    create table categoryimagelink (
116        id int8 not null,
117        owner_id int8 not null,
118        group_id int8 not null,
119        creation_id int8 not null,
120        update_id int8 not null,
121        permissions int8 not null,
122        external_id int8 unique,
123        version int4 default 0,
124        parent int8 not null,
125        child int8 not null,
126        primary key (id)
127    );
128
129    create table cellarea (
130        id int8 not null,
131        owner_id int8 not null,
132        group_id int8 not null,
133        creation_id int8 not null,
134        update_id int8 not null,
135        permissions int8 not null,
136        external_id int8 unique,
137        version int4 default 0,
138        area float8 not null,
139        primary key (id)
140    );
141
142    create table celleccentricity (
143        id int8 not null,
144        owner_id int8 not null,
145        group_id int8 not null,
146        creation_id int8 not null,
147        update_id int8 not null,
148        permissions int8 not null,
149        external_id int8 unique,
150        version int4 default 0,
151        eccentricity float8 not null,
152        primary key (id)
153    );
154
155    create table cellextent (
156        id int8 not null,
157        owner_id int8 not null,
158        group_id int8 not null,
159        creation_id int8 not null,
160        update_id int8 not null,
161        permissions int8 not null,
162        external_id int8 unique,
163        version int4 default 0,
164        extent float8 not null,
165        primary key (id)
166    );
167
168    create table cellmajoraxislength (
169        id int8 not null,
170        owner_id int8 not null,
171        group_id int8 not null,
172        creation_id int8 not null,
173        update_id int8 not null,
174        permissions int8 not null,
175        external_id int8 unique,
176        version int4 default 0,
177        length float8 not null,
178        primary key (id)
179    );
180
181    create table cellminoraxislength (
182        id int8 not null,
183        owner_id int8 not null,
184        group_id int8 not null,
185        creation_id int8 not null,
186        update_id int8 not null,
187        permissions int8 not null,
188        external_id int8 unique,
189        version int4 default 0,
190        length float8 not null,
191        primary key (id)
192    );
193
194    create table cellperimeter (
195        id int8 not null,
196        owner_id int8 not null,
197        group_id int8 not null,
198        creation_id int8 not null,
199        update_id int8 not null,
200        permissions int8 not null,
201        external_id int8 unique,
202        version int4 default 0,
203        perimeter float8 not null,
204        primary key (id)
205    );
206
207    create table cellposition (
208        id int8 not null,
209        owner_id int8 not null,
210        group_id int8 not null,
211        creation_id int8 not null,
212        update_id int8 not null,
213        permissions int8 not null,
214        external_id int8 unique,
215        version int4 default 0,
216        xPosition float8 not null,
217        yPosition float8 not null,
218        zPosition float8 not null,
219        primary key (id)
220    );
221
222    create table cellsolidity (
223        id int8 not null,
224        owner_id int8 not null,
225        group_id int8 not null,
226        creation_id int8 not null,
227        update_id int8 not null,
228        permissions int8 not null,
229        external_id int8 unique,
230        version int4 default 0,
231        solidity float8 not null,
232        primary key (id)
233    );
234
235    create table channel (
236        id int8 not null,
237        owner_id int8 not null,
238        group_id int8 not null,
239        creation_id int8 not null,
240        update_id int8 not null,
241        permissions int8 not null,
242        external_id int8 unique,
243        version int4 default 0,
244        statsInfo int8,
245        colorComponent int8,
246        logicalChannel int8,
247        pixels int8 not null,
248        index int4,
249        primary key (id)
250    );
251
252    create table channelbinding (
253        id int8 not null,
254        owner_id int8 not null,
255        group_id int8 not null,
256        creation_id int8 not null,
257        update_id int8 not null,
258        permissions int8 not null,
259        external_id int8 unique,
260        version int4 default 0,
261        renderingDef int8 not null,
262        family int8 not null,
263        coefficient float8 not null,
264        inputStart float4 not null,
265        inputEnd float4 not null,
266        active bool not null,
267        noiseReduction bool not null,
268        color int8 not null,
269        index int4,
270        primary key (id)
271    );
272
273    create table codomainmapcontext (
274        id int8 not null,
275        owner_id int8 not null,
276        group_id int8 not null,
277        creation_id int8 not null,
278        update_id int8 not null,
279        permissions int8 not null,
280        external_id int8 unique,
281        version int4 default 0,
282        renderingDef int8 not null,
283        index int4,
284        primary key (id)
285    );
286
287    create table color (
288        id int8 not null,
289        owner_id int8 not null,
290        group_id int8 not null,
291        creation_id int8 not null,
292        update_id int8 not null,
293        permissions int8 not null,
294        external_id int8 unique,
295        version int4 default 0,
296        red int4 not null,
297        green int4 not null,
298        blue int4 not null,
299        alpha int4 not null,
300        primary key (id)
301    );
302
303    create table contrastmethod (
304        id int8 not null,
305        owner_id int8 not null,
306        group_id int8 not null,
307        creation_id int8 not null,
308        permissions int8 not null,
309        external_id int8 unique,
310        value varchar(255) not null unique,
311        primary key (id)
312    );
313
314    create table contraststretchingcontext (
315        codomainmapcontext_id int8 not null,
316        version int4 default 0,
317        xstart int4 not null,
318        ystart int4 not null,
319        xend int4 not null,
320        yend int4 not null,
321        primary key (codomainmapcontext_id)
322    );
323
324    create table correctioncollar (
325        id int8 not null,
326        owner_id int8 not null,
327        group_id int8 not null,
328        creation_id int8 not null,
329        permissions int8 not null,
330        external_id int8 unique,
331        value varchar(255) not null unique,
332        primary key (id)
333    );
334
335    create table customizedfilterset (
336        id int8 not null,
337        owner_id int8 not null,
338        group_id int8 not null,
339        creation_id int8 not null,
340        update_id int8 not null,
341        permissions int8 not null,
342        external_id int8 unique,
343        version int4 default 0,
344        manufacturer varchar(255) not null,
345        model varchar(255) not null,
346        serialNumber varchar(255) not null,
347        excitationFilter int8 not null,
348        dichroic int8 not null,
349        emissionFilter int8 not null,
350        primary key (id)
351    );
352
353    create table dataset (
354        id int8 not null,
355        owner_id int8 not null,
356        group_id int8 not null,
357        creation_id int8 not null,
358        update_id int8 not null,
359        permissions int8 not null,
360        external_id int8 unique,
361        version int4 default 0,
362        name varchar(256) not null,
363        description text,
364        primary key (id)
365    );
366
367    create table datasetannotation (
368        id int8 not null,
369        owner_id int8 not null,
370        group_id int8 not null,
371        creation_id int8 not null,
372        update_id int8 not null,
373        permissions int8 not null,
374        external_id int8 unique,
375        version int4 default 0,
376        dataset int8 not null,
377        content text not null,
378        primary key (id)
379    );
380
381    create table datasetimagelink (
382        id int8 not null,
383        owner_id int8 not null,
384        group_id int8 not null,
385        creation_id int8 not null,
386        update_id int8 not null,
387        permissions int8 not null,
388        external_id int8 unique,
389        version int4 default 0,
390        parent int8 not null,
391        child int8 not null,
392        primary key (id)
393    );
394
395    create table detector (
396        id int8 not null,
397        owner_id int8 not null,
398        group_id int8 not null,
399        creation_id int8 not null,
400        update_id int8 not null,
401        permissions int8 not null,
402        external_id int8 unique,
403        version int4 default 0,
404        manufacturer varchar(255) not null,
405        model varchar(255) not null,
406        serialNumber varchar(255) not null,
407        type int8 not null,
408        instrument int8 not null,
409        primary key (id)
410    );
411
412    create table detectorsettings (
413        id int8 not null,
414        owner_id int8 not null,
415        group_id int8 not null,
416        creation_id int8 not null,
417        update_id int8 not null,
418        permissions int8 not null,
419        external_id int8 unique,
420        version int4 default 0,
421        voltage float4 not null,
422        gain float4 not null,
423        offsetValue float4 not null,
424        readRate float4 not null,
425        detector int8 not null,
426        primary key (id)
427    );
428
429    create table detectortype (
430        id int8 not null,
431        owner_id int8 not null,
432        group_id int8 not null,
433        creation_id int8 not null,
434        permissions int8 not null,
435        external_id int8 unique,
436        value varchar(255) not null unique,
437        primary key (id)
438    );
439
440    create table dichroic (
441        id int8 not null,
442        owner_id int8 not null,
443        group_id int8 not null,
444        creation_id int8 not null,
445        update_id int8 not null,
446        permissions int8 not null,
447        external_id int8 unique,
448        version int4 default 0,
449        primary key (id)
450    );
451
452    create table dimensionorder (
453        id int8 not null,
454        owner_id int8 not null,
455        group_id int8 not null,
456        creation_id int8 not null,
457        permissions int8 not null,
458        external_id int8 unique,
459        value varchar(255) not null unique,
460        primary key (id)
461    );
462
463    create table dummystatistics (
464        metadata_id int8 not null,
465        version int4 default 0,
466        example float4 not null,
467        primary key (metadata_id)
468    );
469
470    create table dyelaser (
471        laser_id int8 not null,
472        version int4 default 0,
473        medium int8 not null,
474        primary key (laser_id)
475    );
476
477    create table dyelasermedia (
478        id int8 not null,
479        owner_id int8 not null,
480        group_id int8 not null,
481        creation_id int8 not null,
482        permissions int8 not null,
483        external_id int8 unique,
484        value varchar(255) not null unique,
485        primary key (id)
486    );
487
488    create table emissionfilter (
489        id int8 not null,
490        owner_id int8 not null,
491        group_id int8 not null,
492        creation_id int8 not null,
493        update_id int8 not null,
494        permissions int8 not null,
495        external_id int8 unique,
496        version int4 default 0,
497        type int8 not null,
498        primary key (id)
499    );
500
501    create table event (
502        id int8 not null,
503        external_id int8 unique,
504        status varchar(255),
505        time timestamp not null,
506        experimenter int8 not null,
507        experimenterGroup int8,
508        type int8,
509        containingEvent int8,
510        primary key (id)
511    );
512
513    create table eventlog (
514        id int8 not null,
515        external_id int8 unique,
516        entityId int8 not null,
517        entityType varchar(255) not null,
518        action varchar(255) not null,
519        event int8 not null,
520        primary key (id)
521    );
522
523    create table eventtype (
524        id int8 not null,
525        owner_id int8 not null,
526        group_id int8 not null,
527        creation_id int8 not null,
528        permissions int8 not null,
529        external_id int8 unique,
530        value varchar(255) not null unique,
531        primary key (id)
532    );
533
534    create table excimerlaser (
535        laser_id int8 not null,
536        version int4 default 0,
537        medium int8 not null,
538        primary key (laser_id)
539    );
540
541    create table excimerlasermedia (
542        id int8 not null,
543        owner_id int8 not null,
544        group_id int8 not null,
545        creation_id int8 not null,
546        permissions int8 not null,
547        external_id int8 unique,
548        value varchar(255) not null unique,
549        primary key (id)
550    );
551
552    create table excitationfilter (
553        id int8 not null,
554        owner_id int8 not null,
555        group_id int8 not null,
556        creation_id int8 not null,
557        update_id int8 not null,
558        permissions int8 not null,
559        external_id int8 unique,
560        version int4 default 0,
561        type int8 not null,
562        primary key (id)
563    );
564
565    create table experiment (
566        id int8 not null,
567        owner_id int8 not null,
568        group_id int8 not null,
569        creation_id int8 not null,
570        update_id int8 not null,
571        permissions int8 not null,
572        external_id int8 unique,
573        version int4 default 0,
574        description text,
575        type int8 not null,
576        primary key (id)
577    );
578
579    create table experimenter (
580        id int8 not null,
581        external_id int8 unique,
582        version int4 default 0,
583        omeName varchar(255) not null unique,
584        firstName varchar(255) not null,
585        middleName varchar(255),
586        lastName varchar(255) not null,
587        institution varchar(255),
588        email varchar(255),
589        primary key (id)
590    );
591
592    create table experimentergroup (
593        id int8 not null,
594        owner_id int8 not null,
595        group_id int8 not null,
596        creation_id int8 not null,
597        update_id int8 not null,
598        permissions int8 not null,
599        external_id int8 unique,
600        version int4 default 0,
601        description text,
602        name varchar(255) not null unique,
603        primary key (id)
604    );
605
606    create table experimenttype (
607        id int8 not null,
608        owner_id int8 not null,
609        group_id int8 not null,
610        creation_id int8 not null,
611        permissions int8 not null,
612        external_id int8 unique,
613        value varchar(255) not null unique,
614        primary key (id)
615    );
616
617    create table externalinfo (
618        id int8 not null,
619        owner_id int8 not null,
620        group_id int8 not null,
621        creation_id int8 not null,
622        permissions int8 not null,
623        external_id int8 unique,
624        entityId int8 not null,
625        entityType varchar(255) not null,
626        lsid varchar(255) not null,
627        primary key (id)
628    );
629
630    create table family (
631        id int8 not null,
632        owner_id int8 not null,
633        group_id int8 not null,
634        creation_id int8 not null,
635        permissions int8 not null,
636        external_id int8 unique,
637        value varchar(255) not null unique,
638        primary key (id)
639    );
640
641    create table filament (
642        lightsource_id int8 not null,
643        version int4 default 0,
644        type int8 not null,
645        primary key (lightsource_id)
646    );
647
648    create table filamenttype (
649        id int8 not null,
650        owner_id int8 not null,
651        group_id int8 not null,
652        creation_id int8 not null,
653        permissions int8 not null,
654        external_id int8 unique,
655        value varchar(255) not null unique,
656        primary key (id)
657    );
658
659    create table filter (
660        id int8 not null,
661        owner_id int8 not null,
662        group_id int8 not null,
663        creation_id int8 not null,
664        update_id int8 not null,
665        permissions int8 not null,
666        external_id int8 unique,
667        version int4 default 0,
668        customized bool not null,
669        filterSet int8,
670        customizedFilterSet int8,
671        instrument int8 not null,
672        primary key (id)
673    );
674
675    create table filterset (
676        id int8 not null,
677        owner_id int8 not null,
678        group_id int8 not null,
679        creation_id int8 not null,
680        update_id int8 not null,
681        permissions int8 not null,
682        external_id int8 unique,
683        version int4 default 0,
684        manufacturer varchar(255) not null,
685        model varchar(255) not null,
686        serialNumber varchar(255) not null,
687        primary key (id)
688    );
689
690    create table filtertype (
691        id int8 not null,
692        owner_id int8 not null,
693        group_id int8 not null,
694        creation_id int8 not null,
695        permissions int8 not null,
696        external_id int8 unique,
697        value varchar(255) not null unique,
698        primary key (id)
699    );
700
701    create table format (
702        id int8 not null,
703        owner_id int8 not null,
704        group_id int8 not null,
705        creation_id int8 not null,
706        permissions int8 not null,
707        external_id int8 unique,
708        value varchar(255) not null unique,
709        primary key (id)
710    );