Comments (6)
I will only squash dsmr_stats, reducing 16 migrations (files) to just a single one.
It also renders all runPython migrations obsolete, as Django will run the old migrations for checkouts halfway migrated and the squashed ones for new checkouts.
from dsmr-reader.
I will also drop any prints in legacy migration, as they are deployed everywhere by now. RunPython-migrations will be dropped completely in the squashed version, because they only fix existing data.
from dsmr-reader.
./manage.py squashmigrations dsmr_consumption 0004_recalculate_gas_consumption
./manage.py squashmigrations dsmr_datalogger 0005_optional_gas_readings
./manage.py squashmigrations dsmr_stats 0016_drop_stats_settings
Added a runpython for database init of MeterStatistics.objects.create()
.
from dsmr-reader.
I think I'm running into a migration bug in Django, but I'm not sure. It seems index operations for MySQL and PostgreSQL do not respect the operation order. When a squashed migration ends up having this:
- Create model
- Add field with index
- Drop model
Then the creation of the index is delayed after dropping the model, which is denied by the database. Only SQLite seems unaffected.
from dsmr-reader.
Seems related to:
I think the reason behind is that squashmigrations
doesn't remove the model from the migrations. It shouldn't exist at all.
Fow now I will fix it manually by dropping db_index=True
attribute of the model created and dropped later.
from dsmr-reader.
Merged & deployed.
from dsmr-reader.
Related Issues (20)
- API not working 404: not found HOT 1
- Postgres14.5 en backup lokatie NAS , DSMR op PI probleem nu met backup file. HOT 5
- Mindergas upload tijd randomiseren ? HOT 3
- Tijd van upload naar minder gas instelbaar maken HOT 1
- Mqtt input messages for readings HOT 1
- Gebruik Influx URL i.p.v. Influx hostname + port combinatie HOT 1
- Database grootte waarschuwing HOT 1
- OperationalError: database is locked HOT 6
- Statistieken van afgelopen 365 dagen HOT 1
- MQTT: Rejecting message for topic due to maximum queue size (5000) HOT 2
- READ! MQTT Broker; no incoming data from DSMR Reader, fix! HOT 2
- Not able to configure dmsr-reader: CSRF verification failed. Request aborted. HOT 11
- "How to get Homewizard P1 meter telegrams into DSMR Reader using automations" HOT 5
- welke body meegeven in opsturen P1 telegram met V1 api http://[ip]/api/v1/datalogger/dsmrreading HOT 6
- Django settings ontsluiten via envvars
- geen data meer (??) HOT 6
- Too many outgoing InfluxDB measurements queued for transit HOT 3
- No readings after meter change HOT 2
- DSMR-reader not sending MQTT and lagging web server HOT 3
- [vraag] nieuwe meter, alles gereset HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dsmr-reader.