Skip to content

SAP HANA: data types deprecated in cloud generate incorrect migration #11354

@alumni

Description

@alumni

Issue description

Data types for deprecated types like varchar (alias to nvarchar) constantly generate a new migration trying to convert the column from nvarchar to varchar.

Expected Behavior

E.g. varchar should either not be supported in cloud, or it should be treated as nvarchar

Actual Behavior

HANA Cloud converts internally varchar to nvarchar. TypeORM constantly tries to generate a new migration, converting the column from nvarchar back to varchar.

Steps to reproduce

@Entity()
class PostEntity {
  @Column('varchar', { length: 255 })
  title: string;
}

Sync schema, then try to generate a migration. No migration should be generated.

My Environment

Dependency Version
Operating System Linux
Node.js version 20.19.0
Typescript version 5.8.2
TypeORM version 0.3.21

Additional Context

No response

Relevant Database Driver(s)

  • aurora-mysql
  • aurora-postgres
  • better-sqlite3
  • cockroachdb
  • cordova
  • expo
  • mongodb
  • mysql
  • nativescript
  • oracle
  • postgres
  • react-native
  • sap
  • spanner
  • sqlite
  • sqlite-abstract
  • sqljs
  • sqlserver

Are you willing to resolve this issue by submitting a Pull Request?

Yes, I have the time, and I know how to start.

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions