mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-22 04:58:01 +01:00
Added pgloader to vagrant install
This commit is contained in:
parent
7f2be0d6b6
commit
c3ad562a8e
2 changed files with 6 additions and 4 deletions
|
@ -18,15 +18,15 @@ class MysqlToPostgres extends Migration
|
|||
$this->console = new ConsoleOutput();
|
||||
|
||||
// Generate pgloader config
|
||||
$mysqlConnection = "from mysql://" . env('DB_USERNAME') . ":" . urlencode(env('DB_PASSWORD')) . "@" . env('DB_HOST') . "/" . env('DB_DATABASE');
|
||||
$postgresConnection = "into postgresql://" . env('POSTGRESQL_DB_USERNAME', 'homestead') . ":" . urlencode(env('POSTGRESQL_DB_PASSWORD', 'secret')) . "@" . env('POSTGRESQL_DB_HOST', 'localhost') . "/" . env('POSTGRESQL_DB_DATABASE', 'homestead');
|
||||
$mysqlConnection = "from mysql://" . env('DB_USERNAME') . ":" . env('DB_PASSWORD') . "@" . env('DB_HOST') . "/" . env('DB_DATABASE');
|
||||
$postgresConnection = "into postgresql://" . env('POSTGRESQL_DB_USERNAME', 'homestead') . ":" . env('POSTGRESQL_DB_PASSWORD', 'secret') . "@" . env('POSTGRESQL_DB_HOST', 'localhost') . "/" . env('POSTGRESQL_DB_DATABASE', 'homestead');
|
||||
|
||||
$header = "LOAD DATABASE";
|
||||
$body = <<<'EOD'
|
||||
with truncate
|
||||
|
||||
CAST type datetime to timestamp drop default drop not null using zero-dates-to-null,
|
||||
type date drop not null drop default using zero-dates-to-null
|
||||
CAST type datetime to timestamp using zero-dates-to-null,
|
||||
type date to timestamp using zero-dates-to-null
|
||||
|
||||
EXCLUDING TABLE NAMES MATCHING 'migrations';
|
||||
EOD;
|
||||
|
|
|
@ -27,6 +27,8 @@ sudo apt-get -qq install -y AtomicParsley flac vorbis-tools imagemagick oracle-j
|
|||
echo "Installing PHP extensions"
|
||||
sudo apt-get -qq install -y libgmp-dev php-gmp
|
||||
|
||||
echo "Installing Postgres migration tool"
|
||||
sudo apt-get -qq install -y pgloader
|
||||
|
||||
if type ffmpeg &>/dev/null; then
|
||||
echo "ffmpeg is installed!"
|
||||
|
|
Loading…
Reference in a new issue