%PDF- %GIF98; %PNG;
Server : ApacheSystem : Linux host.digitalbabaji.in 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64 User : addictionfreeind ( 1003) PHP Version : 7.2.34 Disable Function : exec,passthru,shell_exec,system Directory : /home/addictionfreeind/www/vendor/cakephp/migrations/src/Template/Bake/Element/ |
Upload File : |
<%
$statement = $this->Migration->tableStatement($table, true);
$hasProcessedConstraint = false;
%>
<% foreach ($constraints as $constraint):
$constraintColumns = $constraint['columns'];
sort($constraintColumns);
if ($constraint['type'] !== 'unique'):
$hasProcessedConstraint = true;
$columnsList = '\'' . $constraint['columns'][0] . '\'';
if (count($constraint['columns']) > 1):
$columnsList = '[' . $this->Migration->stringifyList($constraint['columns'], ['indent' => 5]) . ']';
endif;
$this->Migration->returnedData['dropForeignKeys'][$table][] = $columnsList;
if (is_array($constraint['references'][1])):
$columnsReference = '[' . $this->Migration->stringifyList($constraint['references'][1], ['indent' => 5]) . ']';
else:
$columnsReference = '\'' . $constraint['references'][1] . '\'';
endif;
if (!isset($statement)):
$statement = $this->Migration->tableStatement($table);
endif;
if (!empty($statement)): %>
<%= $statement %>
<% unset($statement);
endif; %>
->addForeignKey(
<%= $columnsList %>,
'<%= $constraint['references'][0] %>',
<%= $columnsReference %>,
[
'update' => '<%= $this->Migration->formatConstraintAction($constraint['update']) %>',
'delete' => '<%= $this->Migration->formatConstraintAction($constraint['delete']) %>'
]
)
<% endif; %>
<% endforeach; %>
<% if (isset($this->Migration->tableStatements[$table]) && $hasProcessedConstraint): %>
->update();
<% endif; %>