Skip to content

Commit bad02fc

Browse files
committed
Use the proper functions to update the database
Files changed in commit: sql/updates/61.php
1 parent 31ece57 commit bad02fc

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

sql/updates/61.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
<?php
22

33
/* Add rating scale support to performance reviews */
4-
5-
$SQL = "ALTER TABLE hrperformancereviews
6-
ADD COLUMN scaleid INT(11) DEFAULT NULL,
7-
ADD CONSTRAINT fk_review_scale FOREIGN KEY (scaleid) REFERENCES hrratingscales (scaleid) ON DELETE SET NULL";
8-
9-
DB_query($SQL, __('Failed to add scaleid to hrperformancereviews'));
4+
AddColumn('scaleid', 'hrperformancereviews', 'INT(11)', ' NULL', '', 'modifieddate');
5+
AddConstraint('hrperformancereviews', 'hrperformancereviews_ibfk_1', 'scaleid', 'hrratingscales', 'scaleid');
106

117
if ($_SESSION['Updates']['Errors'] == 0) {
128
UpdateDBNo(basename(__FILE__, '.php'), __('Add rating scale support to performance reviews'));

0 commit comments

Comments
 (0)