Skip to content

Commit

Permalink
Fix #227
Browse files Browse the repository at this point in the history
  • Loading branch information
viktorprogger committed Dec 21, 2023
1 parent f99d3b3 commit a530301
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions src/AbstractMigrationBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,56 @@ public function bigPrimaryKey(int $length = null): ColumnInterface
return $this->schema->createColumn(SchemaInterface::TYPE_BIGPK, $length);
}

/**
* Creates an unsigned big primary key column.
*
* @param int|null $length The column size or precision definition.
*
* This parameter will be ignored if not supported by the DBMS.
*
* @return ColumnInterface The column instance which can be further customized.
*/
public function bigPrimaryKeyUnsigned(int $length = null): ColumnInterface

Check warning on line 77 in src/AbstractMigrationBuilder.php

View check run for this annotation

Codecov / codecov/patch

src/AbstractMigrationBuilder.php#L77

Added line #L77 was not covered by tests
{
return $this->schema->createColumn(SchemaInterface::TYPE_UBIGPK, $length);

Check warning on line 79 in src/AbstractMigrationBuilder.php

View check run for this annotation

Codecov / codecov/patch

src/AbstractMigrationBuilder.php#L79

Added line #L79 was not covered by tests
}

/**
* Creates a UUID primary key column.
*
* This parameter will be ignored if not supported by the DBMS.
*
* @return ColumnInterface The column instance which can be further customized.
*/
public function uuidPrimaryKey(): ColumnInterface

Check warning on line 89 in src/AbstractMigrationBuilder.php

View check run for this annotation

Codecov / codecov/patch

src/AbstractMigrationBuilder.php#L89

Added line #L89 was not covered by tests
{
return $this->schema->createColumn(SchemaInterface::TYPE_UUID_PK);

Check warning on line 91 in src/AbstractMigrationBuilder.php

View check run for this annotation

Codecov / codecov/patch

src/AbstractMigrationBuilder.php#L91

Added line #L91 was not covered by tests
}

/**
* Creates a UUID primary key column with a sequence.
*
* This parameter will be ignored if not supported by the DBMS.
*
* @return ColumnInterface The column instance which can be further customized.
*/
public function uuidPrimaryKeySequenced(): ColumnInterface

Check warning on line 101 in src/AbstractMigrationBuilder.php

View check run for this annotation

Codecov / codecov/patch

src/AbstractMigrationBuilder.php#L101

Added line #L101 was not covered by tests
{
return $this->schema->createColumn(SchemaInterface::TYPE_UUID_PK_SEQ);

Check warning on line 103 in src/AbstractMigrationBuilder.php

View check run for this annotation

Codecov / codecov/patch

src/AbstractMigrationBuilder.php#L103

Added line #L103 was not covered by tests
}

/**
* Creates a UUID column.
*
* This parameter will be ignored if not supported by the DBMS.
*
* @return ColumnInterface The column instance which can be further customized.
*/
public function uuid(): ColumnInterface

Check warning on line 113 in src/AbstractMigrationBuilder.php

View check run for this annotation

Codecov / codecov/patch

src/AbstractMigrationBuilder.php#L113

Added line #L113 was not covered by tests
{
return $this->schema->createColumn(SchemaInterface::TYPE_UUID);

Check warning on line 115 in src/AbstractMigrationBuilder.php

View check run for this annotation

Codecov / codecov/patch

src/AbstractMigrationBuilder.php#L115

Added line #L115 was not covered by tests
}

/**
* Creates a binary column.
*
Expand Down Expand Up @@ -254,6 +304,20 @@ public function primaryKey(int $length = null): ColumnInterface
return $this->schema->createColumn(SchemaInterface::TYPE_PK, $length);
}

/**
* Creates an unsigned primary key column.
*
* @param int|null $length The column size or precision definition.
*
* This parameter will be ignored if not supported by the DBMS.
*
* @return ColumnInterface The column instance which can be further customized.
*/
public function primaryKeyUnsigned(int $length = null): ColumnInterface

Check warning on line 316 in src/AbstractMigrationBuilder.php

View check run for this annotation

Codecov / codecov/patch

src/AbstractMigrationBuilder.php#L316

Added line #L316 was not covered by tests
{
return $this->schema->createColumn(SchemaInterface::TYPE_UPK, $length);

Check warning on line 318 in src/AbstractMigrationBuilder.php

View check run for this annotation

Codecov / codecov/patch

src/AbstractMigrationBuilder.php#L318

Added line #L318 was not covered by tests
}

/**
* Creates a smallint column.
*
Expand Down

0 comments on commit a530301

Please sign in to comment.