mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-24 10:26:22 +00:00
18 lines
450 B
Bash
Executable file
18 lines
450 B
Bash
Executable file
#!/bin/sh
|
|
set -e
|
|
|
|
cd /srv/http
|
|
|
|
test -f data/production.sqlite3.migrated && exit 0
|
|
|
|
bundle exec rake db:data:dump_dir dir=data
|
|
cat config/database.yml.pg > config/database.yml
|
|
|
|
bundle exec rake db:schema:load
|
|
|
|
rm db/data/ar_internal_metadata.yml
|
|
mv db/data/active_storage_attachments.yml db/data/zz_active_storage_attachments.yml
|
|
|
|
bundle exec rake db:data:load_dir dir=data truncate=false
|
|
|
|
mv data/production.sqlite3 data/production.sqlite3.migrated
|