Skip to content

Commit

Permalink
rename data_model to datamodel
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Jan 30, 2024
1 parent 3cf5ccb commit 28cc520
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ services:
image: schemaspy/schemaspy
volumes:
- ../model-documentation:/output
- ${SOURCE_DIR:-..}/data_model/schemaspy.properties:/schemaspy.properties
- ${SOURCE_DIR:-..}/datamodel/schemaspy.properties:/schemaspy.properties
depends_on:
- signalo
network_mode: "service:signalo"
Expand Down
2 changes: 1 addition & 1 deletion .docker/init_db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ if [ "$#" == "0" ] || [ "$1" == "build" ]; then
echo '----------------------------------------'
echo "Building database normally (passing argument: ${@:2})"

./data_model/setup.sh ${@:2}
./datamodel/setup.sh ${@:2}

echo "Done ! Database ${PGSERVICE} can now be used."
echo '----------------------------------------'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,16 @@ jobs:
sed -i 's|projectname="Signalo - Demo"|projectname="Signalo - v${{ github.event.release.tag_name }}"|' project/signalo.qgs
sed 's/pg_signalo/pg_signalo_dev/g' project/signalo.qgs > project/signalo_dev.qgs
sed 's/pg_signalo/pg_signalo_prod/g' project/signalo.qgs > project/signalo_prod.qgs
cp data_model/demo_data/this-is-the-way.jpg project/this-is-the-way.jpg
cp datamodel/demo_data/this-is-the-way.jpg project/this-is-the-way.jpg
zip -r signalo-${{ github.event.release.tag_name }}-project.zip project README.md
- name: zip changelogs
run: |
zip -r signalo-${{ github.event.release.tag_name }}-changelogs.zip data_model/changelogs
zip -r signalo-${{ github.event.release.tag_name }}-changelogs.zip datamodel/changelogs
- name: schemaspy
run: |
sed -i "s/version dev/version ${{ github.event.release.tag_name }}/" data_model/schemaspy.properties
sed -i "s/version dev/version ${{ github.event.release.tag_name }}/" datamodel/schemaspy.properties
docker compose run schemaspy
zip -r signalo-${{ github.event.release.tag_name }}-model-documentation.zip model-documentation/*
Expand Down
6 changes: 3 additions & 3 deletions data_model/app/create_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ def create_views(srid: int, pg_service: str):

variables = {"SRID": srid}

run_sql("data_model/app/drop_schema.sql", pg_service, variables)
run_sql("datamodel/app/drop_schema.sql", pg_service, variables)

run_sql("data_model/app/create_schema.sql", pg_service, variables)
run_sql("datamodel/app/create_schema.sql", pg_service, variables)

run_sql("data_model/app/vw_edited_support.sql", pg_service, variables)
run_sql("datamodel/app/vw_edited_support.sql", pg_service, variables)
vw_sign_symbol(pg_service=pg_service, srid=srid)


Expand Down
2 changes: 1 addition & 1 deletion doc/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ To start SIGNALO virtual environement automatically with Docker, use: `docker up

## Setup on an existing DB server

Run bash script to init the data model: `data_model/setup.sh -p _PG_SERVICE_`
Run bash script to init the data model: `datamodel/setup.sh -p _PG_SERVICE_`
2 changes: 1 addition & 1 deletion scripts/dump-demodata.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ TABLES=( sign azimut frame support vl_user_sign)
export PGSERVICE=pg_signalo

for TABLE in "${TABLES[@]}"; do
pg_dump --data-only -t signalo_db.${TABLE} --column-inserts | gsort | gsed '/^INSERT/!d' > data_model/demo_data/${TABLE}_content.sql
pg_dump --data-only -t signalo_db.${TABLE} --column-inserts | gsort | gsed '/^INSERT/!d' > datamodel/demo_data/${TABLE}_content.sql
done
6 changes: 3 additions & 3 deletions test/test-changelog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ set -e

return_code=0

for file in $(find data_model/changelogs -type f); do
if ! grep -q $(basename ${file}) data_model/setup.sh; then
echo "changelog file ${file} not found in data_model/setup.sh"
for file in $(find datamodel/changelogs -type f); do
if ! grep -q $(basename ${file}) datamodel/setup.sh; then
echo "changelog file ${file} not found in datamodel/setup.sh"
return_code=1
fi
done
Expand Down

0 comments on commit 28cc520

Please sign in to comment.