loopbackio / loopbackio/loopback-connector-mssql

migrate script not supports custom column names

Open
#238 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
JavaScript
Stars
52
Forks
80
PR merge metrics
No merged PRs in 30d

Description

mssql connector migrate script not supports custom column names.

## Steps to reproduce

` @property({
type: 'string',
mssql: {
columnName: 'CustomErrorType'
},
})
errorType: string;`

## Current Behavior

Error: Column names in each table must be unique. Column name 'ErrorType' in table 'dbo.ErrorCodes' is specified more than once.

## Expected Behavior

To migrate schema correctly

## Related Issues

https://github.com/loopbackio/loopback-next/issues/3372

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the mssql connector's migrate script and reproduce the issue using the model property with the CustomErrorType column name. Done means the schema migration succeeds without duplicate ErrorType columns and applies the custom name correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs, sql
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.