[{"data":1,"prerenderedAt":118},["ShallowReactive",2],{"docs-\u002Fdocs\u002Fintegration\u002Fpostgresql-mysql-schema-conversion":3},{"id":4,"title":5,"body":6,"description":109,"extension":110,"meta":111,"navigation":112,"path":113,"redirect":114,"seo":115,"stem":116,"__hash__":117},"docs\u002Fdocs\u002Fintegration\u002Fpostgresql-mysql-schema-conversion.md","PostgreSQL to MySQL Schema Conversion",{"type":7,"value":8,"toc":104},"minimark",[9,13,17,36,46,57,62,65,71,80,84],[10,11,5],"h1",{"id":12},"postgresql-to-mysql-schema-conversion",[14,15,16],"p",{},"MySQL does not have PostgreSQL-style schemas as separate namespaces within a database. When the source is PostgreSQL and the target is MySQL, DBConvert Streams flattens schema-qualified table names using the following rule:",[18,19,20,29],"ul",{},[21,22,23,24,28],"li",{},"tables from the ",[25,26,27],"code",{},"public"," schema keep the base table name",[21,30,31,32,35],{},"tables from non-public schemas get a schema prefix with a double underscore (",[25,33,34],{},"__",") separator",[37,38,44],"pre",{"className":39,"code":41,"language":42,"meta":43},[40],"language-text","public.users           → users\npublic.orders          → orders\ninventory.products     → inventory__products\nsales.orders           → sales__orders\nreporting.analytics    → reporting__analytics\n","text","",[25,45,41],{"__ignoreMap":43},[14,47,48,49,52,53,56],{},"Foreign key references are remapped the same way — if a FK points to ",[25,50,51],{},"inventory.products",", the MySQL target FK points to ",[25,54,55],{},"inventory__products",".",[58,59,61],"h2",{"id":60},"name-collisions","Name collisions",[14,63,64],{},"Review the source scope before running when multiple schemas contain tables with the same base name:",[37,66,69],{"className":67,"code":68,"language":42,"meta":43},[40],"inventory.products     → inventory__products\nsales.products         → sales__products       (no collision)\n",[25,70,68],{"__ignoreMap":43},[14,72,73,74,79],{},"A collision can still occur if the target database already contains a table whose name matches the flattened output. Open the target in ",[75,76,78],"a",{"href":77},"\u002Fdocs\u002Fdatabase-explorer\u002F","Data Explorer"," to check before starting.",[58,81,83],{"id":82},"related-docs","Related docs",[18,85,86,92,98],{},[21,87,88],{},[75,89,91],{"href":90},"\u002Fdocs\u002Fintegration\u002Ftranslate-ddl","Table Structure Conversion",[21,93,94],{},[75,95,97],{"href":96},"\u002Fdocs\u002Fintegration\u002Fpostgres-conversion-configuration","PostgreSQL Load Mode Guide",[21,99,100],{},[75,101,103],{"href":102},"\u002Fdocs\u002Fstreams\u002Fschema-selection-guide","Schema Selection Guide",{"title":43,"searchDepth":105,"depth":105,"links":106},2,[107,108],{"id":60,"depth":105,"text":61},{"id":82,"depth":105,"text":83},"How DBConvert Streams maps PostgreSQL schema-qualified table names to MySQL when schemas are involved.","md",{},false,"\u002Fdocs\u002Fintegration\u002Fpostgresql-mysql-schema-conversion",null,{"title":5,"description":109},"docs\u002Fintegration\u002Fpostgresql-mysql-schema-conversion","sEkB87Wdg4wJ3Ev5VGv0-gb6Tp11LH1At-Sud1sJfi0",1783896285596]