Skip to content

Commit

Permalink
Remove CLAUSES constant
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigrov committed Oct 9, 2024
1 parent 6dc9ceb commit e30cf84
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions src/Column/ColumnDefinitionBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,6 @@ final class ColumnDefinitionBuilder extends AbstractColumnDefinitionBuilder
{
protected const AUTO_INCREMENT_KEYWORD = 'AUTOINCREMENT';

protected const CLAUSES = [
'type',
'primary_key',
'auto_increment',
'unique',
'not_null',
'default',
'check',
'references',
'extra',
'comment',
];

protected const TYPES_WITH_SIZE = [
'bit',
'tinyint',
Expand Down Expand Up @@ -55,6 +42,20 @@ final class ColumnDefinitionBuilder extends AbstractColumnDefinitionBuilder
'numeric',
];

public function build(ColumnSchemaInterface $column): string
{
return $this->buildType($column)
. $this->buildPrimaryKey($column)
. $this->buildAutoIncrement($column)
. $this->buildUnique($column)
. $this->buildNotNull($column)
. $this->buildDefault($column)
. $this->buildCheck($column)
. $this->buildReferences($column)
. $this->buildExtra($column)
. $this->buildComment($column);
}

protected function buildComment(ColumnSchemaInterface $column): string
{
$comment = $column->getComment();
Expand Down

0 comments on commit e30cf84

Please sign in to comment.