Update collection setup instructions
parent
508853ee7a
commit
3ef8c2b326
@ -3,3 +3,35 @@
|
|||||||
Because the anime collection can use more than one type of database, the 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.
|
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. Create the config file by running `./vendor/bin/phinx init .`
|
||||||
|
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: development
|
||||||
|
development:
|
||||||
|
adapter: sqlite
|
||||||
|
name: ./anime_collection.sqlite
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
## 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 development`
|
||||||
|
Loading…
Reference in New Issue
Block a user