[Cubicweb] cw migration from 3.10.8 to 3.10.9

Carlos Balderas carlos.balderas at gmail.com
Sun Mar 6 18:40:14 CET 2011


Hi Sylvain, I deleted the cwconstraints without constrained_by relation that
were making trouble, and migration worked.

I still do not know why the rql sentece 'DELETE CWConstraint X WHERE NOT E
constrained_by X' brings an empty resultset. =(



Thank you !
Regards
carlos balderas

On Thu, Mar 3, 2011 at 9:23 AM, Carlos Balderas
<carlos.balderas at gmail.com>wrote:

> Hi, Sylvain!
>
> This rql : rql('DELETE CWConstraint X WHERE NOT E constrained_by X')
>
> returns an empty resultset,
>
> <empty resultset for 'DELETE CWConstraint X WHERE NOT E constrained_by X'>
>
> Then I get the same error. =(
>
> Could It be something else missing in the rql sentence?
>
> Thank you.
> Carlos Balderas
>
>
> On Thu, Mar 3, 2011 at 8:01 AM, Sylvain Thénault <
> sylvain.thenault at logilab.fr> wrote:
>
>> On 03 mars 07:54, Carlos Balderas wrote:
>> > Hi List!
>>
>> Hey Carlos,
>>
>> > I have an instance which I'd like to migrate to cw 3.10.9 version.
>> >
>> > At the time to execute the question, "fix existing cwuir?"
>> >
>> > I get this error:
>> >
>> > Execute
>> >
>> '/home/carlos/src/fcubicweb/cubicweb/misc/migration/bootstrapmigration_repository.py'
>> > ? [Y/n/s(how)/a(bort)]:
>> > Execute '/home/carlos/src/fcubicweb/cubicweb/misc/migration/
>> 3.10.9_Any.py' ?
>> > [Y/n/s(how)/a(bort)]:
>> > fix existing cwuri? [Y/n/a(bort)/s(hell)]:
>> > [....................................................................
>> > ]Traceback (most recent call last):
>> >   File "/home/carlos/src/fcubicweb/cubicweb/cwctl.py", line 161, in
>> run_arg
>> >     status = cmdmeth(appid)
>> [snip]
>> >   File "/home/carlos/src/fcubicweb/cubicweb/hooks/syncschema.py", line
>> 681,
>> > in precommit_event
>> >     rdefentity = self.entity.reverse_constrained_by[0]
>> > IndexError: tuple index out of range
>> >
>> > I could you please give me clue about what could be happening here?. =)
>>
>> I encountered the same problem while migrating some of our apps: it
>> happeared
>> that the database held some buggy constraint entities which weren't
>> related to
>> any schema entity (hence not respecting schema cardinality). I dunno how,
>> and
>> should investigate. In the mean time, you can still remove them prior to
>> do
>> the migration:
>>
>> when asked "fix existing cwuri", type 's' (shell)
>> then drop buggy constraint with "rql('DELETE CWConstraint X WHERE NOT E
>> constrained_by X')"
>> then commit()
>> then quit the shell (Ctrl-D)
>>
>> --
>> Sylvain Thénault                               LOGILAB, Paris (France)
>> Formations Python, Debian, Méth. Agiles: http://www.logilab.fr/formations
>> Développement logiciel sur mesure:       http://www.logilab.fr/services
>> CubicWeb, the semantic web framework:    http://www.cubicweb.org
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cubicweb.org/pipermail/cubicweb/attachments/20110306/261ed9bb/attachment.htm>


More information about the Cubicweb mailing list