Skip to content

Conversation

OdenTakashi
Copy link
Contributor

@OdenTakashi OdenTakashi commented Sep 24, 2025

Problem

In a multi-database environment, it can be confusing to determine which database a model's table belongs to just by looking at the schema annotations. This can lead to developers mistakenly thinking a table is missing when it simply resides in a different database.

Solution

This commit introduces a new line in the schema information block that conditionally displays the database name.

  • In multi-database environments, the database name is now shown to provide clarity:
# == Schema Information
#
# Table name: tasks
# Database name: second_database
#
# ...
  • In single-database environments, the database name is not displayed to avoid unnecessary clutter.

Refs #254

I really enjoy contributing to this gem and hope to contribute even more.
Thank you for always maintaining it! 👍

## Problem

In a multi-database environment, it can be confusing to determine which
database a model's table belongs to just by looking at the schema
annotations. This can lead to developers mistakenly thinking a table
is missing when it simply resides in a different database.

## Solution

This commit introduces a new line in the schema information block that
conditionally displays the database name.

- In multi-database environments, the database name is now shown to
provide clarity:

# == Schema Information
#
# Table name: tasks
# Database name: second_database
#
# ...

- In single-database environments, the database name is not displayed
to avoid unnecessary clutter.

Refs drwl#254
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant