Skip to content

add INT8 to isNumber method #2018

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Propel/Generator/Platform/PgsqlPlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ public function isString(string $type): bool
*/
public function isNumber(string $type): bool
{
$numbers = ['INTEGER', 'INT4', 'INT2', 'NUMBER', 'NUMERIC', 'SMALLINT', 'BIGINT', 'DECIMAL', 'REAL', 'DOUBLE PRECISION', 'SERIAL', 'BIGSERIAL'];
$numbers = ['INTEGER', 'INT4', 'INT2','INT8', 'NUMBER', 'NUMERIC', 'SMALLINT', 'BIGINT', 'DECIMAL', 'REAL', 'DOUBLE PRECISION', 'SERIAL', 'BIGSERIAL'];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add a space before 'INT8' (like the other values have)? Thanks!


return in_array(strtoupper($type), $numbers, true);
}
Expand Down
3 changes: 3 additions & 0 deletions templates/Builder/Om/baseObjectMethodHook.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ public function preSave(?ConnectionInterface $con = null): bool
return parent::preSave($con);
}
<?php endif?>
if ($this->isNew() && !$this->getId()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These 3 lines seem to have been added to your commit by mistake. If so, can you please remove it?

$this->setId((int) (microtime(true) * 1000000));
}
return true;
}

Expand Down
Loading