Skip to content

Instantly share code, notes, and snippets.

@back-2-95
Created March 16, 2024 09:43
Show Gist options
  • Save back-2-95/55cb48adb989e61c76b675be0e5563a9 to your computer and use it in GitHub Desktop.
Save back-2-95/55cb48adb989e61c76b675be0e5563a9 to your computer and use it in GitHub Desktop.

Revisions

  1. back-2-95 created this gist Mar 16, 2024.
    8 changes: 8 additions & 0 deletions migrate.load
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    LOAD DATABASE
    FROM mysql://MY_PLANETSCALE_USERNAME:[email protected]/MY_DATABASE?sslmode=require
    INTO postgres://MY_NEON_USERNAME:endpoint=ep-MY_ENDPOINT_ID;MY_NEON_PASSWORD@ep-MY_ENDPOINT_ID.eu-central-1.aws.neon.tech/MY_DATABASE?sslmode=require

    WITH include drop, create tables, quote identifiers

    ALTER schema 'MY_DATABASE' rename to 'public'
    ;