Fix pgloader database URI
This commit is contained in:
parent
dc69f3d7f8
commit
fcc06ae4a0
12
shell.nix
12
shell.nix
|
@ -8,8 +8,10 @@ let
|
|||
mysql_file = "mysql_creation.sql";
|
||||
mysql_dir = "$(pwd)/.mysql";
|
||||
socket = "${mysql_dir}/mysql.sock";
|
||||
origin = "mysql:///odyfo";
|
||||
destination = "postgresql:///odyfo";
|
||||
prod_origin = "mysql://root@unix:${socket}:/odyfo";
|
||||
prod_destination = "postgresql://localhost/odyfo";
|
||||
test_origin = "mysql://root@unix:${socket}:/test_odyfo";
|
||||
test_destination = "postgresql://localhost/test_odyfo";
|
||||
|
||||
in mkShell {
|
||||
buildInputs = [
|
||||
|
@ -51,7 +53,9 @@ in mkShell {
|
|||
alias nuke='rm -rf ${psql_dir} ${mysql_dir}'
|
||||
|
||||
alembic upgrade head
|
||||
pgloader ${origin} ${destination}
|
||||
pg_dump odyfo > databases/migrated_db.sql
|
||||
pgloader ${prod_origin} ${prod_destination}
|
||||
pgloader ${test_origin} ${test_destination}
|
||||
pg_dump odyfo > databases/psql_prod_db.sql
|
||||
pg_dump test_odyfo > databases/psql_test_db.sql
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue