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

Data-store migrations don't support entityPrefix #724

Closed
rkreutzer opened this issue Oct 20, 2021 · 0 comments · Fixed by #725
Closed

Data-store migrations don't support entityPrefix #724

rkreutzer opened this issue Oct 20, 2021 · 0 comments · Fixed by #725
Labels
bug Something isn't working

Comments

@rkreutzer
Copy link
Contributor

Bug severity
3

Describe the bug
My TypeORM connection is using the entityPrefix parameter to prepend characters to the database table names, so as not to confuse with other tables in the system. After moving to v3 and using the migrations approach in the database connection, new, empty tables are created without the entity prefix, as well as the private_key table.

My workaround was to hard-code the prefix on all table names in the migrations code.

To Reproduce
Steps to reproduce the behaviour:

  1. On an existing app that was running v2 using an entityPrefix on the database connection, bump to v3 and use migrations

Observed behaviour
A new set of database tables are created, alongside the tables that have the entity prefix. Also, the private_key table is created without the entity prefix.

Expected behaviour
The entityPrefix should be prepended to all tables in the migrations files.

Versions (please complete the following information):

  • Veramo: 3.0
  • Ionic/angular/capacitor app
  • Node Version 14.16.1
@rkreutzer rkreutzer added the bug Something isn't working label Oct 20, 2021
mirceanis added a commit that referenced this issue Oct 25, 2021
* fix(data-store): add support for db ConnectionOptions with entityPrefix

fixes #724

* chore: use different infuraProjectId in tests

* docs(core): simplify type definitions for VC/VP and link to spec

* fix: private key migration

Co-authored-by: Simonas Karuzas <simonas@not.cat>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant