mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-27 13:34:28 -04:00
refactor: use integer primary keys
Closes #1292 Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
499f632d8d
commit
2c1e0517ff
17 changed files with 42 additions and 42 deletions
|
@ -17,8 +17,8 @@ import { PrimaryValueTransformer } from './primary.value-transformer';
|
|||
@Entity()
|
||||
@Unique('Only one primary alias per note', ['note', 'primary'])
|
||||
export class Alias {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id: string;
|
||||
@PrimaryGeneratedColumn()
|
||||
id: number;
|
||||
|
||||
/**
|
||||
* the actual alias
|
||||
|
|
|
@ -86,8 +86,8 @@ export class AliasService {
|
|||
*/
|
||||
async makeAliasPrimary(note: Note, alias: string): Promise<Alias> {
|
||||
let newPrimaryFound = false;
|
||||
let oldPrimaryId = '';
|
||||
let newPrimaryId = '';
|
||||
let oldPrimaryId = 0;
|
||||
let newPrimaryId = 0;
|
||||
|
||||
this.notesService.checkNoteIdOrAlias(alias);
|
||||
|
||||
|
|
|
@ -26,8 +26,8 @@ import { generatePublicId } from './utils';
|
|||
|
||||
@Entity()
|
||||
export class Note {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id: string;
|
||||
@PrimaryGeneratedColumn()
|
||||
id: number;
|
||||
|
||||
@Column({ type: 'text' })
|
||||
publicId: string;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue