Skip to content

Commit 8036063

Browse files
authored
Merge pull request #85 from dipakparmar/main
✨ add workflow script/spec for mysql db to postgres migration
2 parents 82c3bdd + 0c80a98 commit 8036063

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
name: Migrate from MySQL Database to PostgresSQL Database
3+
command: "pgloader mysql://{{mysql_username}}:{{mysql_password}}@{{mysql_hostname}}:{{mysql_port}}/{{mysql_database_name}} postgresql://{{postgres_username}}:{{postgres_password}}@{{postgres_hostname}}:{{postgres_port}}/{{postgres_database_name}}"
4+
tags:
5+
- postgresql
6+
- mysql
7+
description: Loads data from the MySQL database, transforms it to PostgresSQL compatible format and uploads it to the PostgresSQL database. Note - it requires pgloader to be installed and both PostgresSQL and MySQL hosts are accessible from the machine running this script.
8+
arguments:
9+
- name: mysql_username
10+
description: The username for the MySQL database.
11+
default_value: ~
12+
- name: mysql_password
13+
description: The password for the MySQL database.
14+
default_value: ~
15+
- name: mysql_hostname
16+
description: The hostname for the MySQL database.
17+
default_value: ~
18+
- name: mysql_port
19+
description: The port for the MySQL database.
20+
default_value: 3306
21+
- name: mysql_database_name
22+
description: The name of the MySQL database.
23+
default_value: ~
24+
- name: postgres_username
25+
description: The username for the Postgres database.
26+
default_value: ~
27+
- name: postgres_password
28+
description: The password for the Postgres database.
29+
default_value: ~
30+
- name: postgres_hostname
31+
description: The hostname for the Postgres database.
32+
default_value: ~
33+
- name: postgres_port
34+
description: The port for the Postgres database.
35+
default_value: 5432
36+
- name: postgres_database_name
37+
description: The name of the Postgres database.
38+
default_value: ~
39+
source_url: "https://docs.dipak.tech/database/postgres/postgres-migration"
40+
author: Dipak Parmar
41+
author_url: "https://github.com/dipakparmar"
42+
shells: []

0 commit comments

Comments
 (0)