Skip to content
kilogitty edited this page Sep 29, 2019 · 2 revisions

Note: This page is still being worked on

Introduction and Setup

Gazelle stores everything, from the forum, wikipages, users and torrents, in a MySQL (MariaDB) database. The engine mostly used is InnoDB, although some tables make use of MyISAM for performance reasons. For the initial setup the original WhatCD gazelle.sql file is used, you can find it in /db/data/gazelle.sql. Further changes are made using migrations using the Phinx database migration tool. The migrations can be found in /db/migrations.

Seed database

To seed the database with some testdata, you can use the torrent seeder. This will grab 20 random releases from Discogs and insert them into the database. To run this seeder, follow the steps below:

  1. SSH into vagrant: vagrant ssh
  2. go to the webfolder: cd /var/www
  3. Run the Phinx seeder: vendor/bin/phinx seed:run
  4. ????
  5. Profit!

It take a minute or two before the seeding completes. You should see them in your dev environment.

Structure

Note: If you know that the ? tables are for, please provide an explanation. Other tables are coming soon.

Torrents

  • torrents: The main table containing the individual torrents

    • torrents_peerlists: Contains currently seeding and leeching peers for a torrent
    • torrent_lossymaster_approved: Contains lossty master torrents that are approved by staff
    • torrent_cassette_approved: Contains cassette torrents that are approved by staff
    • torrents_bad_files: Contains the torrents with bad filenaming
    • torrents_bad_folders: Contains the torrents with bad folderstructures
    • torrents_bad_tags: Contains the torrents with bad or missing mp3/flac tags
    • torrents_files: Contains the files for a given torrent
    • torrents_missing_lineage: ?
  • torrents_group: This is a torrentgroup, which can have multiple torrents for different released

    • torrents_tags: contains the given tags for a torrentgroup
    • torrents_tags_votes: Contains the votes for torrentgroup tags
    • torrents_recommended: ?
    • torrents_votes: Contains the votes on a torrentgroup
    • group_log: Contains the history of a torrent or torrentgroup
  • tags: Contain all the tags ever given to a torrent or artist.

  • torrents_balance_history: ?