I believe this means in the tables in question you have duplicate values so
the PK can't be created. You would need to dedupe the tables in question to
be able to then apply the indexing. To do that you'd run the following
queries:
Please take a backup first and also change the delete from to select * from
first to confirm what will be deleted. Use at own risk, disclaimer etc :)
delete from a
from
(select objectid, categoryid
,ROW_NUMBER() over (partition by objectid, categoryid
order by objectid, categoryid
) RowNumber
from refcategories) a
where a.RowNumber > 1
delete from a
from
(select objectid, typename
,ROW_NUMBER() over (partition by objectid, typename
order by objectid, typename
) RowNumber
from refobjects) a
where a.RowNumber > 1
On 3 April 2013 10:06, Might Aswell <[email protected]> wrote:
> Thanks Jason,
>
> I seem to be having issues cleaning up COAPI after this upgrade,
> particilarly on refcats and refobjects as I have duplicate values
>
> for example, trying to deploy changes for refcats..
>
> [Macromedia][SQLServer JDBC Driver][SQLServer]The CREATE UNIQUE INDEX
> statement terminated because a duplicate key was found for the object name
> 'dbo.refCategories' and the index name 'PK__refCategories__59C61FAD'. The
> duplicate key value is (1A31242A-4636-11DE-BF9A005056B02320,
> FDAAFF10-C25E-11DE-A383005056B02320).
>
> refobjects
>
> [Macromedia][SQLServer JDBC Driver][SQLServer]The CREATE UNIQUE INDEX
> statement terminated because a duplicate key was found for the object name
> 'dbo.refObjects' and the index name 'PK__refObjects__5BAE681F'. The
> duplicate key value is (05BC5C9F-5056-B03B-BAE2CF5A04773B7F).
>
> then for nestedtreeobjects... nleft and right wont repair...
>
> Failed to repair 'nested_tree_objects.nleft' column ---- the object
> 'CK__nested_tree_obje__67FE6514' is dependent on column 'nleft'. ---- ALTER
> TABLE ALTER COLUMN nleft failed because one or more objects access this
> column.
>
>
>
> On Tuesday, April 2, 2013 1:15:28 PM UTC-7, Jason Barnes wrote:
>
>> It's one primary key made up of two properties which is valid.
>>
>> Sent from my iPhone
>>
>> On 03/04/2013, at 6:16 AM, Might Aswell <[email protected]> wrote:
>>
>>
>> <cfcomponent displayname="Category References" hint="Category-Object
>> associations" extends="schema" output="false">
>> <cfproperty name="objectid" type="uuid" dbNullable="false"
>> dbPrimaryKey="true" />
>> <cfproperty name="categoryid" type="uuid" dbNullable="false"
>> dbPrimaryKey="true" />
>> </cfcomponent>
>>
>> looking at refCategories.cfc... Is is legit to have 2 primary keys in a
>> table?
>>
>>
>> On Monday, April 1, 2013 4:37:57 PM UTC-7, Blair McK wrote:
>>>
>>> Can you try "mssql2005" as the dbtype? I don't remember what the
>>> differences where that required a separate db gateway, but this issue may
>>> be related.
>>>
>>> Blair
>>>
>>>
>>> On Tue, Apr 2, 2013 at 8:39 AM, Might Aswell <[email protected]> wrote:
>>>
>>>> MSSQL 2005 - Collation: SQL_Latin1_General_CP1_CI_AS
>>>>
>>>>
>>>>
>>>> On Tuesday, March 26, 2013 5:26:20 PM UTC-7, Jason Barnes wrote:
>>>>
>>>>> Can you paste the db collation
>>>>>
>>>>> On 27 March 2013 11:21, Might Aswell <[email protected]> wrote:
>>>>>
>>>>>> I'm using MSSQL2K5 I dont believe any case sensitive settings have
>>>>>> been set..
>>>>>>
>>>>>>
>>>>>> On Tuesday, March 26, 2013 4:17:47 PM UTC-7, Blair McK wrote:
>>>>>>
>>>>>>> Jason gave me poke to take a look at the dumps. The second dump you
>>>>>>> sent (tablemetadata) is the struct that FarCry compares with the DB as
>>>>>>> it
>>>>>>> is. You've mentioned refCategories, nested_tree_objects, and dmHTML -
>>>>>>> all
>>>>>>> three have an "objectid" property in their array of fields, and FarCry
>>>>>>> should only suggest dropping a field if it ISN'T in that struct and IS
>>>>>>> in
>>>>>>> the database. I think we can firmly rule out memory corruption /
>>>>>>> ColdFusion
>>>>>>> weirdness.
>>>>>>>
>>>>>>> What DB are you using? Is it possible you have case-sensitivity
>>>>>>> enabled? - that has caused problems for us in past.
>>>>>>>
>>>>>>> Blair
>>>>>>>
>>>>>>>
>>>>>>> On Wed, Mar 27, 2013 at 6:43 AM, Might Aswell <[email protected]>wrote:
>>>>>>>
>>>>>>>> Any thoughts?
>>>>>>>>
>>>>>>>>
>>>>>>>> On Wednesday, March 20, 2013 10:53:13 PM UTC-7, Jason Barnes wrote:
>>>>>>>>
>>>>>>>>> Not sure if my previous post worked but cfdump the following two
>>>>>>>>> scopes for debugging and attach as txt files to this thread:
>>>>>>>>>
>>>>>>>>> application.fc.lib.db.**tablemet******adata
>>>>>>>>>
>>>>>>>>> application.stCoapi["dmHTML"]
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Thursday, March 21, 2013 3:50:51 AM UTC+11, Might Aswell wrote:
>>>>>>>>>>
>>>>>>>>>> Hi all.. just a quick ? for anyone that might know... just
>>>>>>>>>> upgraded from 6-0-15 to 6.2.7 and see a lot of schema changes.. I
>>>>>>>>>> notice
>>>>>>>>>> objectid is to be dropped in many tables.. should I be worried about
>>>>>>>>>> this..
>>>>>>>>>> seems like I use objectID in a lot of places...
>>>>>>>>>>
>>>>>>>>> --
>>>>>>>> You received this message cos you are subscribed to "farcry-dev"
>>>>>>>> Google group.
>>>>>>>> To post, email: [email protected]
>>>>>>>> To unsubscribe, email: farcry-dev+...@**googlegroups.**co**m
>>>>>>>>
>>>>>>>> For more options:
>>>>>>>> http://groups.google.com/**group****/farcry-dev<http://groups.google.com/group/farcry-dev>
>>>>>>>> ------------------------------******--
>>>>>>>> Follow us on Twitter: http://twitter.com/farcry
>>>>>>>> ---
>>>>>>>> You received this message because you are subscribed to the Google
>>>>>>>> Groups "farcry-dev" group.
>>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>>> send an email to farcry-dev+...@**googlegroups.**co**m.
>>>>>>>>
>>>>>>>> For more options, visit https://groups.google.com/**grou****
>>>>>>>> ps/opt_out <https://groups.google.com/groups/opt_out>.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>> You received this message cos you are subscribed to "farcry-dev"
>>>>>> Google group.
>>>>>> To post, email: [email protected]
>>>>>> To unsubscribe, email: farcry-dev+...@**googlegroups.**com
>>>>>> For more options:
>>>>>> http://groups.google.com/**group**/farcry-dev<http://groups.google.com/group/farcry-dev>
>>>>>> ------------------------------****--
>>>>>> Follow us on Twitter: http://twitter.com/farcry
>>>>>> ---
>>>>>> You received this message because you are subscribed to a topic in
>>>>>> the Google Groups "farcry-dev" group.
>>>>>> To unsubscribe from this topic, visit https://groups.google.com/d/**
>>>>>> to**pic/farcry-dev/fAT9Z3jy-LE/**uns**ubscribe?hl=en-GB<https://groups.google.com/d/topic/farcry-dev/fAT9Z3jy-LE/unsubscribe?hl=en-GB>
>>>>>> .
>>>>>> To unsubscribe from this group and all of its topics, send an email
>>>>>> to farcry-dev+...@**googlegroups.**com.
>>>>>>
>>>>>> For more options, visit
>>>>>> https://groups.google.com/**grou**ps/opt_out<https://groups.google.com/groups/opt_out>
>>>>>> .
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Jason Barnes | CTO | Daemon | p. 02 8999 8885 |
>>>>> http://www.daemon.com.au
>>>>>
>>>> --
>>>> You received this message cos you are subscribed to "farcry-dev" Google
>>>> group.
>>>> To post, email: [email protected]
>>>> To unsubscribe, email: farcry-dev+...@googlegroups.**com
>>>> For more options:
>>>> http://groups.google.com/**group/farcry-dev<http://groups.google.com/group/farcry-dev>
>>>> ------------------------------**--
>>>> Follow us on Twitter: http://twitter.com/farcry
>>>> ---
>>>> You received this message because you are subscribed to the Google
>>>> Groups "farcry-dev" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to farcry-dev+...@googlegroups.**com.
>>>> For more options, visit
>>>> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>>>> .
>>>>
>>>>
>>>>
>>>
>>> --
>> You received this message cos you are subscribed to "farcry-dev" Google
>> group.
>> To post, email: [email protected]
>> To unsubscribe, email: farcry-dev+...@**googlegroups.com
>> For more options:
>> http://groups.google.com/**group/farcry-dev<http://groups.google.com/group/farcry-dev>
>> ------------------------------**--
>> Follow us on Twitter: http://twitter.com/farcry
>> ---
>> You received this message because you are subscribed to a topic in the
>> Google Groups "farcry-dev" group.
>> To unsubscribe from this topic, visit https://groups.google.com/d/**
>> topic/farcry-dev/fAT9Z3jy-LE/**unsubscribe?hl=en-GB<https://groups.google.com/d/topic/farcry-dev/fAT9Z3jy-LE/unsubscribe?hl=en-GB>
>> .
>> To unsubscribe from this group and all of its topics, send an email to
>> farcry-dev+...@**googlegroups.com.
>> For more options, visit
>> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>> .
>>
>>
>>
>> --
> You received this message cos you are subscribed to "farcry-dev" Google
> group.
> To post, email: [email protected]
> To unsubscribe, email: [email protected]
> For more options: http://groups.google.com/group/farcry-dev
> --------------------------------
> Follow us on Twitter: http://twitter.com/farcry
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "farcry-dev" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/farcry-dev/fAT9Z3jy-LE/unsubscribe?hl=en-GB
> .
> To unsubscribe from this group and all of its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
--
Jason Barnes | CTO | Daemon | p. 02 8999 8885 | http://www.daemon.com.au
--
You received this message cos you are subscribed to "farcry-dev" Google group.
To post, email: [email protected]
To unsubscribe, email: [email protected]
For more options: http://groups.google.com/group/farcry-dev
--------------------------------
Follow us on Twitter: http://twitter.com/farcry
---
You received this message because you are subscribed to the Google Groups
"farcry-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.