cakephp / phinx

PHP Database Migrations for Everyone
https://phinx.org
MIT License
4.46k stars 892 forks source link

Fix PostgresAdapter not returning limit for char and varchar #2214

Closed roblperry closed 1 year ago

roblperry commented 1 year ago

Fixes #2213

Check to see if numeric_precision is set, before calling setPrecision in PostgresAdapter, to avoid unsetting the limit previously set while getting columns from the database. Added testAddStringWithLimit to PostgresAdapterTest to ensure that limits are being properly set. Updated ManagerTest->testMigrationWithCustomColumnTypes to no longer expect pgsql to return null for limit of custom columns.