Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

We now use elmo-lib and nashvegas; how to update your clone

13 views
Skip to first unread message

Staś Małolepszy

unread,
May 26, 2011, 5:26:06 PM5/26/11
to tools-elmo
Hi,

I've pushed the changes from the following bugs:

Bug 658322 - Use elmo-lib as a submodule in vendor-local
https://bugzilla.mozilla.org/show_bug.cgi?id=658322

Bug 548298 - set up database migrations with nashvegas
https://bugzilla.mozilla.org/show_bug.cgi?id=548298

Next time you pull from origin/develop, you will need to follow the
steps below to get you fully updated:

1. git pull origin develop

2. git submodule update --init --recursive

Assuming that you had previously set up schematic in
migrations/settings.py, you now need to remove these settings.
Otherwise, nashvegas will complain about non-migration files in
migrations/.

3. rm migrations/settings.py*

If you have a recent DB dump, you need to tell nashvegas that some of
the migrations are already accounted for in the schema that you have.
As of today, May 26th, the latest migration is #0002.

If you're from the future, you might need to adjust the seed to make
things work.

If you don't have any DB dump to work with, just skip this step.

4. ./manage.py upgradedb --path migrations --seed 0002

In order to test things out, you can run the update_site script. From
now on, this should be to only thing that you'll need to do to update
your clone. The script will take care of pulling from origin, updating
the submodules and running the migrations.

5. ./scripts/update_site.py -e dev

(Note: The zeroth migration (#0000) is actually the initial DB schema,
so even if you're starting with a fresh DB, there's no need to run
syncdb at all. Migrations will get you started just fine. I've
updated https://github.com/mozilla/elmo/wiki/Running-locally to reflect
that.)

Due to the way we;ve set up our settings (inside a settings/
directory), whenever you run nashvegas's upgradedb command, you must
specify the path to the migrations directory:

./manage.py upgradedb --path migrations --{create,list,execute}

Otherwise, nashvegas defaults to the dir containing the settings
module, which for us is settings/ (because of __init__.py), and not the
root directory.

Ask in #elmo or in this thread if you run into any troubles.

-stas


--
Staś Małolepszy
+48 600 462 291

0 new messages