diff --git a/ts/src/sequelize_schema.ts b/ts/src/sequelize_schema.ts index 2181b31..780188f 100644 --- a/ts/src/sequelize_schema.ts +++ b/ts/src/sequelize_schema.ts @@ -34,6 +34,8 @@ export const loadSequelizeModels = (dialect: string, models: ModelCtor[]) => { // @ts-ignore sequelize .getQueryInterface() + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore .queryGenerator.createTableQuery( def.tableName, attr, diff --git a/ts/testdata/models/Email.ts b/ts/testdata/models/Email.ts index c5d76f9..47f17b3 100644 --- a/ts/testdata/models/Email.ts +++ b/ts/testdata/models/Email.ts @@ -54,7 +54,9 @@ class Email extends Model { @Column(DataType.INTEGER) contact_id!: number; - @BelongsTo(() => Contact) + @BelongsTo(() => Contact, { + onDelete: "CASCADE", + }) contact!: Contact; @CreatedAt diff --git a/ts/testdata/models/Phone.ts b/ts/testdata/models/Phone.ts index 22558c3..ed8845c 100644 --- a/ts/testdata/models/Phone.ts +++ b/ts/testdata/models/Phone.ts @@ -39,7 +39,9 @@ class Phone extends Model { @Column(DataType.INTEGER) contact_id!: number; - @BelongsTo(() => Contact) + @BelongsTo(() => Contact, { + onDelete: "CASCADE", + }) contact!: Contact; @CreatedAt