Postgres Crud Enterprise

Has this actually been tested for Postgres? Errors that are visible to the naked eye:

  1. It does not maintain the order of the columns even if you use the function $crud->columns.
  2. The column that is table PK in the tabular view disappears.
  3. The $crud->fieldType(‘vparam’, ‘password’) function does not work, it shows the raw data no ****
    public function parameters()
        $crud = $this->_getGroceryCrudEnterprise();
        $crud->setSubject('Parameters', 'Parameters');
        $output = $crud->render();

        return $this->_example_output($output);
CREATE TABLE parametro (
  dparam varchar(50) NOT NULL,
  vparam varchar(50) NOT NULL,
ALTER TABLE IF EXISTS public.parametro

Hello @Saturnino ,

Although I don’t have currently Postgres to confirm it. This was indeed tested for Postgres Database. Your issues doesn’t seem related to the database. More specifically:

  1. The order of the columns may be that this is a caching issue. Just to make sure for development you can have the configuration: remember_state_upon_refresh to false so it will reset every time you refresh. Once your development is done, you can switch this back to true.

  2. Grocery CRUD works entirely on the assumption that you have an auto increment primary key. The same assumption is for mySQL as well. For example using SERIAL as your id type

  3. The password is getting hidden only on the crud forms and not in the datagrid. This is an expected behaviour of Grocery CRUD. In short, if you choose to show it in the datagrid it is more possible that you want to show it to the user. If not then either hide the column or use callbackColumn to add asterisks to the password:

$crud->callbackColumn('vparam', function () {
    return "*****";

Please keep in mind that Grocery CRUD is just using a different driver for Postgres database and everything is happening in the background using lamina-db library. So nothing special really changes.