A service to return older system profile records
(need to fill this in)
- make sure you have
libpq-devel
installed
The db schema is defined by the objects defined in models.py. When a change is made to these model objects, a database migration needs to be created. This migration will be applied automatically when an updated image is spun up in a pod. The steps to create the database migration are below:
- make changes to model objects in models.py
- in the historical-system-profiles-backend source directory, run
pipenv shell
- spin up the dev database with
docker-compose -f dev.yml up -d
- run flask to upgrade the dev database to its current state with the command
FLASK_APP=historical_system_profiles.app:get_flask_app_with_migration flask db upgrade
- now run flask to create migration with the command
FLASK_APP=historical_system_profiles.app:get_flask_app_with_migration flask db migrate -m "migration message"
- be sure to include the newly created migration file in migrations/versions/ in your pull request
- Make sure that you have SonarQube scanner installed.
- Duplicate the
sonar-scanner.properties.sample
config file.
cp sonar-scanner.properties.sample sonar-scanner.properties
- Update
sonar.host.url
,sonar.login
insonar-scanner.properties
. - Run the following command
java -jar /path/to/sonar-scanner-cli-4.6.0.2311.jar -D project.settings=sonar-scanner.properties
- Review the results in your SonarQube web instance.