joomlaboat / custom-tables

The Custom Tables extension allows you to create, manage, and display custom data on your Joomla site. It is helpful if you need to display data that is not part of the standard Joomla content structure. For example, you could use this extension to create a custom table for product information, customer data, or any other type of data that you need to display on your site. The Custom Tables is the CRUD solution for Joomla 3.x and 4.x - CREATE, READ, UPDATE and DELETE. You can add tables, fields, and layouts to create catalogs, forms, or details pages. It has 40 Field Types: Integer (numbers), Decimal, Text String, Time, Email, Color, Image, File, User, Language, etc.
https://joomlaboat.com/custom-tables
GNU General Public License v2.0
36 stars 11 forks source link

Table Naming #22

Closed felixkat closed 2 years ago

felixkat commented 2 years ago

Any new table that is created is prefixed with "#customtablestable" it would be nice to have the facility of naming the table as the user specifies it to be. So a table called "artists" would actually be "artists" rather than "#customtables_table_artists"

Also I do not see the requirement to remove underscores from table name names.

test_table_artists shouldn't be renamed to testtableartists as table names become unreadable. The same applies to field names.

joomlaboat commented 2 years ago

You can create the table "artists" in PHPMyAdmin and connect it to Custom Tables as a Third-Party table (New Table/Advanced Tab) Also I can an option to create tables with the custom name.

felixkat commented 2 years ago

Okay thank you. As I am only testing at the moment I don't have access to this option until I upgrade to PRO. I'll close this for now.

joomlaboat commented 2 years ago

Since 2.7.6 version you can name physical table the way you want, this functionality is available in the Pro version.

Type the name of the table - "artists" for example

image

Go to Advanced tab and select Third-party Table => "Create new table".

image

Table created:

image

You can see it in PHPMyAdmin:

image

Also Primary Key (id) and Publish status fields created:

image

When you add new fields type the field name as you want it to be in MySQL and field title (MySQL Column Comment)

image

Field added, no additional prefixed:

image

But be careful because you cannot use reserved MySQL words such as COUNT, SELECT etc.