Error: Cannot migrate models not attached to this datasource: CoffeeShop
Followed the LB3 getting started but encountered above error...
datasource.js
"localDs": {
"host": "127.0.0.1",
"port": 3306,
"url": "",
"database": "demo",
"password": "...",
"name": "localDs",
"user": "...",
"connector": "mysql"
}
}
model-config.js
"Coffeeshop": {
"dataSource": "localDs",
"public": true
}
@pizza-hut, a quick question, do you have the database demo created? The database migration script expects the database exist and creates the table. Thanks.
FYI - Not sure if you're just starting out using LoopBack, if yes, I'd strongly recommend you to use LoopBack 4. LoopBack 4 is the current release, where LoopBack 3 will go end of life in Dec 2020. Also, LoopBack 4 has better extensibility and with more updated technology stacks.
To get started with LoopBack 4, please try https://loopback.io/doc/en/lb4/todo-tutorial.html.
Hi
Noted your advice on LB3 EOL.
Yes I do have the db. Very strange.
On 2 Apr 2020, at 8:55 AM, Diana Lau [email protected] wrote:
@pizza-hut, a quick question, do you have the database demo created? The database migration script expects the database exist and creates the table. Thanks.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository.