Updated rst files to wiki.
This commit is contained in:
parent
1995f61d46
commit
0af6dff175
2 changed files with 96 additions and 35 deletions
|
|
@ -2,60 +2,121 @@ Updating your Game
|
||||||
==================
|
==================
|
||||||
|
|
||||||
Fortunately, it's extremely easy to keep your Evennia server up-to-date
|
Fortunately, it's extremely easy to keep your Evennia server up-to-date
|
||||||
via Subversion. If you haven't already, see the `Getting Started
|
via Mercurial. If you haven't already, see the `Getting Started
|
||||||
guide <GettingStarted.html>`_ and get your installation up. You'll then
|
guide <GettingStarted.html>`_ and get everything running. There are many
|
||||||
want to join the `Evennia Commit
|
ways to get told when to update: You can subscribe to the RSS feed or
|
||||||
Log <http://groups.google.com/group/evennia-commits/>`_ group. This will
|
manually check up on the feeds from
|
||||||
notify you via email whenever updates are made to the source in the
|
`http://www.evennia.com. <http://www.evennia.com.>`_ You can also join
|
||||||
Subversion repository, letting you know you need to update. You can also
|
the `Evennia Commit
|
||||||
subscribe to the RSS feed or check up on the feeds from
|
Log <http://groups.google.com/group/evennia-commits/>`_ group, which
|
||||||
`http://www.evennia.com. <http://www.evennia.com.>`_ When you're wanting
|
will send you an email when the server repository changes.
|
||||||
to apply updates, simply ``cd`` to your ``evennia`` root directory and
|
|
||||||
type:
|
|
||||||
|
|
||||||
``svn update``
|
When you're wanting to apply updates, simply ``cd`` to your ``evennia``
|
||||||
|
root directory and type:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
hg pull
|
||||||
|
|
||||||
Assuming you've got the command line client. If you're using a graphical
|
Assuming you've got the command line client. If you're using a graphical
|
||||||
client, you will probably want to navigate to the ``evennia`` directory
|
client, you will probably want to navigate to the ``evennia`` directory
|
||||||
and either right click and find your client's update function, or use
|
and either right click and find your client's pull function, or use one
|
||||||
one of the menus (if applicable).
|
of the menus (if applicable).
|
||||||
|
|
||||||
You can review the latest changes with
|
You can review the latest changes with
|
||||||
|
|
||||||
``svn log``
|
::
|
||||||
|
|
||||||
or the equivalent in the graphical client. You can also see the latest
|
hg log
|
||||||
changes online `here <http://code.google.com/p/evennia/source/list>`_.
|
|
||||||
|
or the equivalent in the graphical client. The log tends to scroll past
|
||||||
|
quite quickly, so if you are in linux it might be an idea to *pipe* the
|
||||||
|
output to a text reader like ``less``
|
||||||
|
(`here <http://mercurial.selenic.com/wiki/PagerExtension>`_ is a more
|
||||||
|
permanent solution):
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
hg log | less
|
||||||
|
|
||||||
|
You can also see the latest changes online
|
||||||
|
`here <http://code.google.com/p/evennia/source/list>`_.
|
||||||
|
|
||||||
|
Resetting your database
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
Should you ever want to start over completely from scratch, there is no
|
||||||
|
need to re-download Evennia or anything like that. You just need to
|
||||||
|
clear your database. Once you are done, you just rebuild it from scratch
|
||||||
|
as described in step 2 of the `Getting Started
|
||||||
|
guide <GettingStarted.html>`_.
|
||||||
|
|
||||||
|
If you run the default ``SQlite3`` database (to change this you need to
|
||||||
|
edit your ``settings.py`` file), the database is actually just a normal
|
||||||
|
file in ``game/`` called ``evennia.db3``. Simply delete that file -
|
||||||
|
that's it.
|
||||||
|
|
||||||
|
Regardless of which database system you use, you can reset your database
|
||||||
|
via ``game/manage.py``. Since Evennia consists of many separate
|
||||||
|
components you need to clear the data from all of them:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
python manage.py reset objects players scripts comms help web auth
|
||||||
|
|
||||||
|
Django also offers an easy way to start the database's own management
|
||||||
|
should we want more direct control:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
python manage.py dbshell
|
||||||
|
|
||||||
|
In e.g. MySQL you can then do something like this (assuming your MySQL
|
||||||
|
database is named "Evennia":
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
mysql> DROP DATABASE Evennia;
|
||||||
|
mysql> exit
|
||||||
|
|
||||||
A Note on Schema Migration
|
A Note on Schema Migration
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
Database migration becomes an issue when/if the database models of
|
If and when an Evennia update modifies the database *schema* (that is,
|
||||||
Evennia changes in an update (this should be gradually more and more
|
the under-the-hood details as to how data is stored in the database),
|
||||||
rare as Evennia matures). If you already have a database, this then has
|
you must update your existing database correspondingly to match the
|
||||||
to be updated to match the latest server version or you are likely to
|
change. If you don't, the updated Evennia will complain that it cannot
|
||||||
run into trouble down the line.
|
read the database properly. Whereas schema changes should become more
|
||||||
|
and more rare as Evennia matures, it may still happen from time to time.
|
||||||
|
|
||||||
One way to solve this is to manually add/remove the new tables or fields
|
One way to handle this is to apply the changes manually to your database
|
||||||
to your existing database (or simply reset your database if you don't
|
using the database's command line. This often means adding/removing new
|
||||||
have anything important in it yet). Enter
|
tables or fields as well as possibly convert existing data to match what
|
||||||
`South <http://south.aeracode.org/>`_. South is a Django database schema
|
the new Evennia version expects. It should be quite obvious that this
|
||||||
migration tool. It keep tracks of changes in the database schema and
|
quickly becomes cumbersome and error-prone. If your database doesn't
|
||||||
applies those changes to the database for you.
|
contain anything critical yet iẗ́'s probably easiest to simply reset it
|
||||||
|
and start over rather than to bother converting.
|
||||||
|
|
||||||
Using South is optional, but if you install South, Evennia will use it
|
Enter `South <http://south.aeracode.org/>`_. South keeps track of
|
||||||
automatically. See correct section of
|
changes in the database schema an applies them automatically for you.
|
||||||
|
Basically, whenever the schema changes we tell South exactly how to
|
||||||
|
repeat that change so you don't have to.
|
||||||
|
|
||||||
|
Using South is optional, but if you install it, Evennia *will* use South
|
||||||
|
automatically. See the correct section of
|
||||||
`GettingStarted <GettingStarted.html>`_ on how to install South and the
|
`GettingStarted <GettingStarted.html>`_ on how to install South and the
|
||||||
slightly changed way to start a clean database server when South is used
|
slightly different way to start a clean database server when South is
|
||||||
(you have to give the ``mange.py migrate`` command as well as
|
used (you have to give the ``mange.py migrate`` command as well as
|
||||||
``manage.py syncdb``).
|
``manage.py syncdb``).
|
||||||
|
|
||||||
Once you have a database ready to use South, you work as normal.
|
Once you have a database ready and using South, you work as normal.
|
||||||
Whenever a new Evennia update tells you that the database schema has
|
Whenever a new Evennia update tells you that the database schema has
|
||||||
changed (check ``svn log`` or the online list), you go to ``game/`` and
|
changed (check ``hg log`` or the online list), you go to ``game/`` and
|
||||||
run this command:
|
run this command:
|
||||||
|
|
||||||
``python manage.py migrate``
|
::
|
||||||
|
|
||||||
|
python manage.py migrate
|
||||||
|
|
||||||
This will convert your database to the new schema and you should be set
|
This will convert your database to the new schema and you should be set
|
||||||
to go.
|
to go.
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ class Object(BaseObject):
|
||||||
at_server_reload() - called when server is reloading
|
at_server_reload() - called when server is reloading
|
||||||
at_server_shutdown() - called when server is resetting/shutting down
|
at_server_shutdown() - called when server is resetting/shutting down
|
||||||
"""
|
"""
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
class Character(BaseCharacter):
|
class Character(BaseCharacter):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue