Improves Django migration system.
Project description
Django Better Migrations
========================
[](https://travis-ci.org/botify-labs/django-better-migrations)
This project aims at providing improvements to Django's default migration system.
The default migration system is over-engineered, sometimes dangerous, and not
team work friendly.
More informations in the documentation, see "docs/" folder.
Example
-------
See below migration, generated automatically via `manage.py makemigrations`:
```python
# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2017-12-01 00:00
from __future__ import unicode_literals
from django.db import migrations, models
# Generated SQL code (sqlite):
#
# --
# -- Create model Person
# --
# CREATE TABLE "example_app_person" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "name" varchar(100) NOT NULL);
#
# Check results:
# CHECK OK: No ALTER TABLE ADD COLUMN with non-NULL constraint
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Person',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=100)),
],
),
]
```
License
-------
MIT, see `LICENSE` file.
========================
[](https://travis-ci.org/botify-labs/django-better-migrations)
This project aims at providing improvements to Django's default migration system.
The default migration system is over-engineered, sometimes dangerous, and not
team work friendly.
More informations in the documentation, see "docs/" folder.
Example
-------
See below migration, generated automatically via `manage.py makemigrations`:
```python
# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2017-12-01 00:00
from __future__ import unicode_literals
from django.db import migrations, models
# Generated SQL code (sqlite):
#
# --
# -- Create model Person
# --
# CREATE TABLE "example_app_person" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "name" varchar(100) NOT NULL);
#
# Check results:
# CHECK OK: No ALTER TABLE ADD COLUMN with non-NULL constraint
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Person',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=100)),
],
),
]
```
License
-------
MIT, see `LICENSE` file.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for django-better-migrations-0.0.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07de5de6ad327c929f1ad1ddc155275f0b344f0604e18e5c82c4ce9a53358734 |
|
MD5 | 5f117bda2a2e0a1230a8ec826c72bce8 |
|
BLAKE2b-256 | d46be8cc41d10ba6b93a064fd23024bfa66ba0430d5f178a93f71c71b3f6ac92 |