-
Notifications
You must be signed in to change notification settings - Fork 264
Filling the Database
If you set up your development environment for the first time, bin/setup
will offer you to do all of this automatically for you.
If you already have an environment set up, you can also use bin/seed
to execute all of the steps described below.
bin/seed # All in one
bin/seed download # Step 1
bin/seed import db # Step 2
bin/seed reindex # Step 3
bin/seed clean # Remove the downloaded db dump
-
Download our media database dump (Dumped weekly)
-
Import the dump to your database:
gzcat latest.sql.gz | bin/psql kitsu_development
-
Set up Elasticsearch:
bin/rake chewy:reset
Run the following to create the database and load structure.sql into it to get started:
$ bundle exec rake db:create db:structure:load
Create an account with one of the staff emails. The confirmation email should be automatically opened in your default browser; if this fails, you can find it in tmp/letter_opener
.
Go to /kotodama
and enter id numbers from MyAnimeList into the "MAL Import" section to have them created automatically. Some of the ones with lots of characters and voice actors may time out: if this happens, you can use bundle exec rails console
and run the following:
require 'mal_import'
Anime.create_or_update_from_hash MALImport.new(:anime, 123456).metadata
If you want to import Manga, replace all the "anime" with "manga" in that line.
Go to /kotodama/rails_admin
. This will let you edit the database directly.
General
› Contributing
› License
Local Setup
› Docker
› Binstubs
› Filling the Database
API Usage
› JSON:API (on Apiary.io)
› JSON:API (WIP rewrite of docs)
› GraphQL (Pre-Production)