Skip to content

Commit 08cc2c8

Browse files
committed
Added Ref_Id column
1 parent dbb7f47 commit 08cc2c8

2 files changed

Lines changed: 43 additions & 1 deletion

File tree

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?php
2+
/**
3+
* The interface for the Referenced_ID column.
4+
*
5+
* @since TBD
6+
*
7+
* @package StellarWP\Schema\Columns
8+
*/
9+
10+
declare( strict_types=1 );
11+
12+
namespace StellarWP\Schema\Columns;
13+
14+
/**
15+
* Class Referenced_ID
16+
*
17+
* @since TBD
18+
*
19+
* @package StellarWP\Schema\Columns
20+
*/
21+
class Referenced_ID extends Integer_Column {
22+
/**
23+
* Whether the column is signed.
24+
*
25+
* @var bool
26+
*/
27+
protected bool $signed = false;
28+
29+
/**
30+
* Whether the column is auto increment.
31+
*
32+
* @var bool
33+
*/
34+
protected bool $auto_increment = false;
35+
36+
/**
37+
* Whether the column is a primary key.
38+
*
39+
* @var bool
40+
*/
41+
protected bool $is_index = true;
42+
}

src/Schema/Traits/Custom_Table_Query_Methods.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ public static function insert_many( array $entries ) {
169169
* @return bool Whether the delete was successful.
170170
*/
171171
public static function delete( int $uid, string $column = '' ): bool {
172-
return static::delete_many( [ $uid ], $column );
172+
return (bool) static::delete_many( [ $uid ], $column );
173173
}
174174

175175
/**

0 commit comments

Comments
 (0)