Hi,

At least, you have progressed, you achieved the configuration so that the
migration was tried, but has failed.

Your diagnosis about what happened seems to me quite right. We drop only FK
constraints, and we do not care about any PK constraints, since our
supported databases are not affected by this.

Hopelessly, I cannot provide you with the liquibase changelogs, since these
are generated on the fly for R40000XWIKI6990, depending on the source
databases. Basically, it does <dropForeignKeyConstraint> for all FK found
in the hibernate mapping table concerned by the ID changes, then
<modifyDataType> to BIGINT for those IDs which have to be enlarged, and
finally it <addForeignKeyConstraint> back with an onUpdate="CASCADE"
(except for Oracle where it use initiallyDeferred=true).

The above is probably not helping much. Since MSSQL is unsupported, you are
on a little bit on your own with this, and I could only suggest some tricky
ideas that may absolutely not work. Here is what you may try:
1) from a fresh DB, launch the migration, it will fail but will have
dropped the FK and it should not try again. This is your current state. You
may check it does not try again by restarting the wiki again, and ensure
that it fails at the same point.
2) manually drop the PK constraints for all table having such definition
for an IDs that has his datatype changed. Enlarged IDs are all those that
are related to objects, and statistics.
3) Restart the wiki, it should hopefully go further, and may probably fail
when we try to put FK constraints back.
4) manually recreate the PK constraints for all drop you have made.
5) Restart the wiki again, and cross fingers ! If you are lucky, it will
terminate liquibase updates, and start the data migration.

Once again, these are only suggestions, and your chances for success
are honestly quite low. Anyway, please let me know the outcome. If it does
not work and you are willing to collaborate and could provide needed inputs
and testing supports, I will try to find some time to work with you on
improving our migration procedure. Contact me in private regarding this
last point.

Regards,

On Fri, Aug 3, 2012 at 3:31 PM, rheim651 <rob.h...@mckesson.com> wrote:

> Okay, here is an Update:  Using the xwiki.cfg file I posted to pastebin, I
> modified
> xwiki.store.migration=1
>
> After restarting the server I am still getting the exact same error message
> in the browser.
>
> Looking at the DATABASECHANGELOG from inside the target database, the
> Liquibase executions  get as far as removing the Foreign Keys.  It seems to
> fail when attempting to change the datatype on the Primary Key for
> xwikiobjects.
>
> In the stdout file I am now seeing the following liquibase error when
> attempting to change the datatype on the Primary Key for xwikiobjects to
> BIGINT.
>
> 2012-08-03 08:21:00,691 [http://10.43.30.38:9080/xwiki/bin/view/Main/]
> ERROR
> c.x.x.s.m.liquibase            - Change Set
> liquibase.xml::R40000-009::dgervalle failed.  Error: Error executing SQL
> ALTER TABLE [dbo].[xwikiobjects] ALTER COLUMN [XWO_ID] BIGINT: The object
> 'PK__xwikiobj__6F7E67F86383C8BA' is dependent on column 'XWO_ID'.
>
> I believe the reason for this error is that on SQL Server the Primary Key
> constraint should to be dropped first before you can change the datatype.
> (At least that's what I found in my script testing).
>
> Would it be possible to see the liquibase changelogs for this migration?
> I'm not sure where in the package this information is stored.
>
>
>
>
>
>
>
>
> --
> View this message in context:
> http://xwiki.475771.n2.nabble.com/Problem-Migrating-Database-from-XWiki-Ent-3-5-1-to-4-1-3-for-MSSQL-tp7580579p7580704.html
> Sent from the XWiki- Users mailing list archive at Nabble.com.
> _______________________________________________
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>



-- 
Denis Gervalle
SOFTEC sa - CEO
eGuilde sarl - CTO
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to