File tree 4 files changed +14
-10
lines changed
script/migrations/occurrence
java/net/canadensys/dataportal/occurrence/model
resources/script/occurrence
test/java/net/canadensys/dataportal/occurrence/dao
4 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -4,4 +4,6 @@ ALTER TABLE occurrence_extension ADD COLUMN sourcefileid character varying(50);
4
4
ALTER TABLE occurrence_extension ADD COLUMN resource_uuid character varying (50 );
5
5
6
6
-- This table should be empty but if not please, transfer the content of 'id' into 'auto_id' and then delete the 'id' column
7
- ALTER TABLE occurrence_extension DROP COLUMN IF EXISTS id;
7
+ ALTER TABLE occurrence_extension DROP COLUMN IF EXISTS id;
8
+
9
+ ALTER TABLE resource_management RENAME key TO resource_uuid;
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ public class ResourceModel {
20
20
@ GeneratedValue (strategy = GenerationType .SEQUENCE , generator = "resource_management_id_seq" )
21
21
private Integer id ;
22
22
private String name ;
23
- private String key ;
23
+ private String resource_uuid ;
24
24
private String archive_url ;
25
25
private String sourcefileid ;
26
26
@@ -31,18 +31,20 @@ public void setId(Integer id) {
31
31
this .id = id ;
32
32
}
33
33
34
+ public String getResource_uuid () {
35
+ return resource_uuid ;
36
+ }
37
+ public void setResource_uuid (String resource_uuid ) {
38
+ this .resource_uuid = resource_uuid ;
39
+ }
40
+
34
41
public String getName () {
35
42
return name ;
36
43
}
37
44
public void setName (String name ) {
38
45
this .name = name ;
39
46
}
40
- public String getKey () {
41
- return key ;
42
- }
43
- public void setKey (String key ) {
44
- this .key = key ;
45
- }
47
+
46
48
public String getArchive_url () {
47
49
return archive_url ;
48
50
}
Original file line number Diff line number Diff line change @@ -283,7 +283,7 @@ CREATE TABLE IF NOT EXISTS resource_management
283
283
id integer DEFAULT nextval(' resource_management_id_seq' ) NOT NULL ,
284
284
sourcefileid character varying (50 ),
285
285
name character varying (255 ),
286
- key character varying (36 ),
286
+ resource_uuid character varying (36 ),
287
287
archive_url character varying (255 ),
288
288
CONSTRAINT resource_management_pkey PRIMARY KEY ( id ),
289
289
CONSTRAINT resource_management_source_file_id_key UNIQUE (sourcefileid)
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ public void testSaveAndLoad(){
31
31
ResourceModel testModel = new ResourceModel ();
32
32
33
33
testModel .setSourcefileid ("test_sourcefileid" );
34
- testModel .setKey ("12345" );
34
+ testModel .setResource_uuid ("12345" );
35
35
assertTrue (resourceDAO .save (testModel ));
36
36
37
37
int id = testModel .getId ();
You can’t perform that action at this time.
0 commit comments