Discussion:
Unapplied Migration - how to apply
Tim Johnson
2018-11-20 16:40:01 UTC
Permalink
using django on ubuntu 16.04
python 3.5.2
django.VERSION =
(2, 0, 0, 'final', 0)
Working from the Django Core book by Nigel George.
When launching

(djenv) ***@linus:~/prj/cgi/djenv/djtest$ ./manage.py runserver
Performing system checks...

System check identified no issues (0 silenced).

# the following is a matter of concern:

You have 1 unapplied migration(s). Your project may not work
properly until you apply the migrations for app(s): admin.
Run 'python manage.py migrate' to apply them.

November 19, 2018 - 23:05:05
Django version 2.1.3, using settings 'djtest.settings'
Starting development server at http://127.0.0.1:8000/

# Listing migrations shows:

(djenv) ***@linus:~/prj/cgi/djenv/djtest$ python manage.py showmigrations --list
admin
[X] 0001_initial
[X] 0002_logentry_remove_auto_add
[ ] 0003_logentry_add_action_flag_choices
auth
[X] 0001_initial
[X] 0002_alter_permission_name_max_length
[X] 0003_alter_user_email_max_length
[X] 0004_alter_user_username_opts
[X] 0005_alter_user_last_login_null
[X] 0006_require_contenttypes_0002
[X] 0007_alter_validators_add_error_messages
[X] 0008_alter_user_username_max_length
[X] 0009_alter_user_last_name_max_length
contenttypes
[X] 0001_initial
[X] 0002_remove_content_type_name
sessions
[X] 0001_initial

# It appears that 0003_logentry_add_action_flag_choices
# is not applied

Questions:
1) How do I apply this feature?
2) Where is further relevant discussions or documentation on this
issue? (I've so far not found anything to clarify)
3) How do the migrations above correspond to DB tables (I'm using
the default sqlite3 configuration)?

Thanks
--
Tim Johnson
http://www.tj49.com
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+***@googlegroups.com.
To post to this group, send email to django-***@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/20181120164001.GI30127%40mail.akwebsoft.com.
For more options, visit https://groups.google.com/d/optout.
Shubham Rewale
2018-11-20 16:53:22 UTC
Permalink
python manage.py migrate
Then use
Python manage.py makemigrations
Post by Tim Johnson
using django on ubuntu 16.04
python 3.5.2
django.VERSION =
(2, 0, 0, 'final', 0)
Working from the Django Core book by Nigel George.
When launching
Performing system checks...
System check identified no issues (0 silenced).
You have 1 unapplied migration(s). Your project may not work
properly until you apply the migrations for app(s): admin.
Run 'python manage.py migrate' to apply them.
November 19, 2018 - 23:05:05
Django version 2.1.3, using settings 'djtest.settings'
Starting development server at http://127.0.0.1:8000/
admin
[X] 0001_initial
[X] 0002_logentry_remove_auto_add
[ ] 0003_logentry_add_action_flag_choices
auth
[X] 0001_initial
[X] 0002_alter_permission_name_max_length
[X] 0003_alter_user_email_max_length
[X] 0004_alter_user_username_opts
[X] 0005_alter_user_last_login_null
[X] 0006_require_contenttypes_0002
[X] 0007_alter_validators_add_error_messages
[X] 0008_alter_user_username_max_length
[X] 0009_alter_user_last_name_max_length
contenttypes
[X] 0001_initial
[X] 0002_remove_content_type_name
sessions
[X] 0001_initial
# It appears that 0003_logentry_add_action_flag_choices
# is not applied
1) How do I apply this feature?
2) Where is further relevant discussions or documentation on this
issue? (I've so far not found anything to clarify)
3) How do the migrations above correspond to DB tables (I'm using
the default sqlite3 configuration)?
Thanks
--
Tim Johnson
http://www.tj49.com
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/20181120164001.GI30127%40mail.akwebsoft.com
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+***@googlegroups.com.
To post to this group, send email to django-***@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAO2bGcwJKgiLUrp7xx3AYYO19rz5yAQny2NcX6QmnKuJpu4Rtw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Tim Johnson
2018-11-20 19:17:06 UTC
Permalink
Post by Tim Johnson
python manage.py migrate
Then use
Python manage.py makemigrations
Thank you. That worked to apply the missing item.
Note: Had tried that in the past but reversed the sequence of the
two commands.

Have a great day Shubham
Post by Tim Johnson
Post by Tim Johnson
using django on ubuntu 16.04
python 3.5.2
django.VERSION =
(2, 0, 0, 'final', 0)
Working from the Django Core book by Nigel George.
When launching
<...> For more options, visit https://groups.google.com/d/optout.
--
Tim Johnson
http://www.tj49.com
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+***@googlegroups.com.
To post to this group, send email to django-***@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/20181120191706.GJ30127%40mail.akwebsoft.com.
For more options, visit https://groups.google.com/d/optout.
Joel Mathew
2018-11-20 19:23:39 UTC
Permalink
makemigrations should come before migrate. You cant migrate without
creating the migrations first.
Sincerely yours,

Joel G Mathew
Post by Tim Johnson
Post by Tim Johnson
python manage.py migrate
Then use
Python manage.py makemigrations
Thank you. That worked to apply the missing item.
Note: Had tried that in the past but reversed the sequence of the
two commands.
Have a great day Shubham
Post by Tim Johnson
Post by Tim Johnson
using django on ubuntu 16.04
python 3.5.2
django.VERSION =
(2, 0, 0, 'final', 0)
Working from the Django Core book by Nigel George.
When launching
<...> For more options, visit https://groups.google.com/d/optout.
--
Tim Johnson
http://www.tj49.com
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/20181120191706.GJ30127%40mail.akwebsoft.com
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+***@googlegroups.com.
To post to this group, send email to django-***@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAA%3Diw_-%3DZ%3DM3rX_w6N-HLHqj-LkdJxzAhg9v7V6wifrMMEY6wQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Tim Johnson
2018-11-20 20:13:24 UTC
Permalink
Post by Joel Mathew
makemigrations should come before migrate. You cant migrate without
creating the migrations first.
Now I am being confused:

The sequence that Joel suggests did not work for me.
(I tried it before opening this thread)

The reverse sequence that was suggested by Shubham Rewale
did fully apply the migration.

Which is correct?
--
Tim Johnson
http://www.tj49.com
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+***@googlegroups.com.
To post to this group, send email to django-***@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/20181120201324.GK30127%40mail.akwebsoft.com.
For more options, visit https://groups.google.com/d/optout.
Joel Mathew
2018-11-20 20:15:08 UTC
Permalink
Yes, for your special case where you seem to have a pre-existing migration,
you dont need makemigrations before migrate. I was just commenting that
this is not the usual case.

Sincerely yours,

Joel G Mathew
Post by Tim Johnson
Post by Joel Mathew
makemigrations should come before migrate. You cant migrate without
creating the migrations first.
The sequence that Joel suggests did not work for me.
(I tried it before opening this thread)
The reverse sequence that was suggested by Shubham Rewale
did fully apply the migration.
Which is correct?
--
Tim Johnson
http://www.tj49.com
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/20181120201324.GK30127%40mail.akwebsoft.com
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+***@googlegroups.com.
To post to this group, send email to django-***@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAA%3Diw_-_35s-zzkB77YUHttjuUU4mMjvkC7r3HDAfyCOFg_g2A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Joel Mathew
2018-11-20 20:16:25 UTC
Permalink
Anyway, there is no point running `makemigrations` after `migrate` is run.
That doesnt do anything, unless you have made a change in your models after
your migrate is done
Sincerely yours,

Joel G Mathew
Post by Joel Mathew
Yes, for your special case where you seem to have a pre-existing
migration, you dont need makemigrations before migrate. I was just
commenting that this is not the usual case.
Sincerely yours,
Joel G Mathew
Post by Tim Johnson
Post by Joel Mathew
makemigrations should come before migrate. You cant migrate without
creating the migrations first.
The sequence that Joel suggests did not work for me.
(I tried it before opening this thread)
The reverse sequence that was suggested by Shubham Rewale
did fully apply the migration.
Which is correct?
--
Tim Johnson
http://www.tj49.com
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/20181120201324.GK30127%40mail.akwebsoft.com
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+***@googlegroups.com.
To post to this group, send email to django-***@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAA%3Diw_8%2Bxqoi12Gf2anpbe_O9A0njvHFn9GgHeeka3sqCZJP4g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Tim Johnson
2018-11-20 21:08:05 UTC
Permalink
Post by Joel Mathew
Yes, for your special case where you seem to have a pre-existing migration,
you dont need makemigrations before migrate. I was just commenting that
this is not the usual case.
Thank you.
Post by Joel Mathew
Post by Tim Johnson
Post by Joel Mathew
makemigrations should come before migrate. You cant migrate without
creating the migrations first.
The sequence that Joel suggests did not work for me.
(I tried it before opening this thread)
The reverse sequence that was suggested by Shubham Rewale
did fully apply the migration.
Which is correct?
--
Tim Johnson
http://www.tj49.com
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/20181120201324.GK30127%40mail.akwebsoft.com
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAA%3Diw_-_35s-zzkB77YUHttjuUU4mMjvkC7r3HDAfyCOFg_g2A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
Tim Johnson
http://www.tj49.com
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+***@googlegroups.com.
To post to this group, send email to django-***@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/20181120210805.GL30127%40mail.akwebsoft.com.
For more options, visit https://groups.google.com/d/optout.
Pekka Malila
2018-11-20 19:19:00 UTC
Permalink
hi admin

you hope you doing well

thanks for contacting me

i really was a wonderfull day on your office

i hope we can talk together again

vanessa
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+***@googlegroups.com.
To post to this group, send email to django-***@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAErbCvBAv2ySGf5xz3Q-o8QRN2%3DEh4qEp2%3DwBSszoCdnjSPwLQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Loading...