Skip to content

Commit f59d6b1

Browse files
committed
Forge Test Cases
1 parent a2bc539 commit f59d6b1

4 files changed

Lines changed: 438 additions & 193 deletions

File tree

system/Database/Forge.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ public function createDatabase(string $db_name): bool
220220
{
221221
if ($this->db->DBDebug)
222222
{
223-
throw new DatabaseException('Unable to drop the specified database.');
223+
throw new DatabaseException('Unable to create the specified database.');
224224
}
225225

226226
return false;
@@ -388,13 +388,13 @@ public function addField($field)
388388
* @param string $fieldName
389389
* @param string $tableName
390390
* @param string $tableField
391-
* @param boolean $onUpdate
392-
* @param boolean $onDelete
391+
* @param string $onUpdate
392+
* @param string $onDelete
393393
*
394394
* @return \CodeIgniter\Database\Forge
395395
* @throws \CodeIgniter\Database\Exceptions\DatabaseException
396396
*/
397-
public function addForeignKey(string $fieldName = '', string $tableName = '', string $tableField = '', bool $onUpdate = false, bool $onDelete = false)
397+
public function addForeignKey(string $fieldName = '', string $tableName = '', string $tableField = '', string $onUpdate = '', string $onDelete = '')
398398
{
399399
if (! isset($this->fields[$fieldName]))
400400
{

system/Language/en/Database.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
'featureUnavailable' => 'This feature is not available for the database you are using.',
2727
'tableNotFound' => 'Table `{0}` was not found in the current database.',
2828
'noPrimaryKey' => '`{0}` model class does not specify a Primary Key.',
29-
'forEmptyInputGiven' => 'Empty statement is given for the field `{0}`',
29+
'fieldNotExists' => 'Field `{0}` not found.',
30+
'forEmptyInputGiven' => 'Empty statement is given for the field `{0}`',
3031
'forFindColumnHaveMultipleColumns' => 'Only single column allowed in Column name.',
3132
];

0 commit comments

Comments
 (0)