Adds SQL Output and a Rules system to Django Migrations
Project description
Django Better Migrations
This project aims at providing improvements to Django's default migration system.
More informations in the documentation, see "docs/" folder.
Example
See below migration, generated automatically via manage.py makemigrations
:
# -*- 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
Built Distribution
File details
Details for the file django_better_migrations-1.0.3.tar.gz
.
File metadata
- Download URL: django_better_migrations-1.0.3.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.10.6 Linux/5.15.0-1040-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f974df5def9da521adbd9bde54e10a5e2bd4a8d9cae4feb209a84e42687ca56a |
|
MD5 | 8df3c5d56bbc0b494a24b8859f85bf0e |
|
BLAKE2b-256 | 7d666732d2bbfe695c02eaf49f948a88b3df357897ef1dcbe0d219a5a4550cb0 |
File details
Details for the file django_better_migrations-1.0.3-py3-none-any.whl
.
File metadata
- Download URL: django_better_migrations-1.0.3-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.10.6 Linux/5.15.0-1040-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7bcee5f16de488b30dafa3299200a6123b10df709bfce720277f6b6e19e341d8 |
|
MD5 | 80af9b31a02f8362f9bcccfc327a5766 |
|
BLAKE2b-256 | f8536075ed36b6426c508c1bdb630f582d0d2b9fd29ab2b25841f91495b0a936 |