{"id":17003056,"url":"https://github.com/50-course/blue-green-database-deployment-django","last_synced_at":"2026-05-17T08:35:45.360Z","repository":{"id":225051960,"uuid":"764930143","full_name":"50-Course/blue-green-database-deployment-django","owner":"50-Course","description":"Complex Schema Migrations exploration in django - The Canary approach","archived":false,"fork":false,"pushed_at":"2024-02-29T01:12:37.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-22T09:43:44.412Z","etag":null,"topics":["django","migrations","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/50-Course.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-29T00:55:15.000Z","updated_at":"2025-02-18T08:21:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"570c8869-7a0a-48b2-9c31-45bacc51cefd","html_url":"https://github.com/50-Course/blue-green-database-deployment-django","commit_stats":null,"previous_names":["50-course/blue-green-database-deployment-django"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/50-Course/blue-green-database-deployment-django","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/50-Course%2Fblue-green-database-deployment-django","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/50-Course%2Fblue-green-database-deployment-django/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/50-Course%2Fblue-green-database-deployment-django/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/50-Course%2Fblue-green-database-deployment-django/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/50-Course","download_url":"https://codeload.github.com/50-Course/blue-green-database-deployment-django/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/50-Course%2Fblue-green-database-deployment-django/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33132026,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T06:27:06.342Z","status":"ssl_error","status_checked_at":"2026-05-17T06:26:59.432Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["django","migrations","python"],"created_at":"2024-10-14T04:29:39.819Z","updated_at":"2026-05-17T08:35:45.334Z","avatar_url":"https://github.com/50-Course.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Blue Green Deployment is a simple project to explore managing database state in production such as the `Blue-Green-Deployment` techique.\n\n\n## Blue-Green-Deployment\n\nDjango provides a special migration function, `migrations.SeperateDatabaseAndState`, to separate the database schema and the data. This is useful for managing database state in production such as the `Blue-Green-Deployment` techique.\nUnderneath, it alters the database schema and the data separately. It is useful for managing database state in production such as the `Blue-Green-Deployment` techique.\n\n### Usage\n\n```python\nfrom django.db import migrations, models\n\nclass Migration(migrations.Migration):\n\n    dependencies = [\n        ('myapp', '0001_initial'),\n    ]\n\n    operations = [\n        migrations.SeparateDatabaseAndState(\n            database_operations=[\n                migrations.RunSQL(\n                    \"CREATE TABLE myapp_mymodel (id int, name varchar(30))\",\n                    \"DROP TABLE myapp_mymodel\"\n                ),\n            ],\n            state_operations=[\n                migrations.CreateModel(\n                    name='MyModel',\n                    fields=[\n                        ('id', models.AutoField(primary_key=True)),\n                        ('name', models.CharField(max_length=30)),\n                    ],\n                ),\n            ],\n        ),\n    ]\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F50-course%2Fblue-green-database-deployment-django","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F50-course%2Fblue-green-database-deployment-django","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F50-course%2Fblue-green-database-deployment-django/lists"}