Skip to content

Commit

Permalink
Fix #95 by setting a proper unique index and adjusting column lengths… (
Browse files Browse the repository at this point in the history
#96)

* Fix #95 by setting a proper unique index and adjusting column lengths while we're at it

ALTER TABLE ATTENDANCE_RECORD_T
MODIFY COLUMN USER_ID varchar(99),
MODIFY COLUMN STATUS varchar(20),
ADD UNIQUE INDEX user_record(USER_ID, A_EVENT_ID);
  • Loading branch information
ottenhoff authored Feb 25, 2022
1 parent d489aac commit 47c08a3
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
</generator>
</id>

<property name="userID" column="USER_ID" type="java.lang.String" />
<property name="status" column="STATUS" type="org.sakaiproject.attendance.types.StatusUserType"/>
<property name="comment" column="RECORD_COMMENT" type="text" length="4000"/>
<property name="userID" column="USER_ID" type="java.lang.String" length="99" unique-key="user_record" />
<property name="status" column="STATUS" type="org.sakaiproject.attendance.types.StatusUserType" length="20" />
<property name="comment" column="RECORD_COMMENT" type="text" length="4000" />

<many-to-one name="attendanceEvent" column="A_EVENT_ID" unique="false" not-null="true" class="AttendanceEvent" lazy="false"/>
<many-to-one name="attendanceEvent" column="A_EVENT_ID" unique="false" not-null="true" class="AttendanceEvent" lazy="false" unique-key="user_record" />
</class>

<query name="getAttendanceRecord">
Expand Down

0 comments on commit 47c08a3

Please sign in to comment.