mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-17 16:44:49 -04:00
RevisionEntity: Change primary key type from UUID to number
The precision of sqlites datetime() timestamp is only one second (see https://www.sqlite.org/lang_datefunc.html). Therefore we could not order revisions of one note that were created in the same second. To remedy this, the primary key was changed to a monotonically increasing number, which solves the ordering problem. Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
1abb472621
commit
d462a571d8
5 changed files with 10 additions and 9 deletions
|
@ -16,8 +16,8 @@ import { Authorship } from './authorship.entity';
|
|||
*/
|
||||
@Entity()
|
||||
export class Revision {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id: string;
|
||||
@PrimaryGeneratedColumn()
|
||||
id: number;
|
||||
|
||||
/**
|
||||
* The patch from the previous revision to this one.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue