When you run makemigrations command, Django will compare your current model
module with the newest migration module. You should have a look at your
0002_signup_updated... file to find out what cause the problem.
On Thursday, January 28, 2016 at 3:21:16 AM UTC+8, ofeyofey wrote:
>
> Hi,
> I forgo
On Wednesday, 27 January 2016 21:29:18 UTC, ofeyofey wrote:
>
> No problem. Thanks for your help.
> Maybe fields can't be added to a model with django.
> I will try dropping the table in the DB and see what happens.
> Thanks again,
>
Adding fields to models is quite literally what migrations are f
Alas too late... I have dropped the table.
But this link http://www.djangobook.com/en/2.0/chapter10.html
to a Django Book for version 1.0 may hold some ideas under the section
about adding fields.
Thanks
On Wednesday, 27 January 2016 19:21:16 UTC, ofeyofey wrote:
>
> Hi,
> I forgot to add a field
You should try running it as root.
On Thu, Jan 28, 2016 at 8:29 AM, ofeyofey wrote:
> No problem. Thanks for your help.
> Maybe fields can't be added to a model with django.
> I will try dropping the table in the DB and see what happens.
> Thanks again,
>
> On Wednesday, 27 January 2016 19:21:16
No problem. Thanks for your help.
Maybe fields can't be added to a model with django.
I will try dropping the table in the DB and see what happens.
Thanks again,
On Wednesday, 27 January 2016 19:21:16 UTC, ofeyofey wrote:
>
> Hi,
> I forgot to add a field to a model and wish to add it now.
> I add
i dont know why sorry..try default value
Τη Τετάρτη, 27 Ιανουαρίου 2016 - 9:21:16 μ.μ. UTC+2, ο χρήστης ofeyofey
έγραψε:
>
> Hi,
> I forgot to add a field to a model and wish to add it now.
> I added the line to models.py but makemigrations and migrate aren't
> working now.
> Is this possible in
Ok I put the app name which is 'news' after the commands for makemigrations
and for migrate.
But I am still getting the same results.
On Wednesday, 27 January 2016 19:21:16 UTC, ofeyofey wrote:
>
> Hi,
> I forgot to add a field to a model and wish to add it now.
> I added the line to models.py bu
you add your app name after the run makemigration and migrate ?if your app
name is a blog then you run* makemigration blog *and *migrate blog*
Τη Τετάρτη, 27 Ιανουαρίου 2016 - 9:21:16 μ.μ. UTC+2, ο χρήστης ofeyofey
έγραψε:
>
> Hi,
> I forgot to add a field to a model and wish to add it now.
> I
Hi,
I changed the line to
updated = models.DateTimeField(auto_now_add = False, auto_now = True, null=
True)
But the same results,
[pi@Huawei-HG658c-instalacion src]$ python manage.py makemigrations
/home/pi/src/djangoTest/urls.py:20: RemovedInDjango110Warning: Support for
string view argumen
work now ?
Τη Τετάρτη, 27 Ιανουαρίου 2016 - 9:21:16 μ.μ. UTC+2, ο χρήστης ofeyofey
έγραψε:
>
> Hi,
> I forgot to add a field to a model and wish to add it now.
> I added the line to models.py but makemigrations and migrate aren't
> working now.
> Is this possible in Django or do i need to go dir
Thanks for your reply.
The model.py contains,
class SignUp(models.Model):
email = models.EmailField()
full_name = models.CharField(max_length = 120, blank = True, null =
True)
timestamp = models.DateTimeField(auto_now_add = True, auto_now = False)
updated = models.DateTimeField(
no the problem is your new field affect models rules...try the new field to
have null=True or default=somathing and then run on mynage.py makemigration
yourapp and after migrate yourapp
christos
Τη Τετάρτη, 27 Ιανουαρίου 2016 - 9:21:16 μ.μ. UTC+2, ο χρήστης ofeyofey
έγραψε:
>
> Hi,
> I forgot
What error did your get? what command did you use?
try
python manage.py makemigrations
python manage.py migrate
On Wed, Jan 27, 2016 at 11:21 AM, ofeyofey wrote:
> Hi,
> I forgot to add a field to a model and wish to add it now.
> I added the line to models.py but makemigrations and migrate are
On 3/24/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> (3) At your database prompt ("manage.py shell" and go from there),
> execute "ALTER TABLE ADD COLUMN ... DEFAULT ...", filling in the first
> "..." part with the column definition you noted before. You will also
> need to add a DEFAULT va
On Sat, 2007-03-24 at 18:04 -0700, Mark Engelberg wrote:
> I know that, unfortunately, there's no painless way to migrate all the
> data in your database when you add a new optional field to your model.
> Pity.
>
> So what is the MOST painless way to do this?
(1) Add the field to your model.
(
I think the new .96 version has a export / import data function now.
On Mar 24, 6:04 pm, "Mark Engelberg" <[EMAIL PROTECTED]> wrote:
> I know that, unfortunately, there's no painless way to migrate all the
> data in your database when you add a new optional field to your model.
> Pity.
>
> So wh
16 matches
Mail list logo