-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Identifier gets discarded after running migration #4744
Comments
Looks like the bug has been fixed in PR loopbackio/loopback-connector#171 If the column name is not specified:
If the column name is specified in the property definition:
DBs have the correct column name generated. And confirmed with tests that the column name maps to the property name as expected. MySQL:
PostgreSQL:
|
Thes tests are being added to Postgres and Oracle in loopbackio/loopback-connector-postgresql#422 and loopbackio/loopback-connector-oracle#200 ( they migrate first then discover tables). And MySQL already has tests. |
Closing as done |
Current Behavior
If we run migration on model:
and check the DB:
![Screen Shot 2020-01-28 at 11 02 33 AM](https://user-images.githubusercontent.com/50331796/73281261-b0db2e00-41bd-11ea-860d-e4b77b1ea382.png)
Order
, it doesn't have the identifier:We need to specify the column setting (column name esp, should be in lowercase) for the id property to have it on the table:
so that we can have:
![image](https://user-images.githubusercontent.com/50331796/73282356-7c687180-41bf-11ea-9e57-3552f7b110b7.png)
Expected Behavior
There is no documentation on that ( in LB4 at least).
Should:
Additional information
So far the issue occurs when using MySQL or PostgreSQL as datasource.
Might have something to do with the function
and also some
escapeIdName
functions inconnector-postgres,mysql
Acceptance Criteria
The text was updated successfully, but these errors were encountered: