Skip to content

Add option to change schema name #39

Description

Since in Postgres a database contains one or more named schemas and in MySQL schema=database, when converting from Postgres, add an option to set the database name for MySQL.

In our case, we have a database named "testdb" and the schema named "public", but in MySQL we only have the schema "testdb", however in the converted file it will keep the Postgres schema name.

Right now we are using sed to replace:

sed -i -e 's/\s${POSTGRES_SCHEMA};/ ${MYSQL_DB};/gi' "${MYSQL_DUMP}.sql"
sed -i -e 's/\s${POSTGRES_SCHEMA}\./ ${MYSQL_DB}\./gi' "${MYSQL_DUMP}.sql"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions