Re: Adding TIMESTAMP Column to MySQL Table
Hi,
yes, you can easily add a new table migration method. Open the MigrationAccess.java class.
As you will see, public static MethodList migrationMethods() returns information about all migration methods that are added by this class. You need to add your new method there.
methods.add(mig.getMigrateTableToMysqlInfo());
In the next step, you have to implement the private Method getMigrateTableToMysqlInfo(). You can take a look at how I've implemented this method in the MigrationOracle.java class.
3 important things.
*) method.setName("migrateTableToMysql"); sets the name of the migration method you are going to implement.
*) method.setSourceStructName("db.oracle.Table"); sets the class name of the source object. As I did not declare any special package for the MS Access object, you have to use "db.Table" here.
*) method.setRating(1); defines the rating of your migration method. The default migration method has a rating of 0. If you always want the MT to choose your new method as default, you have to put at least 1 as the rating.
If you do not need any special parameters the users should be able to set in the MT user interface, you can call addMigrateTableToMysqlInfoParameters(method); right away. This will add the default parameters for tables as defined in MigrationGeneric.java.
Now you are ready to implement your migrateTableToMysql method. Again, you can take a look at this method in the MigrationOracle.java class. As you can see it calls the original method from MigrationGeneric first and then specific handling can be done. I planned to add some Oracle specific stuff but it was not necessary.
If you still have questions, please feel free to ask.
Mike
Michael Zinner, Team Lead, Developer Tools
MySQL AB, www.mysql.com
Are you MySQL certified? www.mysql.com/certification
Subject
Written By
Posted
November 14, 2005 10:23AM
November 15, 2005 06:23AM
Re: Adding TIMESTAMP Column to MySQL Table
November 21, 2005 07:24AM
November 21, 2005 11:03AM
November 21, 2005 11:45AM
November 23, 2005 12:50PM
November 23, 2005 12:57PM
November 24, 2005 08:05AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.