From 42517d9d76599ea49c929a3bd2c9122c91823243 Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Fri, 24 Apr 2020 13:46:07 -0400 Subject: [PATCH] --- collection.md | 86 +++++++++++++++++++++++++-------------------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/collection.md b/collection.md index 97aec57..5cbcff9 100644 --- a/collection.md +++ b/collection.md @@ -1,44 +1,44 @@ -# 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 database -* `phinx.yml` - tells the Database migration tool how to connect to the database - -## Hummingbird Config - -See [Configuration Page](./configuration#databasetoml) for more information - -## Phinx Config -1. Copy the `phinx.yml.dist` example config to `phinx.yml`, which has a development sqlite setup -2. Update the `phinx.yml` file based on the instructions [here](http://docs.phinx.org/en/latest/configuration.html) - -Example sqlite config: -```yaml -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 - -1. Create phinx and Hummingbird config files -2. Run the migrations. Based on the example file above, you'd run: `./vendor/bin/phinx migrate -e production` - -## Importing Anime: - -1. Login -2. Click the `[ Add Item ]` link on the Anime Collection page -3. Enter the name of the anime you wish to add, and select the appropriate search result +# 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 database +* `phinx.yml` - tells the Database migration tool how to connect to the database + +## Hummingbird Config + +See [Configuration Page](./configuration#databasetoml) for more information + +## Phinx Config +1. Copy the `phinx.yml.dist` example config to `phinx.yml`, which has a development sqlite setup +2. Update the `phinx.yml` file based on the instructions [here](https://book.cakephp.org/phinx/0/en/configuration.html) + +Example sqlite config: +```yaml +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 + +1. Create phinx and Hummingbird config files +2. Run the migrations. Based on the example file above, you'd run: `./vendor/bin/phinx migrate -e production` + +## Importing Anime: + +1. Login +2. Click the `[ Add Item ]` link on the Anime Collection page +3. Enter the name of the anime you wish to add, and select the appropriate search result 4. Save & Repeat as needed \ No newline at end of file