[TYPO3] Using the kickstarter, but not using uid as primary key?
Daniel Smedegaard Buus
danielbuus at gmail.com
Tue Nov 7 17:48:33 CET 2006
Peter Russ wrote:
> Daniel Smedegaard Buus schrieb:
>> Johannes Reichardt wrote:
>>
>>> Personally i dislike the uidness of typo3 since it confuses me while
>>> using tables (uid what?) - so i recommend to simply
>>> use the kstarter to the extend and tweak your sql afterwards. you can
>>> make a table dump with the extension manager which
>>> takes your changes into account.
>>
>> Hi Johannes, thanks for replying :)
>>
>> Okay, so how do you do it? You use the kickstarter, then tweak the files
>> it produces (is changing the TCA sufficient? Will I need to tweak more?),
>> then import? Or some other way?
>>
>> I'm looking at what is produced by the kickstarter, tca.php, tables.sql,
>> and so on, and I don't see anywhere that there's a "TYPO3 registration"
>> of the primary key going on, which leads me to believe that the uid field
>> is a requirement by TYPO3? Will I have to "hack" to be able to remove
>> this uid field?
>>
>> Thanks :)
>>
>>>> Hey :)
>>>>
>>>> I was wondering... I'd like to use the kickstarter, but I'd like to be
>>>> able to *not* use this auto_increment uid field, but one of my own
>>>> fields (a varchar) as the primary key. How would I go about doing that?
>>>> And would it cause me trouble later on?
>>>>
>>>> Thanks,
>>>> Daniel :)
>>>>
>>
>
> For compatibility reasons, e.g. using TS to query and render your data,
> I would stay with uid because many mechanismn depends on this value.
> Extend the ext_tables.sql manually to create an unique key for your
> field, e.g.
>
> UNIQUE KEY auction_id(auctioneer_id,auction_id)
>
Hi Peter, thanks for you reply :)
I have a problem with this, because the database is also to be used in a
different system, and on top of that, it's synchronized regularly with
external XML feeds.
So, having to unique identification fields for each table seems like a
management nightmare to me. I would really just like to lose this uid field
and let TYPO3 understand that it should use, say, an "ItemType" field for
primary key instead.
> Regs. Peter.
>
--
http://www.rhesusb.dk
More information about the TYPO3-english
mailing list