Page:
collection
12
collection
Timothy Warren edited this page 2022-03-04 12:40:14 -05:00
Table of Contents
Anime Collection Setup
Because the anime collection can use more than one type of database, the setup is a bit more complex than other features to setup.
Unfortunately, at this point, this means putting the database connection information in two places:
app/config/database.toml
- tells Hummingbird how to connect to the databasephinx.yml
- tells the Database migration tool how to connect to the database
Hummingbird Config
See Configuration Page for more information
Phinx Config
- Copy the
phinx.yml.dist
example config tophinx.yml
, which has a development sqlite setup - Update the
phinx.yml
file based on the instructions here
Example sqlite config:
paths:
migrations: '%%PHINX_CONFIG_DIR%%/migrations'
environments:
default_migration_table: phinxlog
default_database: production
production:
adapter: sqlite
name: ./anime_collection # Will create anime_collection.sqlite3 file
Setup steps
- Create phinx and Hummingbird config files
- Install phinx in the
tools/phinx
folder by runningcomposer install
- Run the migrations. Based on the example file above, you'd run:
./tools/phinx/vendor/bin/phinx migrate -e production
Importing Anime:
- Login
- Click the
[ Add Item ]
link on the Anime Collection page - Enter the name of the anime you wish to add, and select the appropriate search result
- Save & Repeat as needed