ó Þ@Qc@skddlmZddlZddlmZedddddd ƒZd efd „ƒYZeƒZejej ƒd „ƒZ ejej ej ej j ƒd „ƒZ ejej jej jej jƒd„ƒZejej jej jej jej jƒd„ƒZejej jej jej jej jƒd„ƒZejejej jej jej jƒd„ƒZejej jej jej jej jƒd„ƒZejej jej jej jej jƒd„ƒZejej jej jej jej jƒd„ƒZejej j ej jej j!ej jƒd„ƒZ"dS(iÿÿÿÿ(t DefineModuleN(tGenericMigrationtnametDbMySQLMigrationtauthors Oracle Corp.tversions1.0tMySQLMigrationcBsPeZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z RS(cCs|S(N((tselfRtlog((s$..\modules\db_mysql_migration_grt.pytmigrateIdentifierscCstd„}|jrC||jjjj|jjƒ|_|jdk S|jd||d|jj|jfƒtSdS(NcSs(x!|D]}|j|kr|SqWdS(N(t__id__tNone(tlisttoidto((s$..\modules\db_mysql_migration_grt.pytfind_object_with_ids isgmigrateTableColumnToMySQL: Cannot migrate column %s.%s because migration of its datatype is unsupported(t simpleTypetownertsimpleDatatypesR R taddMigrationLogEntryRtFalse(Rtstatet source_columnt target_columnR((s$..\modules\db_mysql_migration_grt.pytmigrateDatatypeForColumns  $ cCs|S(N((RRt default_valueRR((s$..\modules\db_mysql_migration_grt.pytmigrateColumnDefaultValue/scsÅtj||||ƒ}xrddddddddd d d d d ddddddddddddgD]}t||t||ƒƒqjWtrÁ‡fd†‰|jjˆ||jƒƒn|S(Nt tableEnginet nextAutoInctpasswordt delayKeyWritetdefaultCharacterSetNametdefaultCollationNamet mergeUniont mergeInsertt tableDataDirt tableIndexDirtpackKeystraidTypet raidChunkst raidChunkSizetchecksumt rowFormatt avgRowLengthtminRowstmaxRowst partitionTypetpartitionExpressiontpartitionCounttsubpartitionTypetsubpartitionExpressiontsubpartitionCountcs›g}xŽ|D]†}tjjƒ}x<dddddddgD]}t||t||ƒƒq>W||_|jjˆ||jƒƒ|j|ƒq W|S(NRtvaluetcommentt dataDirectorytindexDirectoryR-R,( tgrttclassestdb_mysql_PartitionDefinitiontsetattrtgetattrRtsubpartitionDefinitionstextendtappend(Rt part_listtltsrctdsttattr(tcopy_partitions(s$..\modules\db_mysql_migration_grt.pyRE=s " (RtmigrateTableToMySQLR;R<tTruetpartitionDefinitionsR>(RRt sourceTablet target_schemat targetTableRD((REs$..\modules\db_mysql_migration_grt.pyRF3s! cCsItj||||ƒ}x*dgD]}t||t||ƒƒq"W|S(Nt autoIncrement(RtmigrateTableColumnToMySQLR;R<(RRRRKRRD((s$..\modules\db_mysql_migration_grt.pyRMMscCs%tj||||ƒ}d|_|S(Ni(RtmigrateTriggerToMySQLt commentedOut(RRtsource_triggert target_tablettarget_trigger((s$..\modules\db_mysql_migration_grt.pyRNVs cCs%tj||||ƒ}d|_|S(Ni(RtmigrateViewToMySQLRO(RRt source_viewRJt target_view((s$..\modules\db_mysql_migration_grt.pyRS\s cCs%tj||||ƒ}d|_|S(Ni(RtmigrateRoutineToMySQLRO(RRtsource_routineRJttarget_routine((s$..\modules\db_mysql_migration_grt.pyRVbs ( t__name__t __module__R RRRFRMRNRSRV(((s$..\modules\db_mysql_migration_grt.pyRs      cCsdS(NtMysql((((s$..\modules\db_mysql_migration_grt.pytgetTargetDBMSNamejscCstj||ƒS(N(tinstanceR (RR((s$..\modules\db_mysql_migration_grt.pyR nscCstj||ƒS(N(R]tmigrateCatalog(Rt sourceCatalog((s$..\modules\db_mysql_migration_grt.pyR^rscCstj|||ƒS(N(R]t migrateSchema(Rt sourceSchemat targetCatalog((s$..\modules\db_mysql_migration_grt.pyR`wscCstj|||ƒS(N(R]RF(RRIRJ((s$..\modules\db_mysql_migration_grt.pyRF|scCstj|||ƒS(N(R]tmigrateTableToMySQL2ndPass(RRIRK((s$..\modules\db_mysql_migration_grt.pyRcscCstj|||ƒS(N(R]tmigrateTableForeignKeyToMySQL(Rt source_fkRK((s$..\modules\db_mysql_migration_grt.pyRd†scCstj|||ƒS(N(R]RN(RRPRQ((s$..\modules\db_mysql_migration_grt.pyRN‹scCstj|||ƒS(N(R]RS(RRTRJ((s$..\modules\db_mysql_migration_grt.pyRSscCstj|||ƒS(N(R]RV(RRWRJ((s$..\modules\db_mysql_migration_grt.pyRV•s(#twbRR8tdb_generic_migration_grtRt ModuleInfoRR]texporttSTRINGR\R9t GrtLogObjectR t db_Catalogtdb_migration_MigrationR^t db_SchemaR`tdb_TableRFtINTRctdb_mysql_ForeignKeyt db_ForeignKeyRdtdb_mysql_Triggert db_TriggerRNt db_mysql_Viewtdb_ViewRStdb_mysql_Routinet db_RoutineRV(((s$..\modules\db_mysql_migration_grt.pyts N *0996999