Skip to content

[IMPROVE] Allow multiple schema directories through one schema_version table #59

@zobayer1

Description

@zobayer1

TL;DR

Current implementation do not distinguish among schema files for different projects. It would be a good feature to pass a prefix/suffix name through the configuration file that can handle separate versioning for them.

Design

Proposal

  • Add a configuration field such as schema_name. If not provided, a random 4 letter string will be assigned.
  • Add a column named schema_name in schema_version table.
  • Concatenate schema_name 4 letter prefix with ID field to avoid multiple field query when searching by ID.
  • All the other queries must add schema name prefix as a where clause too.

Alternatives considered

  • Add a way to dynamically alter __tablename__ which is not a simple solution.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions