mirror of
https://github.com/inventree/InvenTree.git
synced 2026-07-18 04:33:48 +00:00
Adjust default behavior of "migrate" command
- Does not create new migration files automatically
This commit is contained in:
@@ -46,4 +46,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
python ./.github/scripts/check_source_strings.py --frontend --backend
|
python ./.github/scripts/check_source_strings.py --frontend --backend
|
||||||
- name: Check Migration Files
|
- name: Check Migration Files
|
||||||
run: python3 .github/scripts/check_migration_files.py
|
run: |
|
||||||
|
invoke migrate --detect
|
||||||
|
python3 .github/scripts/check_migration_files.py
|
||||||
|
|||||||
@@ -405,7 +405,9 @@ jobs:
|
|||||||
- name: Test Translations
|
- name: Test Translations
|
||||||
run: invoke dev.translate
|
run: invoke dev.translate
|
||||||
- name: Check Migration Files
|
- name: Check Migration Files
|
||||||
run: python3 .github/scripts/check_migration_files.py
|
run: |
|
||||||
|
invoke migrate --detect
|
||||||
|
python3 .github/scripts/check_migration_files.py
|
||||||
- name: Coverage Tests
|
- name: Coverage Tests
|
||||||
run: invoke dev.test --check --coverage --translations
|
run: invoke dev.test --check --coverage --translations
|
||||||
- name: Upload raw coverage to artifacts
|
- name: Upload raw coverage to artifacts
|
||||||
|
|||||||
@@ -1070,10 +1070,13 @@ def listbackups(c):
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
@state_logger
|
@state_logger
|
||||||
def migrate(c, detect: bool = True, verbose: bool = False):
|
def migrate(c, detect: bool = False, verbose: bool = False):
|
||||||
"""Performs database migrations.
|
"""Performs database migrations. This is a critical step if the database schema have been altered.
|
||||||
|
|
||||||
This is a critical step if the database schema have been altered!
|
Arguments:
|
||||||
|
c: Command line context.
|
||||||
|
detect: Whether to detect and create new migrations based on changes to models. Default is False.
|
||||||
|
verbose: Whether to print verbose output from migration commands. Default is False.
|
||||||
"""
|
"""
|
||||||
info('Running InvenTree database migrations...')
|
info('Running InvenTree database migrations...')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user