Skip to content

Commit

Permalink
Task techjoomla#199 feat: Save process optimisation
Browse files Browse the repository at this point in the history
  • Loading branch information
ankush-maherwal committed Oct 4, 2019
1 parent 3d7a08c commit 5227187
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions script.tjfields.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ class Com_TjfieldsInstallerScript
*/
public function preflight($type, $parent)
{
// Delete sql file if exist as related column is added through script
if (JFile::exists(JPATH_SITE . '/administrator/components/com_tjfields/sql/updates/mysql/1.3.1.sql'))
{
JFile::delete($image);
}
}

/**
Expand Down Expand Up @@ -371,12 +376,6 @@ public function fix_db_on_update()
}
}

// Delete sql file if exist as related column is added through script
if (JFile::exists(JPATH_SITE . '/administrator/components/com_tjfields/sql/updates/mysql/1.3.1.sql'))
{
JFile::delete($image);
}

if (!in_array('showonlist', $field_array))
{
$query = "ALTER TABLE `#__tjfields_fields` ADD COLUMN `showonlist` tinyint(1) NOT NULL";
Expand Down

0 comments on commit 5227187

Please sign in to comment.