Ability to re-use an existing database table for the MasterTableTenancy strategy #3137
Unanswered
cdunnkiplot
asked this question in
General
Replies: 1 comment 1 reply
-
@cdunnkiplot If you want, I'd be happy to take a pull request for that. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I have a multi-tenant service that is already using an existing tenant master table that contains the tenant identifier and connection string. I added Marten v7.5 and tried to configure the master table tenant strategy but I found the MasterTableTenancyOptions would not let me configure it to use my existing database table. Currently, it only allows you to configure the SchemaName.
Here is my existing master table schema definition:
As a result, I've had to copy your MasterTableTenancy class into my solution and refactor it so that the datatable table name and columns match the existing master table I already have. My implementation is naive as I've just the hard coded table and column names but so far this works well for me.
I am raising this issue to please ask whether the MasterTableTenancy and MasterTableTenancyOptions can be enhanced to allow users to further configure the database schema for this master table. As well as the db schema, it'd be useful to allow users to configure the table name and column names.
Beta Was this translation helpful? Give feedback.
All reactions