schema generates wrong index

I have this schema:

export const historyFiles = pgTable('history_files', {
  id: serial('id').primaryKey(),
  fileId: integer('file_id')
    .references(() => files.id)
    .notNull(),
  historyId: integer('history_id')
    .references(() => histories.id)
    .notNull(),

  createdAt: timestamp('created_at').defaultNow().notNull(),
  updatedAt: timestamp('updated_at').defaultNow().notNull(),
});


why is creating a composite index like: history_files_file_id_users_id_fk
Was this page helpful?