-
Notifications
You must be signed in to change notification settings - Fork 122
Expand file tree
/
Copy pathDropCheckConstraint.php
More file actions
43 lines (37 loc) · 994 Bytes
/
DropCheckConstraint.php
File metadata and controls
43 lines (37 loc) · 994 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
declare(strict_types=1);
/**
* MIT License
* For full license information, please view the LICENSE file that was distributed with this source code.
*/
namespace Migrations\Db\Action;
use Migrations\Db\Table\TableMetadata;
class DropCheckConstraint extends Action
{
/**
* The check constraint name to drop
*
* @var string
*/
protected string $constraintName;
/**
* Constructor
*
* @param \Migrations\Db\Table\TableMetadata $table The table to remove the constraint from
* @param string $constraintName The name of the check constraint to drop
*/
public function __construct(TableMetadata $table, string $constraintName)
{
parent::__construct($table);
$this->constraintName = $constraintName;
}
/**
* Returns the name of the check constraint to drop
*
* @return string
*/
public function getConstraintName(): string
{
return $this->constraintName;
}
}