We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I followed this tutorial and everything worked fine. I managed to work with relations on MySQL db.
In my use case, i had to add another datasource based on Mongo and i had a bug while migrating
Unable to migrate models not associated with this data source
i had to translate it from french, the original text is
Impossible de migrer les modèles non associés à cette source de données
i digged a little in RepositoryMixin class, and found out that the problem came from migrateSchema method
RepositoryMixin
migrateSchema
i overrided the method (copy past x) ) and changed
for (const b of dsBindings) { const ds = await this.get(b.key); if (operation in ds && typeof ds[operation] === 'function') { debug('Migrating dataSource %s', b.key); await ds[operation](options.models); } else { debug('Skipping migration of dataSource %s', b.key); } }
to
for (const b of dsBindings) { const ds = await this.get(b.key); // console.log(ds); // @ts-ignore if (operation in ds && typeof ds[operation] === 'function') { console.log('Migrating dataSource %s', b.key); // @ts-ignore if (!options?.models || options?.models.length === 0) { // @ts-ignore await ds[operation](options.models); } else { const models = []; for (const model of options?.models) { // @ts-ignore if (Object.keys(ds.definitions).includes(model)) { models.push(model); } } // @ts-ignore await ds[operation](models); } } else { // debug('Skipping migration of dataSource %s', b.key); } }
i hope this bug will be fixed soon
The text was updated successfully, but these errors were encountered:
duplicate of loopbackio/loopback-next#5479
Sorry, something went wrong.
No branches or pull requests
I followed this tutorial and everything worked fine. I managed to work with relations on MySQL db.
In my use case, i had to add another datasource based on Mongo and i had a bug while migrating
i had to translate it from french, the original text is
i digged a little in
RepositoryMixin
class, and found out that the problem came frommigrateSchema
methodi overrided the method (copy past x) ) and changed
to
i hope this bug will be fixed soon
The text was updated successfully, but these errors were encountered: