Skip to content

Feature request: support for multi database #188

@drwl

Description

@drwl

Adding this as a feature request and an invitation for anyone that wants to try tackling this. At the moment, I do not have time to work on this.

From ctran/annotate_models#892

Given a Rails application with multiple databases, tables in two databases with the same table name, and corresponding models with different names, some files get annotated with the wrong table's schema.

The issue is that some of the patterns include %TABLE_NAME%, which will be identical between the two tables, even though they have different model names.

This fixes the issue by eliminating the use of the table name when the model is not connected to the primary database.

My work in progress before I decided to close the PR, #135

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions