1 | <?php |
||
18 | abstract class ColumnOperation extends TableOperation |
||
19 | { |
||
20 | use OptionsTrait; |
||
21 | |||
22 | /** |
||
23 | * Some options has set of aliases. |
||
24 | * |
||
25 | * @var array |
||
26 | */ |
||
27 | private $aliases = [ |
||
28 | 'size' => ['length', 'limit'], |
||
29 | 'default' => ['defaultValue'], |
||
30 | 'nullable' => ['null'] |
||
31 | ]; |
||
32 | |||
33 | /** |
||
34 | * @var string |
||
35 | */ |
||
36 | protected $name = ''; |
||
37 | |||
38 | /** |
||
39 | * @var string |
||
40 | */ |
||
41 | protected $type = ''; |
||
42 | |||
43 | /** |
||
44 | * @param string|null $database |
||
45 | * @param string $table |
||
46 | * @param string $column |
||
47 | * @param string $type |
||
48 | * @param array $options |
||
49 | */ |
||
50 | public function __construct( |
||
63 | |||
64 | /** |
||
65 | * @param AbstractTable $schema |
||
66 | * |
||
67 | * @return AbstractColumn |
||
68 | * @throws ColumnException |
||
69 | */ |
||
70 | protected function declareColumn(AbstractTable $schema): AbstractColumn |
||
101 | } |