diff --git a/models/formatted_code.ts b/models/formatted_code.ts index 3de8735..362860f 100644 --- a/models/formatted_code.ts +++ b/models/formatted_code.ts @@ -3,7 +3,7 @@ import Model from "./common"; @TypeORM.Entity() export default class FormattedCode extends Model { - @TypeORM.Column({ type: "varchar", length: 50, primary: true }) + @TypeORM.PrimaryColumn({ type: "varchar", length: 50 }) key: string; @TypeORM.Column({ nullable: true, type: "mediumtext" }) diff --git a/models/problem_tag_map.ts b/models/problem_tag_map.ts index f7f710b..b054821 100644 --- a/models/problem_tag_map.ts +++ b/models/problem_tag_map.ts @@ -4,10 +4,10 @@ import Model from "./common"; @TypeORM.Entity() export default class ProblemTagMap extends Model { @TypeORM.Index() - @TypeORM.Column({ type: "integer", primary: true }) + @TypeORM.PrimaryColumn({ type: "integer" }) problem_id: number; @TypeORM.Index() - @TypeORM.Column({ type: "integer", primary: true }) + @TypeORM.PrimaryColumn({ type: "integer" }) tag_id: number; } diff --git a/models/rating_history.ts b/models/rating_history.ts index 86161f7..2219db3 100644 --- a/models/rating_history.ts +++ b/models/rating_history.ts @@ -7,10 +7,10 @@ import User from "./user"; @TypeORM.Entity() export default class RatingHistory extends Model { - @TypeORM.Column({ type: "integer", primary: true }) + @TypeORM.PrimaryColumn({ type: "integer" }) rating_calculation_id: number; - @TypeORM.Column({ type: "integer", primary: true }) + @TypeORM.PrimaryColumn({ type: "integer" }) user_id: number; @TypeORM.Column({ nullable: true, type: "integer" }) diff --git a/models/user_privilege.ts b/models/user_privilege.ts index fcb997c..2e8a4ab 100644 --- a/models/user_privilege.ts +++ b/models/user_privilege.ts @@ -4,10 +4,10 @@ import Model from "./common"; @TypeORM.Entity() export default class UserPrivilege extends Model { @TypeORM.Index() - @TypeORM.Column({ type: "integer", primary: true }) + @TypeORM.PrimaryColumn({ type: "integer" }) user_id: number; @TypeORM.Index() - @TypeORM.Column({ type: "varchar", length: 80, primary: true }) + @TypeORM.PrimaryColumn({ type: "varchar", length: 80 }) privilege: string; }