Skip to content

Commit 6213024

Browse files
Merge pull request #62 from PatternAtlas/feature/pattern_tags
Add tags to patterns
2 parents cb6295e + 076563b commit 6213024

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,30 @@
11
# Pattern Atlas API
2+
3+
## How to generate a new Liquibase changelog for changed database schema
4+
5+
1. have a database instance running with the new schema on port 5060
6+
2. hava a database instance running with the old schema on port 5061
7+
8+
create the file `liquibase.properties` with the following content:
9+
```
10+
url=jdbc:postgresql://localhost:5061/patternatlas
11+
username=patternatlas
12+
password=patternatlas
13+
referenceUrl=jdbc:postgresql://localhost:5060/patternatlas
14+
referenceUsername=patternatlas
15+
referencePassword=patternatlas
16+
liquibase.hub.mode=off
17+
```
18+
19+
Run: `liquibase diff-changelog --changelog-file=new_changelog.xml`
20+
21+
## Troubleshooting
22+
23+
### Liquibase ChangelogParseException the file was not found
24+
25+
Remove the `file:` prefix from the referenced files in the `patternatlas_full.xml` file.
26+
27+
### Liquibase can't find `patternatlas_schema.xml`
28+
29+
Copy all the Liquibase changelog files into a folder inside the project folder and include this folder in the classpath.
30+
This can be done for example in the run configuration in IntelliJ.

src/main/java/io/github/patternatlas/api/entities/Pattern.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,6 @@ public class Pattern extends EntityWithURI {
5252

5353
@Column(columnDefinition = "boolean default false")
5454
private Boolean deploymentModelingBehaviorPattern;
55+
56+
private String tags;
5557
}

src/main/java/io/github/patternatlas/api/rest/model/PatternModel.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ public class PatternModel {
2929
private Boolean deploymentModelingBehaviorPattern;
3030
private Boolean deploymentModelingStructurePattern;
3131

32+
protected String tags;
33+
3234
@JsonIgnore
3335
protected Pattern pattern;
3436

@@ -43,6 +45,7 @@ private PatternModel(Pattern pattern) {
4345
this.patternLanguageName = patternLanguage.getName();
4446
this.deploymentModelingBehaviorPattern = pattern.getDeploymentModelingBehaviorPattern();
4547
this.deploymentModelingStructurePattern = pattern.getDeploymentModelingStructurePattern();
48+
this.tags = pattern.getTags();
4649
}
4750

4851
public static PatternModel from(Pattern pattern) {

0 commit comments

Comments
 (0)