Changeset 3212


Ignore:
Timestamp:
07/30/13 15:47:28 (11 years ago)
Author:
olhsha
Message:

the test database is almost ready (except permissions and permission table)

Location:
DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/sql/DashishAnnotatorCreate.sql

    r3211 r3212  
    167167CREATE TABLE annotations_target_sources (
    168168   annotation_id integer REFERENCES annotation(annotation_id), -- defining a foreign key: there must be a uniquely defined row in "annotation", that is defined by "annotation_id"
    169    -- source_id integer REFERENCES target_source(source_id),
    170    -- unique(annotation_id, source_id),
     169   source_id integer REFERENCES target_source(source_id),
     170   unique(annotation_id, source_id),
    171171);
    172172
  • DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/test/resources/test-data/InsertTestData.sql

    r3211 r3212  
    8787-- );
    8888
    89 -- INSERT INTO annotations_target_sources (annotation_id, source_id) VALUES (2, 1);
    90 -- INSERT INTO annotations_target_sources (annotation_id, source_id) VALUES (2, 2);
    91 -- INSERT INTO annotations_target_sources (annotation_id, source_id) VALUES (3, 2);
    92 -- INSERT INTO annotations_target_sources (annotation_id, source_id) VALUES (4, 3);
     89INSERT INTO annotations_target_sources (annotation_id, source_id) VALUES (2, 1);
     90INSERT INTO annotations_target_sources (annotation_id, source_id) VALUES (2, 2);
     91INSERT INTO annotations_target_sources (annotation_id, source_id) VALUES (3, 2);
     92INSERT INTO annotations_target_sources (annotation_id, source_id) VALUES (4, 3);
    9393
     94
     95----------------------------------------------------------------
     96
     97-- CREATE TABLE sources_versions (
     98--     source_id integer REFERENCES target_source(source_id),
     99--     version_id integer REFERENCES version(version_id),
     100--     unique(source_id, version_id),
     101-- );
     102
     103INSERT INTO sources_versions (source_id, version_id) VALUES (1, 1);
     104INSERT INTO sources_versions (source_id, version_id) VALUES (1, 2);
     105INSERT INTO sources_versions (source_id, version_id) VALUES (2, 3);
     106INSERT INTO sources_versions (source_id, version_id) VALUES (3, 4);
     107
     108--------------------------------------------------------------
     109
     110-- CREATE TABLE cached_representation_info (
     111--     cached_representation_id SERIAL UNIQUE NOT NULL,
     112--     external_id UUID UNIQUE NOT NULL,
     113--     mime_type text,
     114--     tool text,
     115--     type_ text,
     116--     where_is_the_file text -- DIFFERS FROM the schema
     117-- );
     118
     119INSERT INTO cached_representation_info (external_id, mime_type, tool, type_, where_is_the_file) VALUES ('00000000-0000-0000-0000-000000000051', 'text/html', 'latex', 'text', 'corpus1'); --1
     120INSERT INTO cached_representation_info (external_id, mime_type, tool, type_, where_is_the_file) VALUES ('00000000-0000-0000-0000-000000000052', 'text/html', 'vi', 'text', 'corpus1'); -- 2
     121INSERT INTO cached_representation_info (external_id, mime_type, tool, type_, where_is_the_file) VALUES ('00000000-0000-0000-0000-000000000053', 'image/png', 'screenshooter', 'image', 'corpus1'); -- 3
     122INSERT INTO cached_representation_info (external_id, mime_type, tool, type_, where_is_the_file) VALUES ('00000000-0000-0000-0000-000000000054', 'text/html', 'oxygen', 'text', 'corpus1'); --4
     123
     124--------------------------------------------------------------
     125
     126
     127
     128-- CREATE TABLE versions_cached_representations (
     129--     version_id integer REFERENCES version(version_id),
     130--     cached_representation_id integer REFERENCES cached_representation_info(cached_representation_id),
     131--     unique(version_id, cached_representation_id),
     132-- );
     133
     134INSERT INTO versions_cached_representations (version_id, cached_representation_id) VALUES (1, 1);
     135INSERT INTO versions_cached_representations (version_id, cached_representation_id) VALUES (2, 3);
     136INSERT INTO versions_cached_representations (version_id, cached_representation_id) VALUES (3, 2);
     137INSERT INTO versions_cached_representations (version_id, cached_representation_id) VALUES (4, 4);
Note: See TracChangeset for help on using the changeset viewer.