First time here? Check out the FAQ!
1

Do you create south migration files manually for User model change?
 

Suppose you add column to User by User.add_to_class('some_field', field_type)

How do you create a migration for it?

Manually create a migration file and edit it to correctly change auth_user model?

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
pcompassion's avatar
21
pcompassion
asked 11 years ago

Comments

see more comments

1 Answer

0

We create them manually. What could help is to first create a migration for some other fully managed table and then edit the migration file and remove the dummy field from the models.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Evgeny's avatar
13.2k
Evgeny
answered 11 years ago
link

Comments

So, from this I understand that 'schemamigration askbot --auto' is not going to normally pick up a change made by adding a field with add_to_class() method?.

Andreu's avatar Andreu (10 years ago)
see more comments