<li><aclass="reference internal"href="#if-you-installed-with-pip">If you installed with <codeclass="docutils literal notranslate"><spanclass="pre">pip</span></code></a></li>
<li><aclass="reference internal"href="#if-you-installed-with-git">If you installed with <codeclass="docutils literal notranslate"><spanclass="pre">git</span></code></a></li>
<li><aclass="reference internal"href="#if-you-installed-with-docker">If you installed with <codeclass="docutils literal notranslate"><spanclass="pre">docker</span></code></a></li>
<li><aclass="reference internal"href="#resetting-your-database">Resetting your database</a><ul>
<p>When Evennia is updated to a new version you will usually see it announced in the <aclass="reference external"href="https://github.com/evennia/evennia/discussions">Discussion forum</a> and in the <aclass="reference external"href="https://www.evennia.com/devblog/index.html">dev blog</a>. You can also see the changes on <aclass="reference external"href="https://github.com/evennia/evennia/blob/main/">github</a> or through one of our other <aclass="reference internal"href="../Links.html"><spanclass="doc std std-doc">linked pages</span></a>.</p>
<h2>If you installed with <codeclass="docutils literal notranslate"><spanclass="pre">pip</span></code><aclass="headerlink"href="#if-you-installed-with-pip"title="Permalink to this headline">¶</a></h2>
<p>If you followed the <aclass="reference internal"href="Installation.html"><spanclass="doc std std-doc">normal install instructions</span></a>, here’s what you do to upgrade:</p>
<olclass="simple">
<li><p>Read the <aclass="reference internal"href="../Coding/Changelog.html"><spanclass="doc std std-doc">changelog</span></a> to see what changed and if it means you need to make any changes to your game code.</p></li>
<li><p>If you use a <spanclass="xref myst">virtualenv</span>, make sure it’s active.</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">cd</span></code> to your game dir (e.g. <codeclass="docutils literal notranslate"><spanclass="pre">mygame</span></code>)</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">evennia</span><spanclass="pre">migrate</span></code> - this is safe to do, but can be skipped unless the release announcement/changelog specifically tells you to do so. <em>Ignore</em> any warnings about running <codeclass="docutils literal notranslate"><spanclass="pre">makemigrations</span></code>, it should <em>not</em> be done!</p></li>
<h2>If you installed with <codeclass="docutils literal notranslate"><spanclass="pre">git</span></code><aclass="headerlink"href="#if-you-installed-with-git"title="Permalink to this headline">¶</a></h2>
<p>This applies if you followed the <aclass="reference internal"href="Installation-Git.html"><spanclass="doc std std-doc">git-install instructions</span></a>. Before Evennia 1.0, this was the only way to install Evennia.</p>
<p>At any time, development is either happening in the <codeclass="docutils literal notranslate"><spanclass="pre">main</span></code> branch (latest stable) or <codeclass="docutils literal notranslate"><spanclass="pre">develop</span></code> (experimental). Which one is active and ‘latest’ at a given time depends - after a release, <codeclass="docutils literal notranslate"><spanclass="pre">main</span></code> will see most updates, close to a new release, <codeclass="docutils literal notranslate"><spanclass="pre">develop</span></code> will usually be the fastest changing.</p>
<olclass="simple">
<li><p>Read the <aclass="reference internal"href="../Coding/Changelog.html"><spanclass="doc std std-doc">changelog</span></a> to see what changed and if it means you need to make any changes to your game code.</p></li>
<li><p>If you use a <spanclass="xref myst">virtualenv</span>, make sure it’s active.</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">cd</span></code> to your game dir (e.g. <codeclass="docutils literal notranslate"><spanclass="pre">mygame</span></code>)</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">cd</span></code> to the <codeclass="docutils literal notranslate"><spanclass="pre">evennia</span></code> repo folder you cloned during the git installation process.</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">pip</span><spanclass="pre">install</span><spanclass="pre">--upgrade</span><spanclass="pre">-e</span><spanclass="pre">.</span></code> (remember the <codeclass="docutils literal notranslate"><spanclass="pre">.</span></code> at the end!)</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">cd</span></code> back to your game dir</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">evennia</span><spanclass="pre">migrate</span></code> - this is safe to do, but can be skipped unless the release announcement/changelog specifically tells you to do so. <em>Ignore</em> any warnings about running <codeclass="docutils literal notranslate"><spanclass="pre">makemigrations</span></code>, it should <em>not</em> be done!</p></li>
<h2>If you installed with <codeclass="docutils literal notranslate"><spanclass="pre">docker</span></code><aclass="headerlink"href="#if-you-installed-with-docker"title="Permalink to this headline">¶</a></h2>
<p>If you followed the [docker installation instructions] you need to pull the latest docker image for the branch you want:</p>
<h2>Resetting your database<aclass="headerlink"href="#resetting-your-database"title="Permalink to this headline">¶</a></h2>
<p>Should you ever want to start over completely from scratch, there is no need to re-download Evennia. You just need to clear your database.</p>
<p>First:</p>
<olclass="simple">
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">cd</span></code> to your game dir (e.g. <codeclass="docutils literal notranslate"><spanclass="pre">mygame</span></code>)</p></li>
<h3>SQLite3 (default)<aclass="headerlink"href="#sqlite3-default"title="Permalink to this headline">¶</a></h3>
<asideclass="sidebar">
<pclass="sidebar-title">Hint</p>
<p>Make a copy of the <codeclass="docutils literal notranslate"><spanclass="pre">evennia.db3</span></code> file once you created your superuser. When you want to reset (and as long as you haven’t had to run any new migrations), you can just stop evennia and copy that file back over <codeclass="docutils literal notranslate"><spanclass="pre">evennia.db3</span></code>. That way you don’t have to run the same migrations and create the superuser every time!</p>
</aside>
<olclass="simple">
<li><p>delete the file <codeclass="docutils literal notranslate"><spanclass="pre">mygame/server/evennia.db3</span></code></p></li>
<li><p>You should now follow the <aclass="reference internal"href="Choosing-a-Database.html#postgresql"><spanclass="std std-doc">PostgreSQL install instructions</span></a> to create a new evennia database.</p></li>
<h3>MySQL/MariaDB<aclass="headerlink"href="#mysql-mariadb"title="Permalink to this headline">¶</a></h3>
<ol>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">evennia</span><spanclass="pre">dbshell</span></code> (opens the mysql client interface)</p>
<h3>What are database migrations?<aclass="headerlink"href="#what-are-database-migrations"title="Permalink to this headline">¶</a></h3>
<p>If and when an Evennia update modifies the database <em>schema</em> (that is, the under-the-hood details as to how data is stored in the database), you must update your existing database correspondingly to match the change. If you don’t, the updated Evennia will complain that it cannot read the database properly. Whereas schema changes should become more and more rare as Evennia matures, it may still happen from time to time.</p>
<p>One way one could handle this is to apply the changes manually to your database using the database’s command line. This often means adding/removing new tables or fields as well as possibly convert existing data to match what the new Evennia version expects. It should be quite obvious that this quickly becomes cumbersome and error-prone. If your database doesn’t contain anything critical yet it’s probably easiest to simply reset it and start over rather than to bother converting.</p>
<p>Enter <em>migrations</em>. Migrations keeps track of changes in the database schema and applies them automatically for you. Basically, whenever the schema changes we distribute small files called “migrations” with the source. Those tell the system exactly how to implement the change so you don’t have to do so manually. When a migration has been added we will tell you so on Evennia’s mailing lists and in commit messages - you then just run <codeclass="docutils literal notranslate"><spanclass="pre">evennia</span><spanclass="pre">migrate</span></code> to be up-to-date again.</p>