diff --git a/README.md b/README.md index d391815ef1b2660071cf9994d140e6083ebbf800..946e9ba8d7c4f3b5abae14fe7a91343c4d86ea53 100644 --- a/README.md +++ b/README.md @@ -21,13 +21,13 @@ REST API Confluence Page: * https://support.astron.nl/confluence/display/LDV/LOFAR+Data+Valorization+Home -Workflow: -This diagram roughly serves as the specs for adapting ATDB for LDV. - * https://support.astron.nl/confluence/display/LDV/WORKFLOW +Specifications: +These diagrams roughly serves as the specifications for adapting ATDB for LDV. + * workflow: https://support.astron.nl/confluence/display/LDV/WORKFLOW + * datamodel: https://dbdiagram.io/d/5ffc5fb180d742080a35d560 ## Overview Diagrams (under construction) These diagrams are the core of the ATDB documentation. -Currently they are still mostly the original ATDB diagrams. They will be adapted and kept in sync once the ATDB-LDV structure solifies a bit more. ### Datamodel: * https://drive.google.com/file/d/1v5hMBQS0jT8DQJwySVISfRa1zF4o0fCQ/view?usp=sharing @@ -68,12 +68,26 @@ This is done to not have a mandatory deploy for every minor commmit. > cd $DOCKER_COMPOSE_DIR > docker-compose -p atdb up -d -### Database migrations +### Database changes and migrations When the `models.py` is changed, then the database must be migrated. -This is how to do that manually for a persistent database in a Docker container. +This is the procedure for that. + + on local dev: + + > python manage.py makemigrations --settings=atdb.settings.dev + > python manage.py migrate --settings=atdb.settings.dev + - add new migration file to git + - commit & push + + on CI/CD page: https://git.astron.nl/astron-sdc/atdb-ldv/-/pipelines + + - when automatic build is finished, push >> to deploy + + on sdc machine: > docker exec -it atdb-ldv python manage.py makemigrations --settings atdb.settings.docker_sdc - > docker exec -it atdb-ldv python manage.py migrate --settings atdb.settings.docker_sdc + > docker exec -it atdb-ldv python manage.py migrate --settings atdb.settings.docker_sdc + ## Postgres Database operations diff --git a/atdb/taskdatabase/templates/taskdatabase/index.html b/atdb/taskdatabase/templates/taskdatabase/index.html index d4dd04e62fb5c091b665a3ba23b94ba9e5046695..c63228bb12db36090c931651d80f9d010d0b8652 100644 --- a/atdb/taskdatabase/templates/taskdatabase/index.html +++ b/atdb/taskdatabase/templates/taskdatabase/index.html @@ -44,7 +44,7 @@ </div> {% include 'taskdatabase/pagination.html' %} </div> - <p class="footer"> Version 1.0.0 (28 jan 2021 - 11:00) + <p class="footer"> Version 1.0.0 (29 jan 2021 - 08:00) <script type="text/javascript"> (function(seconds) { var refresh,