Fix migrations

This commit is contained in:
IRBorisov 2024-06-03 21:29:27 +03:00
parent 9e02d809a0
commit 58d85da72f
3 changed files with 3 additions and 3 deletions

View File

@ -22,7 +22,7 @@ class Migration(migrations.Migration):
else: else:
location = m.LocationHead.USER location = m.LocationHead.USER
item.location = location item.location = location
item.save() item.save(update_fields=['location'])
operations = [ operations = [
migrations.AddField( migrations.AddField(

View File

@ -12,7 +12,7 @@ function LoadDjangoBackup() {
& docker cp ${dataArchive} ${target}:$local_archiveDump & docker cp ${dataArchive} ${target}:$local_archiveDump
& docker exec $target gzip --decompress --force $local_dataDump & docker exec $target gzip --decompress --force $local_dataDump
docker exec $target ` docker exec $target `
python manage.py loaddata $local_dataDump python3.12 manage.py loaddata $local_dataDump
& docker exec $target rm $local_dataDump & docker exec $target rm $local_dataDump
} }

View File

@ -4,7 +4,7 @@
# Input params # Input params
$dataDump = "D:\DEV\backup\portal\2023-09-01\2023-09-01-db.dump" $dataDump = "D:\DEV\backup\portal\2023-09-01\2023-09-01-db.dump"
$target = "dev-portal-db" $target = "local-portal-db"
$pgUser = "portal-admin" $pgUser = "portal-admin"
$pgDB = "portal-db" $pgDB = "portal-db"