fix: add revised migration
All checks were successful
Update changelog / changelog (push) Successful in 25s

This commit is contained in:
2025-12-11 22:37:24 +01:00
parent bade2f9b86
commit 3f225a1ecb
4 changed files with 40 additions and 13 deletions

View File

@@ -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[];
}