[Phpmyadmin-devel] central columns list and synching

Marc Delisle marc at infomarc.info
Thu May 22 23:15:36 CEST 2014


Le 2014-05-22 15:25, Smita a écrit :
> 
> On Thu, May 22, 2014 at 10:44 PM, Marc Delisle <marc at infomarc.info
> <mailto:marc at infomarc.info>> wrote:
> 
>     Hi Smita,
> 
>     I was under the impression that the central list of columns would be
>     authoritative, regarding the column attributes. Currently, it seems that
>     the table itself has priority.
> 
>     For example, if a column is described in the central list as being
>     VARCHAR(40), and the same column name exists in a table, but with
>     VARCHAR(45), I would expect a sync operation to adjust the column's size
>       to the "official" 40. On the contrary, the central list is modified
>     when doing the sync.
> 
> Hi Marc,
> In my opinion, changing type without user consent is not a good idea.
> there might be a case that, in one table let say 'id' field needs INT
> but in another table which expected to have lot more rows will need
> field 'id' to be of type BIGINT. So in this case if system changes
> BIGINT to INT, it would be big problem. If I understood you correctly.

In this case, in the central list, 'id' should be defined as BIGINT, and
the central definition should be the one that is applied to a table,
when someone asks to synchronize this table.

Now, what kind of user confirmation should be asked in this case, is up
to you.

Maybe, calling this feature "Sync" is misleading, and we need two
different features. One that would populate the central list, starting
from a particular table (but should notify the user in case a column
name already exists in the central list).

And another feature that applies the central list definitions to a
chosen table (or just verifies and notifies the user if a central
definition is found for one of the columns in this table).

> 
>     Or, am I mistaken with the goal of the sync feature?
> 
>  
> I think my understanding of the problem [0] is somewhat different from
> what you have understood. What I understood from the problem that some
> of the already existing columns from the database, we keep in a central
> list. and then while making a new table or adding a new column to a
> existing table,  from the central list we can pick a column using option
> on UI which autopopulate all the fields for new column being added. So
> if there is already a existing column let say 'product_id', while adding
> new similar column in some table user won't use prod_id or something
> similar with different attributes, they can just select 'product_id'
> from central list. It also saves user from filling all the necessary fields.

Yes, but this will be done in a different task in your schedule, correct?

> So in my implementation Syncing a table meant: just adding columns with
> unique attributes ( not matching with any other column in central list )
> of that table in the central list.

Please try the case when a column already exists in the central list. In
my test, this column was updated in the central list but it's not always
the best thing to do,


> 
> Please let me know if I'm interpreting the problem[0] wrongly.
> 
> [0] http://sourceforge.net/p/phpmyadmin/feature-requests/1477/


-- 
Marc Delisle | phpMyAdmin




More information about the Developers mailing list