Skip to content

Database

Mark Friedrich edited this page Jul 20, 2018 · 11 revisions

1. Setup DB pathfinder

Scroll down to the "Database" section. You should see something like this:

Create a new MySQL database, named "pathfinder" and add/edit app/environment.ini with your DB access data. Refresh the dashboard and check if Pathfinder is now able to connect to it. You should something like this:

Pathfinder shows some important DB configuration settings and compares them with the current requirements. If some of the values are orange, they fail the check. This is not a big problem! With the next steps, Pathfinder automatically tries to fix problems and set some configuration values like SESSION Config Options

Now we will create all the necessary tables and columns. All tables are created from their related PHP-Model Classes. This ensures that further changes can be applied to your database (e.g. new columns, new tables, changed column type, new indexes, new foreign keys,....). In order to create all missing tables/or columns, click the "Setup tables" button. (This could take some seconds,....). When finished, the page will reload and it should look like this:

All tables and columns should be created (check the green "Hook")! The "battery" icon gives you some information whether a table is empty or not. Some tables are auto-filled with some static data. Some of the tables still have a orange "exclamation mark". That´s fine for now! When you check the table details, you will see that foreign key constraintsare not generated. We must be sure, that all tables are created first before adding/updating those keys.

To add/update all keys, click the "Fix columns/keys" button. This will create all the necessary keys for you. Do not add the keys manually. Pathfinder will check the naming of those keys. (You can see all the queries for key generation in the list). Page refreshes again, and should like this:

That´s it! You are done with the first Database.


2. Setup DB eve_universe

Scroll down to the "Database" section. Do the same steps for eve_universe DB

  1. Press "Setup tables" button
  2. Press "Fix columns/keys" button

3. Import initial eve_universe.sql DB dump

While eve_universe DB works as a cache DB that holds static EVE universe data (like systems, stargates, ...), load from ESI API calls, there is still an initial SQL dump file required that fills up some tables.

Then Pathfinder tries to keep data in this DB up2data and syncs static data over ESI. This initial SQL dump is part of the repository: export/sql/eve_universe.sql.zip

Hint: Since v1.4.0 Pathfinder had full ESI API support. All static data is loaded over ESI and cached in eve_universe DB. → The old SDE DB is no longer needed.

Import the initial eve_universe dump can not be done by the dashboard. You have to do this manually:

  1. Get into the "export/sql" folder
    $ cd export/sql
  2. Unzip "eve_universe.sql.zip"
    $ unzip eve_universe.sql.zip
  3. import "eve_universe.sql" → eve_universe DB (replace user 'root'!)
    $ mysql -u root -p eve_universe < eve_universe.sql

When done, reload the dashboard page and check if both databases are green! - DB connection is established, all Tables exist and all the indexes/unique keys/columns/column types and foreign-key-constraints exist. eve_universe DB should have data loaded (check battery icons).

Clone this wiki locally