Skip to content
Open
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions docker/s6-rc.d/init/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ python3 manage.py check
# Run the database migrations
if is_enabled "${RUN_MIGRATIONS:-False}"; then

# Fix the User model
echo "Fixing the User model"
echo "INSERT INTO django_migrations (app, name, applied) SELECT 'users', '0001_initial', CURRENT_TIMESTAMP WHERE NOT EXISTS (SELECT app FROM django_migrations WHERE app='users' AND name='0001_initial');" | python3 manage.py dbshell
echo "UPDATE django_content_type SET app_label = 'users' WHERE app_label = 'auth' and model = 'user';" | python manage.py dbshell
# # Fix the User model
# echo "Fixing the User model"
# echo "INSERT INTO django_migrations (app, name, applied) SELECT 'users', '0001_initial', CURRENT_TIMESTAMP WHERE NOT EXISTS (SELECT app FROM django_migrations WHERE app='users' AND name='0001_initial');" | python3 manage.py dbshell
# echo "UPDATE django_content_type SET app_label = 'users' WHERE app_label = 'auth' and model = 'user';" | python manage.py dbshell

# Run the actual migrations
echo "Migrating database"
Expand Down