mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-18 17:25:16 -04:00
models/revision.ts: Fix primary key default value
Signed-off-by: David Mehren <dmehren1@gmail.com>
This commit is contained in:
parent
c24023437f
commit
3ea64b2308
1 changed files with 17 additions and 7 deletions
|
@ -1,16 +1,26 @@
|
|||
import { BelongsTo, Column, DataType, ForeignKey, IsUUID, Model, PrimaryKey, Table } from 'sequelize-typescript'
|
||||
import { ChildProcess } from 'child_process'
|
||||
import { Note } from './note'
|
||||
import { processData, stripNullByte } from '../utils'
|
||||
|
||||
import Sequelize from 'sequelize'
|
||||
import {
|
||||
BelongsTo,
|
||||
Column,
|
||||
DataType,
|
||||
Default,
|
||||
ForeignKey,
|
||||
IsUUID,
|
||||
Model,
|
||||
PrimaryKey,
|
||||
Table
|
||||
} from 'sequelize-typescript'
|
||||
// core
|
||||
import { logger } from '../logger'
|
||||
import { processData, stripNullByte } from '../utils'
|
||||
import { Note } from './note'
|
||||
import async = require('async')
|
||||
import moment = require('moment')
|
||||
import childProcess = require('child_process')
|
||||
import shortId = require('shortid')
|
||||
import moment = require('moment')
|
||||
import path = require('path')
|
||||
import shortId = require('shortid')
|
||||
|
||||
const Op = Sequelize.Op
|
||||
|
||||
|
@ -64,9 +74,9 @@ function sendDmpWorker (data, callback): void {
|
|||
|
||||
@Table
|
||||
export class Revision extends Model<Revision> {
|
||||
@IsUUID(4)
|
||||
@Default(Sequelize.UUIDV4)
|
||||
@PrimaryKey
|
||||
@Column
|
||||
@Column(DataType.UUID)
|
||||
id: string
|
||||
|
||||
@Column(DataType.INTEGER)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue