Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data migration script from Ella 2.x to cleanup branch (3.x) #53

Closed
whit opened this issue Jan 17, 2012 · 11 comments
Closed

Data migration script from Ella 2.x to cleanup branch (3.x) #53

whit opened this issue Jan 17, 2012 · 11 comments

Comments

@whit
Copy link
Member

whit commented Jan 17, 2012

When models in cleanup branch to be a bit stable, create external script to migrate data.

  • aricle contents ( and markup source texts update) -> article
  • placement -> publishable (with "published" bool)
@xaralis
Copy link
Member

xaralis commented Jan 20, 2012

We can provide migration for multiple contents.

Can @honzakral do the same for publishable-placement merge?

@xaralis
Copy link
Member

xaralis commented Jan 27, 2012

There is already a migration for articlecontents in cleanup branch, I just polished other migrations a bit (removed old CH specific), see 1995558.

@honzakral
Copy link
Member

the old one wasn't CH specific and was needed for migrations to run.

I am 100% for removing all the migrations and starting with just inital ones (newly created).

I added the publishable-placement migrations to core, those should work or at least provide a good starting point to fix those.

@xaralis
Copy link
Member

xaralis commented Jan 31, 2012

Why do we need migrations like core/migrations/0002_03_move_publishable_data.py ? I don't see any reason for keeping them. I thought we would only provide migrations from 2.0.0 version which is expected to have all of these done already.

@honzakral
Copy link
Member

we are using the code, without this migration the code will not run, syncdb & migrate will produce incorrect table. Either we remove all the migrations and chacne the initial one to reflect current state or we need this migration.

@xaralis
Copy link
Member

xaralis commented Jan 31, 2012

And why is that so? We should create initial migrations from the state of proposals/2.1.0 branch and than aditional migrations all the way up to the state of current cleanup branch. If we create the initials from 2.1.0, there should be no problems with incorrect tables.

@honzakral
Copy link
Member

yes, but until we do so, we need this one migration :)

@xaralis
Copy link
Member

xaralis commented Jan 31, 2012

Ok, i'll try to work on this during the day. Now doing the same thing for galleries..

@xaralis
Copy link
Member

xaralis commented Jan 31, 2012

Done :) Initial migrations for following apps now capture state of master branch and following migrations only contain changes in cleanup branch:

  • articles
  • core
  • photos

This means that migration from 2.1.0 should be possible by something like:

echo "TRUNCATE TABLE south_migrationhistory;" | django-admin.py dbshell
django-admin.py migrate 0001 --fake
django-admin.py migrate

@xaralis
Copy link
Member

xaralis commented Jan 31, 2012

Closing the issue as it seems to be resolved. Migrations for Ella plugins should be discussed in their own repo issue lists.

@xaralis xaralis closed this as completed Jan 31, 2012
@honzakral honzakral reopened this Jan 31, 2012
@honzakral
Copy link
Member

hmm, except articles which are completely unusable with initial migration unchanged and the important migrations removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants