You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wookie.apache.org by "Scott Wilson (JIRA)" <ji...@apache.org> on 2011/09/07 17:34:10 UTC

[jira] [Created] (WOOKIE-237) Data migration script for 0.9.0 -> 0.9.1

Data migration script for 0.9.0 -> 0.9.1
----------------------------------------

                 Key: WOOKIE-237
                 URL: https://issues.apache.org/jira/browse/WOOKIE-237
             Project: Wookie
          Issue Type: Task
            Reporter: Scott Wilson
             Fix For: 0.9.1


For 0.9.1, we have a number of data model changes that effect existing database structures, and we should provide a means for updating without losing data.

We could provide a SQL script for migrating from 0.9.0, though I'm not sure whether this would work for the embedded database.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WOOKIE-237) Data migration script for 0.9.0 -> 0.9.1

Posted by "Paul Sharples (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WOOKIE-237?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13114706#comment-13114706 ] 

Paul Sharples commented on WOOKIE-237:
--------------------------------------

Do you think we should provide one for this situation? Afterall, this build is only meant as a quick start.

"The standalone version of wookie is not meant for full deployment purposes, rather it is intended as an easy and simple way to quickly see what wookie is about without the need to configure various databases and servers."

> Data migration script for 0.9.0 -> 0.9.1
> ----------------------------------------
>
>                 Key: WOOKIE-237
>                 URL: https://issues.apache.org/jira/browse/WOOKIE-237
>             Project: Wookie
>          Issue Type: Task
>            Reporter: Scott Wilson
>             Fix For: 0.9.1
>
>
> For 0.9.1, we have a number of data model changes that effect existing database structures, and we should provide a means for updating without losing data.
> We could provide a SQL script for migrating from 0.9.0, though I'm not sure whether this would work for the embedded database.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WOOKIE-237) Data migration script for 0.9.0 -> 0.9.1

Posted by "Scott Wilson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WOOKIE-237?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13114718#comment-13114718 ] 

Scott Wilson commented on WOOKIE-237:
-------------------------------------

Good point.

I've committed a MySQL5 migration script.

The questions are..

1. Do we need an UPGRADE doc file in the trunk and release explaining where it is?
2. Is there anywhere else we need to document the fact there are database changes?
3. Do we need scripts for other databases?

> Data migration script for 0.9.0 -> 0.9.1
> ----------------------------------------
>
>                 Key: WOOKIE-237
>                 URL: https://issues.apache.org/jira/browse/WOOKIE-237
>             Project: Wookie
>          Issue Type: Task
>            Reporter: Scott Wilson
>             Fix For: 0.9.1
>
>
> For 0.9.1, we have a number of data model changes that effect existing database structures, and we should provide a means for updating without losing data.
> We could provide a SQL script for migrating from 0.9.0, though I'm not sure whether this would work for the embedded database.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WOOKIE-237) Data migration script for 0.9.0 -> 0.9.1

Posted by "Scott Wilson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WOOKIE-237?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13109386#comment-13109386 ] 

Scott Wilson commented on WOOKIE-237:
-------------------------------------

Summary of changes from 0.9.0 to 0.9.1:

Widget

-Add columns:

    <column name="package_path" size="255" type="VARCHAR"/>
    <column name="default_locale" size="255" type="VARCHAR"/>
    <column name="update_location" type="LONGVARCHAR"/>
    <column name="dir" size="255" type="VARCHAR"/>
    <column name="lang" size="255" type="VARCHAR"/>

-Delete columns:

    <column name="widget_author" size="255" type="VARCHAR"/>
    <column name="widget_author_email" size="320" type="VARCHAR"/>
    <column name="widget_author_href" type="LONGVARCHAR"/>

Author

-New Table:

  <table name="Author">
    <column name="id" primaryKey="true" required="true" type="INTEGER"/>
    <column name="jpa_version" type="INTEGER"/>
    <column name="author" type="LONGVARCHAR"/>
    <column name="email" type="LONGVARCHAR"/>
    <column name="href"  type="LONGVARCHAR"/>
    <column name="lang" size="255" type="VARCHAR"/>
    <column name="dir" size="255" type="VARCHAR"/>
    <column name="widget_id" type="INTEGER"/>
    <foreign-key foreignTable="Widget" name="FKAuthor1">
      <reference foreign="id" local="widget_id"/>
    </foreign-key>
    <index name="IXAuthor1">
      <index-column name="widget_id"/>
    </index>
  </table>


Participant

-Delete column, foreign key and index:

    <column name="widget_id" required="true" type="INTEGER"/>
    <foreign-key foreignTable="Widget" name="FKParticipant1">
      <reference foreign="id" local="widget_id"/>
    </foreign-key>
    <index name="IXParticipant1">
      <index-column name="widget_id"/>
    </index>


Server Feature 

-Drop table


Migration script order would therefore be:

1. Drop ServerFeature table
2. Add Author table
3. Create Author rows from Widget table
4. Modify Widget table
5. Modify Participant table

> Data migration script for 0.9.0 -> 0.9.1
> ----------------------------------------
>
>                 Key: WOOKIE-237
>                 URL: https://issues.apache.org/jira/browse/WOOKIE-237
>             Project: Wookie
>          Issue Type: Task
>            Reporter: Scott Wilson
>             Fix For: 0.9.1
>
>
> For 0.9.1, we have a number of data model changes that effect existing database structures, and we should provide a means for updating without losing data.
> We could provide a SQL script for migrating from 0.9.0, though I'm not sure whether this would work for the embedded database.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WOOKIE-237) Data migration script for 0.9.0 -> 0.9.1

Posted by "Scott Wilson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WOOKIE-237?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13114694#comment-13114694 ] 

Scott Wilson commented on WOOKIE-237:
-------------------------------------

I can see how this works for the WAR version, as we can provide a SQL script that you can run against the DB using any DB utility. However, what happens for the embedded database in the standalone version?

> Data migration script for 0.9.0 -> 0.9.1
> ----------------------------------------
>
>                 Key: WOOKIE-237
>                 URL: https://issues.apache.org/jira/browse/WOOKIE-237
>             Project: Wookie
>          Issue Type: Task
>            Reporter: Scott Wilson
>             Fix For: 0.9.1
>
>
> For 0.9.1, we have a number of data model changes that effect existing database structures, and we should provide a means for updating without losing data.
> We could provide a SQL script for migrating from 0.9.0, though I'm not sure whether this would work for the embedded database.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira