Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The same Table name on different schemas on MSSQL #631

Open
Morbraki opened this issue Dec 13, 2022 · 1 comment
Open

The same Table name on different schemas on MSSQL #631

Morbraki opened this issue Dec 13, 2022 · 1 comment

Comments

@Morbraki
Copy link

When using the sequelize-auto command to create the objects from the Databank and there's a Table name doubled in different schemas like dbo.dataStatus and example.dataStatus, the generator first creates the dbo one and then override it with the one from the cloud. So my Question is, if there is a way, to let the generator write the schema in the object name. So instead overriding dataSatus create for example dbo_dataStatus and cloud_dataStatus?

@csbrown
Copy link

csbrown commented Aug 30, 2023

I am not currently having this issue, but looked around because we do have lots of schemas and the possibility of overlap in the future is not vanishing.

Since there doesn't seem to be anything baked in, I suspect that you could roll-your-own with the --schema option, combined with the directory option, to auto-sequelize each schema individually into different model directories. Then you would have a DataStatus in /dist/models/dbo and a DataStatus in /dist/models/cloud. I haven't actually tried to implement this, but this seems viable.

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

No branches or pull requests

2 participants