{"categories":[{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/13"}],"enrichment":{"capability":"Provides a Django migration operation to set database-level default values for fields, enabling backward-compatible schema changes when adding new columns with defaults to existing tables.","skillfed_tags":["django-migrations","schema-management"],"use_cases":["Adding a required field with a default value to an existing Django model without breaking existing code or database queries","Ensuring database-level consistency when a field default must apply to all rows, not just those created through Django ORM","Migrating legacy schemas where the database itself needs to enforce default values independent of application logic","Handling backward compatibility in production deployments where you need to add a column with a safe default without downtime"],"what_it_does":"django-add-default-value is a Django migration operation that lets you set default values at the database level when adding new fields to existing tables. Instead of relying on Django's ORM default (which only applies to new rows created through Django), this operation runs a SQL ALTER TABLE statement to set the default in the schema itself, ensuring backward compatibility and consistency across all database access patterns.\n\nYou use it by adding an AddDefaultValue operation to your migration file after the AddField operation. It supports MySQL, PostgreSQL, CockroachDB, and MSSQL. The package has been dormant since early 2022, so while it remains functional for the Django versions it was tested against, there is no active maintenance or support for newer Django releases.","worth_installing":"Yes, if you are on Django 1.11\u20133.2 and need to set database-level defaults during migrations. No, if you are on a newer Django version\u2014the package is dormant and has not been tested or updated for Django 4.0+. Check your Django version against the classifiers before installing."},"id":"django-add-default-value","links":{"html":"https://skillfed.io/packages/django-add-default-value","md":"https://skillfed.io/packages/django-add-default-value.md","pypi":"https://pypi.org/project/django-add-default-value/"},"maintenance":{"status":"dormant"},"meta":{"latest_release":"2022-02-02","license_spdx":null,"license_treatment":"permissive","name":"django-add-default-value","python_support":"unspecified","summary":"This django Migration Operation can be used to transfer a fields default value to the database scheme."},"popularity":{"monthly_downloads":326397,"position":7577,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.10.0"}
