question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hi. Thanks for great project!

I create City, Country, Region models in my own models file, exactly like in documentations. Next, I make a migrations, but except my own app migration, Django create migration for cities-light in third-party apps folder:

...
Migrations for 'cities_light':
  env/src/cities-light/cities_light/migrations/0008_auto_20170309_0153.py:
    - Alter unique_together for city (0 constraint(s))
    - Remove field country from city
    - Remove field region from city
    - Alter unique_together for region (0 constraint(s))
    - Remove field country from region
    - Delete model City
    - Delete model Country
    - Delete model Region
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-03-09 01:53
from __future__ import unicode_literals

from django.db import migrations


class Migration(migrations.Migration):

    dependencies = [
        ('cities_light', '0007_make_country_name_not_unique'),
    ]

    operations = [
        migrations.AlterUniqueTogether(
            name='city',
            unique_together=set([]),
        ),
        migrations.RemoveField(
            model_name='city',
            name='country',
        ),
        migrations.RemoveField(
            model_name='city',
            name='region',
        ),
        migrations.AlterUniqueTogether(
            name='region',
            unique_together=set([]),
        ),
        migrations.RemoveField(
            model_name='region',
            name='country',
        ),
        migrations.DeleteModel(
            name='City',
        ),
        migrations.DeleteModel(
            name='Country',
        ),
        migrations.DeleteModel(
            name='Region',
        ),
    ]

My project deploy by CI, and just apply migrations only from project src. Third-party apps installs clearly every rebuild. So, I can’t put this migration into my project src.

Is it correct behavior? Or this is kind of my mistake?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
max-arnoldcommented, Mar 9, 2017

I’ll update the docs

1reaction
max-arnoldcommented, Mar 9, 2017

@Egregors I updated the comment, try this (as of 1.9 https://docs.djangoproject.com/en/1.10/ref/settings/#migration-modules):

MIGRATION_MODULES = {
    'cities_light': None
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Lost in Migration - Lumosity
Lost in Migration exercises your attention abilities by asking you to identify where the lead bird in a flock is headed, ignoring the...
Read more >
Missing Migrants - International Organization for Migration
Missing Migrants Project records since 2014 people who die in the process of migration towards an international destination, regardless of their legal status....
Read more >
The Lost Migration - Kindle edition by Vadas, Andrew S ...
THE LOST MIGRATION is a story of self discovery in which a young man refuses to give up his desire to be great....
Read more >
Lost Migrations – Project Dastaan
Lost Migrations is a three-part animated series which tells the untold stories of the Partition through the voices of the colonised.
Read more >
Q&A: Restoring lost migrations - The Wildlife Society
From a purely human-centric perspective, lost migrations can have huge impacts on local and national economies. For example, a lack of Pacific ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found