Changeset 3212
- Timestamp:
- 07/30/13 15:47:28 (11 years ago)
- 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 167 167 CREATE TABLE annotations_target_sources ( 168 168 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), 171 171 ); 172 172 -
DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/test/resources/test-data/InsertTestData.sql
r3211 r3212 87 87 -- ); 88 88 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);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); 93 93 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 103 INSERT INTO sources_versions (source_id, version_id) VALUES (1, 1); 104 INSERT INTO sources_versions (source_id, version_id) VALUES (1, 2); 105 INSERT INTO sources_versions (source_id, version_id) VALUES (2, 3); 106 INSERT 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 119 INSERT 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 120 INSERT 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 121 INSERT 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 122 INSERT 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 134 INSERT INTO versions_cached_representations (version_id, cached_representation_id) VALUES (1, 1); 135 INSERT INTO versions_cached_representations (version_id, cached_representation_id) VALUES (2, 3); 136 INSERT INTO versions_cached_representations (version_id, cached_representation_id) VALUES (3, 2); 137 INSERT INTO versions_cached_representations (version_id, cached_representation_id) VALUES (4, 4);
Note: See TracChangeset
for help on using the changeset viewer.