Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
c28ccf1
Fix: Typo in comment
CarolineDenis Jun 1, 2026
1213dc2
Fix: Improve DB setup script
CarolineDenis Jun 1, 2026
7a19f7f
Fix: Validate master credentials explicitly in the required-env checkt
CarolineDenis Jun 1, 2026
efd66ca
Fix: Require migration-capable privileges
CarolineDenis Jun 1, 2026
47cc4c8
Fix: Validate DJANGO_DB_ALIAS before indexing DATABASES
CarolineDenis Jun 1, 2026
f78c9e1
Fix: Read the DB role credentials from the environment
CarolineDenis Jun 1, 2026
7d9e8c9
Fix: Trigger fallback mechanism
CarolineDenis Jun 1, 2026
926fd43
Fix: Fail entrypoint fast when ./sp7_db_setup_check.sh fails
CarolineDenis Jun 2, 2026
a9fe052
Fix: Use override for startup migration flow
CarolineDenis Jun 2, 2026
1e5737c
Fix: Fix set -u
CarolineDenis Jun 2, 2026
841bf29
Fix: Remove schema-changing privileges
CarolineDenis Jun 2, 2026
4ad9bec
Fix: Check for sp6 tables only when it's not a new db
CarolineDenis Jun 2, 2026
e9f3f40
Fix: Remove useless try/except
CarolineDenis Jun 2, 2026
999cf16
Fix: Closed Fi before the grant block starts
CarolineDenis Jun 3, 2026
eb7c2e4
Fix: Fix log message
CarolineDenis Jun 3, 2026
08ee353
Fix: Materialize scopes before computing final_discipline
CarolineDenis Jun 3, 2026
0586860
Fix: Fix import
CarolineDenis Jun 3, 2026
0361cc3
fix: add helper fct
CarolineDenis Jun 3, 2026
7277f66
fix: Fix syntax in setup_check
CarolineDenis Jun 3, 2026
da2532b
fix: Use SQL_MIGRATOR_*
CarolineDenis Jun 3, 2026
b46fe09
fix: Make SQL escaping
CarolineDenis Jun 3, 2026
0b2e4b8
fix: Use get_or_create() for idempotency to match production behavior
CarolineDenis Jun 3, 2026
fa20860
fix: do not fail on missing variable for test panel
CarolineDenis Jun 5, 2026
756c6d3
fix: Fix wrong user name
CarolineDenis Jun 5, 2026
d9c0ae7
fix: Fix wrong user name
CarolineDenis Jun 5, 2026
aaf0498
fix: Improve error logs
CarolineDenis Jun 5, 2026
8c2ef7d
fix: Fix host variable initialization order that prevents environment…
CarolineDenis Jun 8, 2026
caf2cd2
refactro: remove unneeded helper function
melton-jason Jul 1, 2026
fd0b861
fix: remove undefined kwarg in permissions/initialize function
melton-jason Jul 1, 2026
5baa172
Merge branch 'v7_12_0_7_base' into issue-8148-fixes-6121-after-review
melton-jason Jul 1, 2026
af3dac4
feat: speed up UserRole creation during tests
melton-jason Jul 1, 2026
afe781c
refactor: remove unused DB_ALIAS setting
melton-jason Jul 1, 2026
bf6d410
fix: remove `MYSQL_USER` and `MYSQL_PASSWORD`
grantfitzsimmons May 21, 2026
4c44e6f
fix: remove restart policy
grantfitzsimmons May 21, 2026
cdb39ce
fix: exit on DB setup failure
grantfitzsimmons May 21, 2026
b9cc882
fix: clarify migrations in docker entrypoint
grantfitzsimmons May 21, 2026
232c15a
fix: clarify startup migrations comment
grantfitzsimmons May 21, 2026
39ec2e7
fix: make DB reset opt-in
grantfitzsimmons Jul 2, 2026
1ba1216
fix: type annotation for roles in assign_users_to_roles_during_testing
melton-jason Jul 2, 2026
a46b390
fix: remove DATABASE_NAME from docker-compose.yml
melton-jason Jul 2, 2026
c6a108c
fix: use correct connection in migrations
melton-jason Jul 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ DATABASE_PORT=3306
MYSQL_ROOT_PASSWORD=password
DATABASE_NAME=specify

# This allows for a destructive reset of the database if it is not empty but contains no legacy Specify schema.
# For production environments, it is recommended to set this to false to prevent accidental data loss.
ALLOW_DB_RESET=false

# The following are database users with specific roles and privileges.
# If the migrator and app user are not defined, the system will use the master user credentials.
# See documenation https://discourse.specifysoftware.org/t/new-blank-database-creation-database-user-levels/3023
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pip_requirements:
$(PIP) install --upgrade -r requirements.txt

django_migrations:
$(PYTHON) manage.py base_specify_migration --database=migrations
$(PYTHON) manage.py base_specify_migration --use-override --database=migrations
$(PYTHON) manage.py migrate --database=migrations

specifyweb/settings/build_version.py: .FORCE
Expand Down
4 changes: 0 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ services:
command: --max_allowed_packet=1073741824
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_DATABASE=${DATABASE_NAME}
- MYSQL_USER=${MASTER_NAME}
- MYSQL_PASSWORD=${MASTER_PASSWORD}

specify7:
container_name: specify7
Expand All @@ -35,7 +32,6 @@ services:
target: run-development
command: ve/bin/python manage.py runserver 0.0.0.0:8000
init: true
restart: unless-stopped
depends_on:
# It seems like there was a race condition on the the
# webpack-output volume. I suspect if this container mounts it
Expand Down
17 changes: 9 additions & 8 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ if [ "$1" = 've/bin/gunicorn' ] || [ "$1" = 've/bin/python' ]; then
echo "Updating static files in /volumes/static-files/."
rsync -a --delete specifyweb/frontend/static/ /volumes/static-files/frontend-static
cd /opt/specify7
echo "Applying Django migrations."
set +e
./sp7_db_setup_check.sh # Setup db users and run mirgations
# ve/bin/python manage.py base_specify_migration
# ve/bin/python manage.py migrate
ve/bin/python manage.py run_key_migration_functions # Uncomment if you want the key migration functions to run on startup.
set -e
if ./sp7_db_setup_check.sh; then
# sp7_db_setup_check.sh intentionally runs manage.py base_specify_migration and manage.py migrate;
# only manage.py run_key_migration_functions is invoked here afterward.
ve/bin/python manage.py run_key_migration_functions # Runs after sp7_db_setup_check.sh succeeds.
else
echo "Database setup failed; exiting."
exit 1
fi
fi
exec "$@"
exec "$@"
Loading
Loading