[Phpmyadmin-devel] central columns list and synching
Marc Delisle
marc at infomarc.info
Fri May 23 14:12:17 CEST 2014
Smita a écrit :
> On Fri, May 23, 2014 at 2:45 AM, Marc Delisle <marc at infomarc.info> wrote:
>
>> 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).
>>
>>
> We can just say, Add unique columns to central list instead of saying
> "Sync" .
> So if user chooses a table to add its columns to the central, and some
> column of this table already exist in the central then we show columns
> col1, col3 already exist so is not updated ?
Agreed.
>
> 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).
Also agreed.
>>
>
>>
>>> 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?
>>
>
> Yes you are right, I'll start that in coming week. All that i have done so
> far is just to populate the central list. In that also, eliminating
> duplicates, showing appropriate messages while adding/removing column,
> writing documentation for the new configuration directive still need to be
> done for this week.
Yes, while reviewing your code, I keep the perspective that this is work
in progress and we'll see the complete results only after the full
feature is implemented. Still, I wanted to clarify the "sync" aspect.
>
>
>>> 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,
>>
>
> Ok. So if a column is already existing and user tries to add same column
> again, We will show error saying column already exist. If they still want
> to update, they need to first remove that column and then add ?.
>
> Similarly if a columns has never added and being tried to remove, we show
> error saying column doesn't exist in central list.
>
>>> Please let me know if I'm interpreting the problem[0] wrongly.
>>>
>>> [0] http://sourceforge.net/p/phpmyadmin/feature-requests/1477/
>>
>> --
>> Marc Delisle | phpMyAdmin
--
Marc Delisle (phpMyAdmin)
More information about the Developers
mailing list