Skip to content

JSON Datatype doesnt create JSON_Validation check constraint in mariadb #9903

@C0kkie

Description

@C0kkie

Issue description

If you use json datatype, it wouldn't create a json check validation which is supported since few mariadb version

Expected Behavior

Automatically create check constraint

Actual Behavior

check constraint doesnt get created

Steps to reproduce

@Entity("test")
export class Test extends BaseEntity {
    @PrimaryGeneratedColumn({ unsigned: true })
    id: number;

    @Column("json")
    title: string | null;
}

My Environment

Dependency Version
Operating System Windows
Node.js version 18.13.1
Typescript version 5.0.x
TypeORM version 0.3.12

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?

No, I don’t have the time, but I can support (using donations) development.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions