mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-08 11:16:47 +00:00
fix: track migrations; installs apply them instead of generating them
The *migrations/* ignore rule is removed. appsettings, computes and logs pin default_auto_field to AutoField, so makemigrations --check reports no pending BigAutoField migrations and existing installs need no schema change. The Vagrant provisioning no longer runs makemigrations, which created install-specific migration files that conflict with the committed history; it only runs migrate.
This commit is contained in:
parent
a6364f5d9b
commit
fd5aa069be
5 changed files with 13 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -12,7 +12,6 @@ console/cert.pem*
|
|||
tags
|
||||
dhcpd.*
|
||||
webvirtcloud/settings.py
|
||||
*migrations/*
|
||||
.coverage
|
||||
htmlcov
|
||||
*.log
|
||||
|
|
|
|||
1
Vagrantfile
vendored
1
Vagrantfile
vendored
|
|
@ -42,7 +42,6 @@ Vagrant.configure(2) do |config|
|
|||
sudo cp /srv/webvirtcloud/conf/nginx/webvirtcloud.conf /etc/nginx/conf.d
|
||||
sudo cp /srv/webvirtcloud/webvirtcloud/settings.py.template /srv/webvirtcloud/webvirtcloud/settings.py
|
||||
sudo sed "s/SECRET_KEY = ''/SECRET_KEY = '"`python3 /srv/webvirtcloud/conf/runit/secret_generator.py`"'/" -i /srv/webvirtcloud/webvirtcloud/settings.py
|
||||
python3 /srv/webvirtcloud/manage.py makemigrations
|
||||
python3 /srv/webvirtcloud/manage.py migrate
|
||||
python3 /srv/webvirtcloud/manage.py collectstatic --noinput
|
||||
sudo rm /etc/nginx/sites-enabled/default
|
||||
|
|
|
|||
|
|
@ -3,3 +3,4 @@ from django.apps import AppConfig
|
|||
|
||||
class AppsettingsConfig(AppConfig):
|
||||
name = "appsettings"
|
||||
default_auto_field = "django.db.models.AutoField"
|
||||
|
|
|
|||
6
computes/apps.py
Normal file
6
computes/apps.py
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class ComputesConfig(AppConfig):
|
||||
name = "computes"
|
||||
default_auto_field = "django.db.models.AutoField"
|
||||
6
logs/apps.py
Normal file
6
logs/apps.py
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class LogsConfig(AppConfig):
|
||||
name = "logs"
|
||||
default_auto_field = "django.db.models.AutoField"
|
||||
Loading…
Add table
Add a link
Reference in a new issue