mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-16 08:04:45 -04:00
fix(history-entry): remove composite primary keys
TypeORM promises to support composite primary keys, but that does not work in reality. This replaces the composite key used in the permission entities with a single generated primary key and a unique index on the relation columns. See https://github.com/typeorm/typeorm/issues/8513 Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
d1c3058655
commit
a626ace4b9
7 changed files with 60 additions and 55 deletions
|
@ -118,7 +118,7 @@ describe('Me', () => {
|
|||
let theEntry: HistoryEntryDto;
|
||||
for (const entry of history) {
|
||||
if (
|
||||
(await entry.note.aliases).find(
|
||||
(await (await entry.note).aliases).find(
|
||||
(element) => element.name === noteName,
|
||||
)
|
||||
) {
|
||||
|
@ -147,7 +147,7 @@ describe('Me', () => {
|
|||
const history = await testSetup.historyService.getEntriesByUser(user);
|
||||
for (const entry of history) {
|
||||
if (
|
||||
(await entry.note.aliases).find(
|
||||
(await (await entry.note).aliases).find(
|
||||
(element) => element.name === noteName,
|
||||
)
|
||||
) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue