xhgui icon indicating copy to clipboard operation
xhgui copied to clipboard

Update PdoRepository::initSchema() to create table with profile as LONGTEXT.

Open Charl13 opened this issue 2 years ago • 6 comments

In larger applications profile column of type TEXT exceeds maximum allowed characters of 65535 characters. This leads to data not showing in UI since json_decode() returns null on truncated JSON string.

Replaces https://github.com/perftools/xhgui/pull/437

Charl13 avatar Mar 02 '22 14:03 Charl13

The exact same problem as the previous one (where you came from, but didn't link here):

  • https://github.com/perftools/xhgui/pull/437

This is not portable for all storage providers! And marking as Draft to indicate this is far from ready for merge.

glensc avatar Mar 02 '22 16:03 glensc

Right, missed that one.

What do you suggest? Extract initSchema() and make an adapter for it based on the driver name?

Charl13 avatar Mar 02 '22 17:03 Charl13

Simplest would be adopt based on driver name

glensc avatar Mar 02 '22 19:03 glensc

Can I use doctrine/dbal to refactor the PdoRepository? This allows us to be more flexible on the database platform.

Charl13 avatar Apr 13 '22 14:04 Charl13

Read the comments in the previous PR, especially:

  • https://github.com/perftools/xhgui/pull/437#issuecomment-962690853

and use the new property to make conditions in code.

doctrine/dbal seems currently way overkill and considering they've made changes in minor versions such way that multiple of my projects just failed and had to StackOverflow to solve the problems, I personally wouldn't want to use doctrine/* at all at this time.

so let's leave bigger refactoring to the future.

glensc avatar Apr 13 '22 14:04 glensc

Adding check for $this->driverName is pretty trivial. No longer interested of this?

glensc avatar Apr 19 '22 20:04 glensc

Replaced by https://github.com/perftools/xhgui/pull/487

glensc avatar Dec 21 '22 16:12 glensc