mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2025-02-16 18:14:23 +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();
|
$this->console = new ConsoleOutput();
|
||||||
|
|
||||||
// Generate pgloader config
|
// Generate pgloader config
|
||||||
$mysqlConnection = "from mysql://" . env('DB_USERNAME') . ":" . urlencode(env('DB_PASSWORD')) . "@" . env('DB_HOST') . "/" . env('DB_DATABASE');
|
$mysqlConnection = "from mysql://" . env('DB_USERNAME') . ":" . 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');
|
$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";
|
$header = "LOAD DATABASE";
|
||||||
$body = <<<'EOD'
|
$body = <<<'EOD'
|
||||||
with truncate
|
with truncate
|
||||||
|
|
||||||
CAST type datetime to timestamp drop default drop not null using zero-dates-to-null,
|
CAST type datetime to timestamp using zero-dates-to-null,
|
||||||
type date drop not null drop default using zero-dates-to-null
|
type date to timestamp using zero-dates-to-null
|
||||||
|
|
||||||
EXCLUDING TABLE NAMES MATCHING 'migrations';
|
EXCLUDING TABLE NAMES MATCHING 'migrations';
|
||||||
EOD;
|
EOD;
|
||||||
|
|
|
@ -27,6 +27,8 @@ sudo apt-get -qq install -y AtomicParsley flac vorbis-tools imagemagick oracle-j
|
||||||
echo "Installing PHP extensions"
|
echo "Installing PHP extensions"
|
||||||
sudo apt-get -qq install -y libgmp-dev php-gmp
|
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
|
if type ffmpeg &>/dev/null; then
|
||||||
echo "ffmpeg is installed!"
|
echo "ffmpeg is installed!"
|
||||||
|
|
Loading…
Reference in a new issue