Create first class database management APIs in hanami-db

Open
#9 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
postgresql
Domain
cli, database

Research direction

Start by tracing the database-management commands in Hanami-CLI and the existing Hanami DB boundaries. Compare the current shell-outs to database client CLIs, including createdb for PostgreSQL, and define the public operations that the CLI should delegate to. Done means database creation, migration, and deletion are exposed by Hanami DB while the CLI commands remain thin.

Written by the indexing model from the issue text.

Description

Right now all the methods for creating, migrating, deleting, etc. databases are spread across the various commands in Hanami-CLI.

We should make these real public APIs in the Hanami DB gem, and keep the db commands in the CLI as slim as possible, simply calling into these APIs.

At th same time time, we should look at directly talking to the database engine where possible, rather than shelling out to the database client CLIs (eg calling createdb and friends in Postgres’ case). Wrapping the ClIs is brittle, error prone and overly complicated to implement.

Dominant language
No language data
Stars
3
Forks
0
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from hanami/roadmap

All issues in hanami/roadmap

Similar issues

More CLI issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.