Skip to content

Commit

Permalink
removed migrate all db
Browse files Browse the repository at this point in the history
  • Loading branch information
domdinicola committed Jan 28, 2025
1 parent a556d31 commit 954c3a8
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ else
"dev")
wait_for_db db
python manage.py collectstatic --no-input --no-default-ignore
python manage.py migratealldb
python manage.py migrate
python manage.py runserver 0.0.0.0:8000
;;
"cy")
wait_for_db db
python manage.py collectstatic --no-input --no-default-ignore
python manage.py migratealldb
python manage.py migrate
python manage.py initcypress --skip-drop
python manage.py runserver 0.0.0.0:8000
;;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def add_arguments(self, parser: ArgumentParser) -> None:
def handle(self, *args: Any, **options: Any) -> None:
if options["skip_drop"] is False:
call_command("dropalldb")
call_command("migratealldb")
call_command("migrate")

reset_business_area_sequences()
call_command("flush", "--noinput")
Expand Down
4 changes: 2 additions & 2 deletions src/hct_mis_api/apps/core/management/commands/initdemo.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ def handle(self, *args: Any, **options: Any) -> None:
if not options["skip_drop"]:
self.stdout.write("Dropping existing databases...")
call_command("dropalldb")
self.stdout.write("Migrating databases...")
call_command("migratealldb")
self.stdout.write("Migrating database...")
call_command("migrate")

# Flush databases
self.stdout.write("Flushing databases...")
Expand Down
2 changes: 1 addition & 1 deletion src/hct_mis_api/apps/core/management/commands/initempty.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class Command(BaseCommand):
def handle(self, *args: Any, **options: Any) -> None:
call_command("dropalldb")
call_command("migratealldb")
call_command("migrate")
call_command("loadbusinessareas")
call_command("generatedocumenttypes")
call_command("search_index", "--rebuild", "-f")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

class Command(BaseCommand):
def handle(self, *args: Any, **options: Any) -> None:
call_command("migratealldb")
call_command("migrate")
call_command("loadbusinessareas")
call_command("generatedocumenttypes")
call_command("generateroles")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class Command(BaseCommand):
def handle(self, *args: Any, **options: Any) -> None:
call_command("dropalldb")
call_command("migratealldb")
call_command("migrate")
call_command("loadbusinessareas")
call_command("generatedocumenttypes")
call_command("search_index", "--rebuild", "-f")
Expand Down
2 changes: 1 addition & 1 deletion src/hct_mis_api/apps/core/management/commands/upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

class Command(BaseCommand):
def handle(self, *args: Any, **options: Any) -> None:
call_command("migratealldb")
call_command("migrate")
call_command("collectstatic", "--no-default-ignore", interactive=False)
from adminactions.perms import create_extra_permissions

Expand Down

0 comments on commit 954c3a8

Please sign in to comment.