php-crud-api icon indicating copy to clipboard operation
php-crud-api copied to clipboard

Adding table prefix

Open RiccardoB opened this issue 7 years ago • 4 comments

I’m on a non-optimal environment where tables accesed by php-crud-api share a database with other tables used by other applications.

If it will be a 'table_prefix' settings it allows me to keep my calls to php-crud-api the same indipendently by the environment (if I’m looking for 'products' I’ll keep ask for 'products' and not 'prefix1_products' on some server and 'prefix2_products' on another one) and also permits to limit access to a subset of tables without having to set the 'table_authorizer'.

RiccardoB avatar May 17 '17 14:05 RiccardoB

I like this idea, I can see how this would be very helpful! Thank you for reporting this.

mevdschee avatar May 20 '17 10:05 mevdschee

Is this working now ?

Ghenimi avatar Mar 17 '24 04:03 Ghenimi

There is a way around it: You can use the "mapping" feature to remove the prefix. You can use the authorization to prevent access to other tables.

mevdschee avatar Mar 17 '24 07:03 mevdschee

This is a brilliant and outstanding feature, thank you so much Maurits !

Ghenimi avatar Mar 17 '24 08:03 Ghenimi