diff --git a/shell.nix b/shell.nix index d019c17..b983ce2 100644 --- a/shell.nix +++ b/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 ''; }