Skip to content

Commit

Permalink
fix: db index
Browse files Browse the repository at this point in the history
  • Loading branch information
SIY1121 committed Mar 30, 2021
1 parent 65dd528 commit 1daf7a4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/database/model/course.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
import { Column, Entity, OneToMany, PrimaryGeneratedColumn } from 'typeorm'
import {
Column,
Entity,
Index,
OneToMany,
PrimaryGeneratedColumn,
} from 'typeorm'
import { CourseRecommendedGrade } from './courseRecommendedGrade'
import { CourseMethod } from './courseMethod'
import { CourseSchedule } from './courseSchedule'

@Entity({
name: 'courses',
})
@Index(['year', 'code'], { unique: true })
export class Course {
@PrimaryGeneratedColumn('uuid')
id!: string
Expand Down

0 comments on commit 1daf7a4

Please sign in to comment.