Compare commits

..

1 Commits

Author SHA1 Message Date
coolneng 1232ba036e
Revert "Fix pgloader database URI"
This reverts commit fcc06ae4a0.
2021-02-24 01:52:33 +01:00
1 changed files with 25 additions and 26 deletions

View File

@ -21,38 +21,37 @@ in mkShell {
];
shellHook = ''
trap "kill 0" EXIT
export PGDATA="${psql_dir}"
export PGHOST="${psql_dir}"
trap "kill 0" EXIT
export PGDATA="${psql_dir}"
export PGHOST="${psql_dir}"
# Initialize PostgreSQL
if [ ! -d ${psql_dir} ]; then
initdb --auth-local=trust --no-locale --encoding=UTF8
fi
# Initialize PostgreSQL
if [ ! -d ${psql_dir} ]; then
initdb --auth-local=trust --no-locale --encoding=UTF8
fi
if ! pg_ctl status; then
pg_ctl start -o "--unix_socket_directories=${psql_dir} --listen_addresses='''"
fi
if ! pg_ctl status; then
pg_ctl start -o "--unix_socket_directories=${psql_dir} --listen_addresses='''"
fi
psql -d postgres -f ${psql_file}
psql -d postgres -f ${psql_file}
# Initialize MySQL
if [ ! -d ${mysql_dir} ]; then
mysqld --datadir="${mysql_dir}" --socket="${socket}" --initialize-insecure
fi
# Initialize MySQL
if [ ! -d ${mysql_dir} ]; then
mysqld --datadir="${mysql_dir}" --socket="${socket}" --initialize-insecure
fi
mysqld --datadir="${mysql_dir}" --socket="${socket}" --skip-networking &
sleep 5
mysqld --datadir="${mysql_dir}" --socket="${socket}" --skip-networking &
sleep 5
mysql --socket="${socket}" -u root < ${mysql_file}
mysql --socket="${socket}" -u root < ${mysql_file}
alias psql='psql -d postgres'
alias mysql='mysql --socket="${socket}" -u root'
alias nuke='rm -rf ${psql_dir} ${mysql_dir}'
alias psql='psql -d postgres'
alias mysql='mysql --socket="${socket}" -u root'
alias nuke='rm -rf ${psql_dir} ${mysql_dir}'
alembic upgrade head
pgloader ${origin} ${destination}
pg_dump odyfo > databases/migrated_db.sql
>>>>>>> parent of fcc06ae (Fix pgloader database URI)
'';
alembic upgrade head
pgloader ${origin} ${destination}
pg_dump odyfo > databases/migrated_db.sql
'';
}