Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Genesys Backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
45
Issues
45
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Genesys PGR
Genesys Backend
Commits
14706a15
Commit
14706a15
authored
Sep 14, 2018
by
Matija Obreza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated liquibase-changeLog from mvn liquibase:diff
- Crop code: Use common column length Crop.CROP_SHORTNAME_LENGTH
parent
daeae654
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
46 additions
and
27 deletions
+46
-27
pom.xml
pom.xml
+1
-1
src/main/java/org/genesys/catalog/model/dataset/Dataset.java
src/main/java/org/genesys/catalog/model/dataset/Dataset.java
+2
-1
src/main/java/org/genesys/catalog/model/traits/Descriptor.java
...ain/java/org/genesys/catalog/model/traits/Descriptor.java
+2
-1
src/main/java/org/genesys/catalog/model/traits/DescriptorList.java
...java/org/genesys/catalog/model/traits/DescriptorList.java
+2
-1
src/main/java/org/genesys2/server/model/impl/Crop.java
src/main/java/org/genesys2/server/model/impl/Crop.java
+3
-1
src/main/java/org/genesys2/server/model/impl/Subset.java
src/main/java/org/genesys2/server/model/impl/Subset.java
+1
-1
src/main/resources/liquibase/liquibase-changeLog.yml
src/main/resources/liquibase/liquibase-changeLog.yml
+35
-21
No files found.
pom.xml
View file @
14706a15
...
...
@@ -856,7 +856,7 @@
<plugin>
<groupId>
org.liquibase
</groupId>
<artifactId>
liquibase-maven-plugin
</artifactId>
<version>
${liquibase.version}
</version>
<version>
${liquibase.version}
.2
</version>
<configuration>
<propertyFile>
src/main/resources/liquibase.properties
</propertyFile>
<verbose>
true
</verbose>
...
...
src/main/java/org/genesys/catalog/model/dataset/Dataset.java
View file @
14706a15
...
...
@@ -29,6 +29,7 @@ import org.genesys.catalog.model.traits.Descriptor;
import
org.genesys.catalog.service.PublishValidationInterface
;
import
org.genesys.filerepository.model.RepositoryFile
;
import
org.genesys2.server.model.PublishState
;
import
org.genesys2.server.model.impl.Crop
;
import
org.genesys2.util.MCPDUtil
;
import
org.springframework.data.elasticsearch.annotations.Document
;
import
org.springframework.data.elasticsearch.annotations.Field
;
...
...
@@ -132,7 +133,7 @@ public class Dataset extends UuidModel implements Publishable, SelfCleaning, Pub
@CollectionTable
(
name
=
"dataset_crops"
,
joinColumns
=
@JoinColumn
(
name
=
"datasetId"
),
// index
indexes
=
{
@Index
(
columnList
=
"datasetId, crop"
)
})
@Column
(
name
=
"crop"
,
nullable
=
false
,
length
=
20
)
@Column
(
name
=
"crop"
,
nullable
=
false
,
length
=
Crop
.
CROP_SHORTNAME_LENGTH
)
@JsonView
({
JsonViews
.
Minimal
.
class
})
private
Set
<
String
>
crops
;
...
...
src/main/java/org/genesys/catalog/model/traits/Descriptor.java
View file @
14706a15
...
...
@@ -24,6 +24,7 @@ import org.genesys.catalog.model.dataset.Dataset;
import
org.genesys.catalog.model.vocab.ControlledVocabulary
;
import
org.genesys.catalog.model.vocab.VocabularyTerm
;
import
org.genesys2.server.model.PublishState
;
import
org.genesys2.server.model.impl.Crop
;
import
org.springframework.dao.DataIntegrityViolationException
;
import
org.springframework.data.elasticsearch.annotations.Document
;
import
org.springframework.data.elasticsearch.annotations.Field
;
...
...
@@ -200,7 +201,7 @@ public class Descriptor extends UuidModel implements SelfCleaning, Publishable,
private
List
<
Dataset
>
datasets
;
/** The crop. */
@Column
(
name
=
"crop"
,
length
=
100
,
nullable
=
true
)
@Column
(
name
=
"crop"
,
length
=
Crop
.
CROP_SHORTNAME_LENGTH
,
nullable
=
true
)
private
String
crop
;
/** Descriptor classification. */
...
...
src/main/java/org/genesys/catalog/model/traits/DescriptorList.java
View file @
14706a15
...
...
@@ -27,6 +27,7 @@ import org.genesys.blocks.model.UuidModel;
import
org.genesys.blocks.security.model.AclAwareModel
;
import
org.genesys.catalog.model.Partner
;
import
org.genesys2.server.model.PublishState
;
import
org.genesys2.server.model.impl.Crop
;
import
org.springframework.data.elasticsearch.annotations.Document
;
import
org.springframework.data.elasticsearch.annotations.Field
;
import
org.springframework.data.elasticsearch.annotations.FieldType
;
...
...
@@ -108,7 +109,7 @@ public class DescriptorList extends UuidModel implements Publishable, SelfCleani
private
String
publisher
;
/** The crop. */
@Column
(
name
=
"crop"
,
length
=
100
,
nullable
=
true
)
@Column
(
name
=
"crop"
,
length
=
Crop
.
CROP_SHORTNAME_LENGTH
,
nullable
=
true
)
private
String
crop
;
/** Extra information associated with the descriptor list */
...
...
src/main/java/org/genesys2/server/model/impl/Crop.java
View file @
14706a15
...
...
@@ -61,11 +61,13 @@ public class Crop extends GlobalVersionedAuditedModel implements AclAwareModel {
public
static
final
Logger
LOG
=
LoggerFactory
.
getLogger
(
Crop
.
class
);
public
static
final
int
CROP_SHORTNAME_LENGTH
=
50
;
/**
* Crop short name used as short name in URLs
*/
@Column
(
nullable
=
false
,
length
=
50
,
unique
=
true
)
@Column
(
nullable
=
false
,
length
=
CROP_SHORTNAME_LENGTH
,
unique
=
true
)
private
String
shortName
;
@Column
(
name
=
"otherName"
,
nullable
=
false
,
unique
=
true
,
length
=
255
)
...
...
src/main/java/org/genesys2/server/model/impl/Subset.java
View file @
14706a15
...
...
@@ -120,7 +120,7 @@ public class Subset extends UuidModel implements AclAwareModel, SelfCleaning {
@ElementCollection
(
fetch
=
FetchType
.
EAGER
)
@CollectionTable
(
name
=
"subset_crops"
,
joinColumns
=
@JoinColumn
(
name
=
"subsetId"
),
indexes
=
{
@Index
(
columnList
=
"subsetId, crop"
)
})
@Column
(
name
=
"crop"
,
nullable
=
false
,
length
=
20
)
@Column
(
name
=
"crop"
,
nullable
=
false
,
length
=
Crop
.
CROP_SHORTNAME_LENGTH
)
@JsonView
({
JsonViews
.
Minimal
.
class
})
private
Set
<
String
>
crops
;
...
...
src/main/resources/liquibase/liquibase-changeLog.yml
View file @
14706a15
...
...
@@ -3876,48 +3876,62 @@ databaseChangeLog:
referencedColumnNames
:
id
referencedTableName
:
subset
-
changeSet
:
id
:
1536945927974-1
author
:
mobreza (generated)
comment
:
Fix crop shortName (code) to
50
changes
:
-
modifyDataType
:
columnName
:
crop
newDataType
:
varchar(50)
tableName
:
dataset_crops
-
modifyDataType
:
columnName
:
crop
newDataType
:
varchar(50)
tableName
:
descriptor
-
modifyDataType
:
columnName
:
crop
newDataType
:
varchar(50)
tableName
:
descriptorlist
-
changeSet
:
id
:
15369
39885074-68
id
:
15369
45927974-4
author
:
vpavlov
comment
:
Add crops to Subset
changes
:
-
addColumn
:
columns
:
-
column
:
name
:
date
type
:
VARCHAR(8)
tableName
:
subset
-
addColumn
:
columns
:
-
column
:
name
:
source
type
:
VARCHAR(200)
tableName
:
subset
-
createTable
:
columns
:
-
column
:
constraints
:
nullable
:
fals
e
primaryKey
:
tru
e
name
:
subsetId
type
:
BIGINT
-
column
:
constraints
:
nullable
:
fals
e
primaryKey
:
tru
e
name
:
crop
type
:
VARCHAR(20)
tableName
:
subset_crops
-
addPrimaryKey
:
comment
:
subset_crops PK
columnNames
:
subsetId, crop
constraintName
:
PRIMARY
type
:
VARCHAR(50)
tableName
:
subset_crops
-
addForeignKeyConstraint
:
comment
:
subset_crops FK
baseColumnNames
:
subsetId
baseTableName
:
subset_crops
constraintName
:
FK_
04466eb03847ac24cefb2f7ff
constraintName
:
FK_
hny3je51ro3jv72dubq9lt4o2
deferrable
:
false
initiallyDeferred
:
false
onDelete
:
NO ACTION
onUpdate
:
NO ACTION
referencedColumnNames
:
id
referencedTableName
:
subset
-
addColumn
:
comment
:
Add date and source to subset
columns
:
-
column
:
name
:
date
type
:
varchar(8)
-
column
:
name
:
source
type
:
varchar(200)
tableName
:
subset
validate
:
true
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment