mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-19 01:35:18 -04:00
Fix types for foreign keys
Signed-off-by: David Mehren <dmehren1@gmail.com>
This commit is contained in:
parent
1d4107fe90
commit
0c078f5266
3 changed files with 4 additions and 5 deletions
|
@ -16,7 +16,7 @@ export class Author extends Model<Author> {
|
|||
|
||||
@ForeignKey(() => Note)
|
||||
@NoteUserIndex
|
||||
@Column
|
||||
@Column(DataType.UUID)
|
||||
noteId: string;
|
||||
|
||||
@BelongsTo(() => Note, { foreignKey: 'noteId', onDelete: 'CASCADE', constraints: false, hooks: true })
|
||||
|
@ -24,7 +24,7 @@ export class Author extends Model<Author> {
|
|||
|
||||
@ForeignKey(() => User)
|
||||
@NoteUserIndex
|
||||
@Column
|
||||
@Column(DataType.UUID)
|
||||
userId: string;
|
||||
|
||||
@BelongsTo(() => User, { foreignKey: 'userId', onDelete: 'CASCADE', constraints: false, hooks: true })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue