fix: add revised migration
All checks were successful
Update changelog / changelog (push) Successful in 25s
All checks were successful
Update changelog / changelog (push) Successful in 25s
This commit is contained in:
@@ -4,21 +4,29 @@ import { Link } from "./Link"
|
||||
@Entity("users")
|
||||
export class User {
|
||||
|
||||
// Unique user id.
|
||||
@PrimaryGeneratedColumn()
|
||||
id: number
|
||||
|
||||
// User name, must be unique.
|
||||
@Column({ unique: true })
|
||||
name: string
|
||||
|
||||
// Salted password hash.
|
||||
@Column()
|
||||
passwordHash: string
|
||||
|
||||
// User role:
|
||||
// - 0 - means unprivileged user,
|
||||
// - 1 - means administrative user.
|
||||
@Column()
|
||||
role: string
|
||||
role: number
|
||||
|
||||
// Account creation date as a Unix timestamp.
|
||||
@Column('bigint')
|
||||
createdAt: number
|
||||
|
||||
// List of shortened URLs which belong to the user.
|
||||
@OneToMany(() => Link, (link) => link.author)
|
||||
links: Link[];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user