Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions DSL/Liquibase/changelog.yaml

This file was deleted.

6 changes: 3 additions & 3 deletions DSL/Liquibase/liquibase.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
changelogFile: /changelog/changelog.yaml
url: jdbc:postgresql://171.22.247.13:5433/byk
changelogFile: /changelog/master.yaml
url: jdbc:postgresql://users_db:5432/byk
username: byk
password: 2nH09n6Gly
password: 01234
secureParsing: false
liquibase.hub.mode=off
4 changes: 4 additions & 0 deletions DSL/Liquibase/master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
databaseChangeLog:
- includeAll:
path: changelog/
errorIfMissingOrEmpty: true
9 changes: 7 additions & 2 deletions create-migration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,10 @@ if [[ $# -eq 0 ]] ; then
exit 0
fi

echo "-- liquibase formatted sql" > "DSL/Liquibase/changelog/`date '+%s'`-$1.sql"
echo "-- changeset $(git config user.name):`date '+%s'`" >> "DSL/Liquibase/changelog/`date '+%s'`-$1.sql"
timestamp=$(date '+%Y%m%d%H%M%S')
migration_file="DSL/Liquibase/changelog/${timestamp}-$1.sql"

echo "-- liquibase formatted sql" > "$migration_file"
echo "-- changeset $(git config user.name):$timestamp" >> "$migration_file"

echo "Migration file created: $migration_file"
2 changes: 1 addition & 1 deletion migrate.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/bash
docker run --rm --network bykstack -v `pwd`/DSL/Liquibase:/liquibase/changelog liquibase/liquibase --defaultsFile=/liquibase/changelog/liquibase.properties update
docker run --rm --network bykstack -v `pwd`/DSL/Liquibase/changelog:/liquibase/changelog -v `pwd`/DSL/Liquibase/master.yml:/liquibase/master.yml -v `pwd`/DSL/Liquibase/data:/liquibase/data liquibase/liquibase:4.28 --defaultsFile=/liquibase/changelog/liquibase.properties --changelog-file=master.yml --url=jdbc:postgresql://users_db:5432/byk?user=byk --password=01234 update

Check warning on line 2 in migrate.sh

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Replace backticks with '$()' syntax for command substitution.

See more on https://sonarcloud.io/project/issues?id=buerokratt_Analytics-Module&issues=AZ-yV0cpCNZp1cq5wCgi&open=AZ-yV0cpCNZp1cq5wCgi&pullRequest=798

Check warning on line 2 in migrate.sh

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Replace backticks with '$()' syntax for command substitution.

See more on https://sonarcloud.io/project/issues?id=buerokratt_Analytics-Module&issues=AZ-yV0cpCNZp1cq5wCgj&open=AZ-yV0cpCNZp1cq5wCgj&pullRequest=798