Site for BRC staff to make requests for BRC central services, such as comms, PPI and IT.
- Download the code from github
git clone git@github.com:LCBRU/lbrc_services.git- Install the requirements
Go to the lbrc_services directory and type the command:
pip install -r requirements.txt- Create the database using
Staying in the lbrc_services directory and type the command:
python create_test_db.py- Run the application
Staying in the lbrc_services directory and type the command:
./app.pyTo test the application, run the following command from the project folder:
pip install -r requirements-dev.txtTo test the application, run the following command from the project folder:
pytestTo create a migration run the command
./manage.py script "{Description of change}"You will then need to change the newly-created script created in the
migrations directory to make the necessary upgrade and downgrade
changes.
After amending the models, run the following command to create the migrations and apply them to the database:
./manage.py upgradeThe database upgrades are handled by SQLAlchemy-migrate and are run using the manage.py program
once the configuration has been copied into place and the database created.
First create an empty database in the database server, then initialise the migrations by running the command:
manage.py version_control
manage.py upgradeTo upgrade the database to the current version, run the command:
manage.py upgrade