-
Notifications
You must be signed in to change notification settings - Fork 252
Database
Once the installation is finished and you are able to see the Login-Form, you can continue with bootstrapping the databases. PATHFINDER requires two databases to work. The main database and the Static Data Export from CCP.
When you are updating your existing DB, make sure there is a backup made before!
The Setup Dashboard is enabled by default and will help you setting up and update your databases. Open the dashboard in your browser www.[YOUR_DOMAIN]/setup
.
- You can´t break anything in here! :) There are just "create" and "update" functions available. There is no delete/drop function implemented! You can run the Setup process at any time you want, even multiple times. It will just check for updates. If everything is fine, the setup process will not delete or rebuild anything!
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 as SESSION Config Options
Now we will create all the necessary tables and columns. All tables are created out of their 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,....). To create all missing tables/or columns, click the "Setup tables" button. (This could take some time,....). 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 constraints
are 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.
You also need to import the Eve SDE into the database specified in the DB_CCP_* settings. This can not automatically be done by the Dashboard. You should do it manually like this:
wget https://www.fuzzwork.co.uk/dump/mysql-latest.tar.bz2
tar xf mysql-latest.tar.bz2
cd vanguard-[..] // go to the extracted folder
mysql -u root -p -e "create database vanguard"; // Create the SDE database.
mysql -u root -p __DATABASE_NAME__ < db_file.sql // Upload the sql file. It might be named like "mysql56-vanguard-[...].sql", Also replace "root" with your mysql user.
You don´t have to import all tables into your DB! PATHFINDER requires only the following:
- invTypes
- mapConstellations
- mapDenormalize
- mapLocationWormholeClasses
- mapRegions
- mapSolarsystems
When you are done, reload the Dashboard again and check if both databases are green! - Connection is established, all Tables exist and all the indexes/unique keys/columns/column types and foreign-key-constraints exists...