django-sb-simple-migrations


Namedjango-sb-simple-migrations JSON
Version 0.8.0 PyPI version JSON
download
home_pagehttps://gitlab.com/softbutterfly/open-source/django-sb-simple-migrations
SummaryDjango migrations without unnecesary change alert triggers.
upload_time2023-08-06 05:34:25
maintainer
docs_urlNone
authorSoftButterfly Development Team
requires_python>=3.8.1,<4.0.0
licenseMIT
keywords softbutterfly django migrations
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            ![Community-Project](https://gitlab.com/softbutterfly/open-source/open-source-office/-/raw/master/banners/softbutterfly-open-source--banner--community-project.png)

![PyPI - Supported versions](https://img.shields.io/pypi/pyversions/django-sb-simple-migrations)
![PyPI - Package version](https://img.shields.io/pypi/v/django-sb-simple-migrations)
![PyPI - Downloads](https://img.shields.io/pypi/dm/django-sb-simple-migrations)
![PyPI - MIT License](https://img.shields.io/pypi/l/django-sb-simple-migrations)

[![Codacy Badge](https://app.codacy.com/project/badge/Grade/cbdc556a2ca246d2b906dfc5e1195541)](https://app.codacy.com/gl/softbutterfly/django-sb-simple-migrations/dashboard?utm_source=gl&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)

# Django Simple Migrations

Django migrations without unnecesary change alert triggers.

This project was originally taken from [Pretix source code](https://github.com/pretix/pretix/tree/master/src/pretix/base/management/commands) and battle testet across many projects on [SoftButterfly](https://softbutterfly.io).

This package overrides the commands `makemigrations` and `migrate`, mainly to make that `makemigrations` doesn't create migrations on non-significant database model fields and avoid `migrate` warnings. As is stated in the source code

* `makemigrations`

  > Django, for theoretically very valid reasons, creates migrations for *every single thing* we change on a model. Even the `help_text`! This makes sense, as we don't know if any database backend unknown to us might actually use this information for its database schema.
  >
  > However, many projects only supports PostgreSQL, MySQL, MariaDB and SQLite and we can be pretty certain that some changes to models will never require a change to the database. In this case, not creating a migration for certain changes will save us some performance while applying them *and* allow for a cleaner git history. Win-win!
  >
  > Only caveat is that we need to do some dirty monkeypatching to achieve it...

* `migrate`

  > Django tries to be helpful by suggesting to run "makemigrations" in red font on every "migrate" run when there are things we have no migrations for. Usually, this is intended, and running "makemigrations" can really screw up the environment of a user, so we want to prevent novice users from doing that by going really dirty and filtering it from the output.

## Requirements

- Python 3.8, 3.9, 3.10

## Install

```bash
pip install django-sb-simple-migrations
```

## Usage

Just add `django_sb_simple_migrations` to your `INSTALLED_APPS` settings

```
INSTALLED_APPS = [
  # ...
  "django_sb_simple_migrations",
  # ...
]
```

## Docs

- [Ejemplos](https://gitlab.com/softbutterfly/open-source/django-sb-simple-migrations/-/wikis)
- [Wiki](https://gitlab.com/softbutterfly/open-source/django-sb-simple-migrations/-/wikis)

## Changelog

All changes to versions of this library are listed in the [change history](CHANGELOG.md).

## Development

Check out our [contribution guide](CONTRIBUTING.md).

## Contributors

See the list of contributors [here](https://gitlab.com/softbutterfly/open-source/django-sb-simple-migrations/-/graphs/develop).

            

Raw data

            {
    "_id": null,
    "home_page": "https://gitlab.com/softbutterfly/open-source/django-sb-simple-migrations",
    "name": "django-sb-simple-migrations",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8.1,<4.0.0",
    "maintainer_email": "",
    "keywords": "Softbutterfly,Django,Migrations",
    "author": "SoftButterfly Development Team",
    "author_email": "dev@softbutterfly.io",
    "download_url": "https://files.pythonhosted.org/packages/df/0f/2b068a1c6344dd70babb7e2791107d5e3500439a014683b817cdf0ab1523/django_sb_simple_migrations-0.8.0.tar.gz",
    "platform": null,
    "description": "![Community-Project](https://gitlab.com/softbutterfly/open-source/open-source-office/-/raw/master/banners/softbutterfly-open-source--banner--community-project.png)\n\n![PyPI - Supported versions](https://img.shields.io/pypi/pyversions/django-sb-simple-migrations)\n![PyPI - Package version](https://img.shields.io/pypi/v/django-sb-simple-migrations)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/django-sb-simple-migrations)\n![PyPI - MIT License](https://img.shields.io/pypi/l/django-sb-simple-migrations)\n\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/cbdc556a2ca246d2b906dfc5e1195541)](https://app.codacy.com/gl/softbutterfly/django-sb-simple-migrations/dashboard?utm_source=gl&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)\n\n# Django Simple Migrations\n\nDjango migrations without unnecesary change alert triggers.\n\nThis project was originally taken from [Pretix source code](https://github.com/pretix/pretix/tree/master/src/pretix/base/management/commands) and battle testet across many projects on [SoftButterfly](https://softbutterfly.io).\n\nThis package overrides the commands `makemigrations` and `migrate`, mainly to make that `makemigrations` doesn't create migrations on non-significant database model fields and avoid `migrate` warnings. As is stated in the source code\n\n* `makemigrations`\n\n  > Django, for theoretically very valid reasons, creates migrations for *every single thing* we change on a model. Even the `help_text`! This makes sense, as we don't know if any database backend unknown to us might actually use this information for its database schema.\n  >\n  > However, many projects only supports PostgreSQL, MySQL, MariaDB and SQLite and we can be pretty certain that some changes to models will never require a change to the database. In this case, not creating a migration for certain changes will save us some performance while applying them *and* allow for a cleaner git history. Win-win!\n  >\n  > Only caveat is that we need to do some dirty monkeypatching to achieve it...\n\n* `migrate`\n\n  > Django tries to be helpful by suggesting to run \"makemigrations\" in red font on every \"migrate\" run when there are things we have no migrations for. Usually, this is intended, and running \"makemigrations\" can really screw up the environment of a user, so we want to prevent novice users from doing that by going really dirty and filtering it from the output.\n\n## Requirements\n\n- Python 3.8, 3.9, 3.10\n\n## Install\n\n```bash\npip install django-sb-simple-migrations\n```\n\n## Usage\n\nJust add `django_sb_simple_migrations` to your `INSTALLED_APPS` settings\n\n```\nINSTALLED_APPS = [\n  # ...\n  \"django_sb_simple_migrations\",\n  # ...\n]\n```\n\n## Docs\n\n- [Ejemplos](https://gitlab.com/softbutterfly/open-source/django-sb-simple-migrations/-/wikis)\n- [Wiki](https://gitlab.com/softbutterfly/open-source/django-sb-simple-migrations/-/wikis)\n\n## Changelog\n\nAll changes to versions of this library are listed in the [change history](CHANGELOG.md).\n\n## Development\n\nCheck out our [contribution guide](CONTRIBUTING.md).\n\n## Contributors\n\nSee the list of contributors [here](https://gitlab.com/softbutterfly/open-source/django-sb-simple-migrations/-/graphs/develop).\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Django migrations without unnecesary change alert triggers.",
    "version": "0.8.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/softbutterfly/django-sb-simple-migrations/issues",
        "Documentation": "https://gitlab.com/softbutterfly/open-source/django-sb-simple-migrations/-/wikis",
        "Download": "https://github.com/softbutterfly/django-sb-simple-migrations/archive/v0.8.0.tar.gz",
        "Homepage": "https://gitlab.com/softbutterfly/open-source/django-sb-simple-migrations",
        "Repository": "https://gitlab.com/softbutterfly/open-source/django-sb-simple-migrations"
    },
    "split_keywords": [
        "softbutterfly",
        "django",
        "migrations"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "386c5bed2614d7b731a1d27baae940d51cf5674f48706a2c134a8196c25bfd14",
                "md5": "935bc496d4e891f0afedaa4ca236302d",
                "sha256": "3aba40b4ad08c4bc9b7c0d53774dd4ba24d9000cee79dbedf8aa93a5afad83ee"
            },
            "downloads": -1,
            "filename": "django_sb_simple_migrations-0.8.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "935bc496d4e891f0afedaa4ca236302d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8.1,<4.0.0",
            "size": 9703,
            "upload_time": "2023-08-06T05:34:23",
            "upload_time_iso_8601": "2023-08-06T05:34:23.509737Z",
            "url": "https://files.pythonhosted.org/packages/38/6c/5bed2614d7b731a1d27baae940d51cf5674f48706a2c134a8196c25bfd14/django_sb_simple_migrations-0.8.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "df0f2b068a1c6344dd70babb7e2791107d5e3500439a014683b817cdf0ab1523",
                "md5": "11e126f72b7f2fa03a0f35ca4504573a",
                "sha256": "e85aafafafe1656e46657df9ddc156a6b2c025ad5a3e83b5527d5ca6a500978e"
            },
            "downloads": -1,
            "filename": "django_sb_simple_migrations-0.8.0.tar.gz",
            "has_sig": false,
            "md5_digest": "11e126f72b7f2fa03a0f35ca4504573a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8.1,<4.0.0",
            "size": 6794,
            "upload_time": "2023-08-06T05:34:25",
            "upload_time_iso_8601": "2023-08-06T05:34:25.200421Z",
            "url": "https://files.pythonhosted.org/packages/df/0f/2b068a1c6344dd70babb7e2791107d5e3500439a014683b817cdf0ab1523/django_sb_simple_migrations-0.8.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-06 05:34:25",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "softbutterfly",
    "github_project": "django-sb-simple-migrations",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": false,
    "requirements": [],
    "lcname": "django-sb-simple-migrations"
}
        
Elapsed time: 0.09920s