Open freaky4wrld opened 3 weeks ago
@fyliu added the missing lines in the file, just a question do we still need postgresql
added, or we can skip that???
@freaky4wrld I think we should skip it. There's several other management commands dealing with databases but I think dbshell
is the only one that needs psql
.
@freaky4wrld I'm still having trouble seeing the data inserted into the database. Can you check if this happens to you too?
Here are my steps:
# build and run the container in the right branch
./script/buildrun.sh
# I also tried it with the -v option to delete and start from a fresh data volume
# make sure data/0004 migration is applied
docker-compose exec -T web python manage.py showmigrations data
# check permissiontype table data
./scripts/db.sh -c "select * from core_permissiontype;"
# shows empty table
# check sdg table has data
./scripts/db.sh -c "select * from core_sdg;"
# show core tables with extended info (size and desc)
./scripts/db.sh -c "\dt+ core*"
# shows that core_permissiontype is essentially empty
# more debug attempt: unapply and reapply the migration
./scripts/migrate.sh data 0003
./scripts/migrate.sh data 0004
# I checked and the table is still empty
I made the following change to db.sh
set -x
# example:
# ./scripts/db.sh -c "select * from core_permissiontype;"
docker-compose exec db psql -d people_depot_dev -U people_depot "$@"
@fyliu yep the seed data doesn't display irrespective of the changes you made in the db.sh
. Don't know how it happened but I made sure it shows the seed data in the db-table
... should I run the script again to insert the data into the db-table
Fixes #278
What changes did you make?
Dockerfile
to install postgresql during docker-buildWhy did you make the changes (we will use this info to test)?
PermissionType
model