Final save before migration
This commit is contained in:
parent
34dd514015
commit
e4fcf945b7
47
.env.production.migration
Normal file
47
.env.production.migration
Normal file
@ -0,0 +1,47 @@
|
||||
# Generated with mastodon:setup on 2022-11-15 15:48:19 UTC
|
||||
|
||||
LOCAL_DOMAIN=wobbl.xyz
|
||||
SECRET_KEY_BASE=c83da357f00bdffa6701aa01e6c9bc116c6ef9279df7dcf1d8c38d23c819ac9de81302113b1e2c10ecdb927b15f06001cb75a90c8cfe7b9b98be95b1dd5188ba
|
||||
OTP_SECRET=792df590b3e0796e6ba6703e516efe83c839d5d4be3769bfa043b0e91d155ffb74f0e2d536db5c92142aaccddbf66b1c26c34d77be418a015e3f2463a6e22320
|
||||
VAPID_PRIVATE_KEY=WY5iQamqojTy6wbgrafpzqc8I98TLA-ICd3jJlPqmVg=
|
||||
VAPID_PUBLIC_KEY=BH4EG4Ptt-__2lG7J8r7E10KDREzkSQWlqWjk12ZypX7_-z4STFDKqhLEnW_k73tSZY9DIBpePgD2oE6WfV52tU=
|
||||
DB_HOST=wobbl-db-do-user-12896033-0.b.db.ondigitalocean.com
|
||||
DB_PORT=25061
|
||||
DB_NAME=mastodon_production
|
||||
DB_USER=doadmin
|
||||
DB_PASS=AVNS_PRyTPQxHtb2b0hVU6k9
|
||||
PREPARED_STATEMENTS=false
|
||||
REDIS_HOST=localhost
|
||||
REDIS_PORT=6379
|
||||
SMTP_SERVER=smtppro.zoho.com
|
||||
SMTP_PORT=465
|
||||
SMTP_LOGIN=drew@gyro-tech.net
|
||||
SMTP_PASSWORD=xBb11buC51Uw
|
||||
SMTP_AUTH_METHOD=plain
|
||||
SMTP_OPENSSL_VERIFY_MODE=none
|
||||
SMTP_FROM_ADDRESS=Mastodon <notifications@wobbl.xyz>
|
||||
SMTP_SSL=true
|
||||
S3_ALIAS_HOST=media.wobbl.xyz
|
||||
S3_ENABLED=true
|
||||
S3_BUCKET=wobblstore
|
||||
AWS_ACCESS_KEY_ID=DO00CAHETF4R6VJUL2CY
|
||||
AWS_SECRET_ACCESS_KEY=2TdKYVE2Q7tl4gl5kNHAN9hedJ/4IOWSTciIKshviR0
|
||||
S3_PROTOCOL=https
|
||||
S3_REGION=us-east-1
|
||||
S3_HOSTNAME=wobblstore.nyc3.digitaloceanspaces.com
|
||||
S3_ENDPOINT=https://nyc3.digitaloceanspaces.com
|
||||
ES_ENABLED=true
|
||||
ES_HOST=localhost
|
||||
ES_PORT=9200
|
||||
DEEPL_API_KEY="eb039661-3635-bf38-6d92-19a2a15c0795:fx"
|
||||
DEEPL_PLAN=free
|
||||
STATSD_ADDR=localhost:9125
|
||||
MAX_TOOT_CHARS=1500
|
||||
|
||||
|
||||
# Scaling work
|
||||
WEB_CONCURRENCY=5
|
||||
MAX_THREADS=5
|
||||
DB_POOL=18
|
||||
|
||||
MAX_IMAGE_SIZE=16777216
|
48
.env.production.old
Normal file
48
.env.production.old
Normal file
@ -0,0 +1,48 @@
|
||||
# Generated with mastodon:setup on 2022-11-15 15:48:19 UTC
|
||||
|
||||
LOCAL_DOMAIN=wobbl.xyz
|
||||
SECRET_KEY_BASE=c83da357f00bdffa6701aa01e6c9bc116c6ef9279df7dcf1d8c38d23c819ac9de81302113b1e2c10ecdb927b15f06001cb75a90c8cfe7b9b98be95b1dd5188ba
|
||||
OTP_SECRET=792df590b3e0796e6ba6703e516efe83c839d5d4be3769bfa043b0e91d155ffb74f0e2d536db5c92142aaccddbf66b1c26c34d77be418a015e3f2463a6e22320
|
||||
VAPID_PRIVATE_KEY=WY5iQamqojTy6wbgrafpzqc8I98TLA-ICd3jJlPqmVg=
|
||||
VAPID_PUBLIC_KEY=BH4EG4Ptt-__2lG7J8r7E10KDREzkSQWlqWjk12ZypX7_-z4STFDKqhLEnW_k73tSZY9DIBpePgD2oE6WfV52tU=
|
||||
DB_HOST=/var/run/postgresql
|
||||
DB_PORT=5432
|
||||
DB_NAME=mastodon_production
|
||||
DB_USER=mastodon
|
||||
DB_PASS=bDyxK8nLdCgm
|
||||
#PREPARED_STATEMENTS=false
|
||||
REDIS_HOST=localhost
|
||||
REDIS_PORT=6379
|
||||
SMTP_SERVER=smtppro.zoho.com
|
||||
SMTP_PORT=465
|
||||
SMTP_LOGIN=drew@gyro-tech.net
|
||||
SMTP_PASSWORD=xBb11buC51Uw
|
||||
SMTP_AUTH_METHOD=plain
|
||||
SMTP_OPENSSL_VERIFY_MODE=none
|
||||
SMTP_FROM_ADDRESS=Mastodon <notifications@wobbl.xyz>
|
||||
SMTP_SSL=true
|
||||
S3_ALIAS_HOST=media.wobbl.xyz
|
||||
S3_ENABLED=true
|
||||
S3_BUCKET=wobblstore
|
||||
AWS_ACCESS_KEY_ID=DO00CAHETF4R6VJUL2CY
|
||||
AWS_SECRET_ACCESS_KEY=2TdKYVE2Q7tl4gl5kNHAN9hedJ/4IOWSTciIKshviR0
|
||||
S3_PROTOCOL=https
|
||||
S3_REGION=us-east-1
|
||||
S3_HOSTNAME=wobblstore.nyc3.digitaloceanspaces.com
|
||||
S3_ENDPOINT=https://nyc3.digitaloceanspaces.com
|
||||
ES_ENABLED=true
|
||||
ES_HOST=localhost
|
||||
ES_PORT=9200
|
||||
DEEPL_API_KEY="eb039661-3635-bf38-6d92-19a2a15c0795:fx"
|
||||
DEEPL_PLAN=free
|
||||
STATSD_ADDR=localhost:9125
|
||||
MAX_TOOT_CHARS=1500
|
||||
|
||||
|
||||
# Scaling work
|
||||
WEB_CoNCURRENCY=5
|
||||
MAX_THREADS=5
|
||||
DB_POOL=25
|
||||
|
||||
# Image Size
|
||||
MAX_IMAGE_SIZE=16777216
|
@ -1,6 +1,6 @@
|
||||
import EXIF from 'exif-js';
|
||||
|
||||
const MAX_IMAGE_PIXELS = 2073600; // 1920x1080px
|
||||
const MAX_IMAGE_PIXELS = 8294400; // 3840x2160px
|
||||
|
||||
const _browser_quirks = {};
|
||||
|
||||
|
129
ca-certificate.crt
Normal file
129
ca-certificate.crt
Normal file
@ -0,0 +1,129 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11" />
|
||||
<meta name="msapplication-TileImage" content="resources/images/icon_tile.png?v=4398" />
|
||||
<meta name="application-name" content="GYRO-NAS" />
|
||||
<meta name="msapplication-TileColor" content="#246BB3"/>
|
||||
<meta name="description" content="Synology NAS provides a full-featured network attached storage (NAS) solution to help you manage, backup and share data among Windows, Mac and Linux easily." />
|
||||
<meta name="keywords" content="Multitasking,Web Application,Personal Cloud" />
|
||||
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
|
||||
|
||||
<link rel="mask-icon" href="webman/safari_pin_icon.svg" color="#0086E5" />
|
||||
<link rel="shortcut icon" href="webman/favicon.ico?v=40438" />
|
||||
<link rel="shortcut icon" href="webman/resources/images/icon_dsm_96.png?v=40438" sizes="96x96"/>
|
||||
<link rel="shortcut icon" href="webman/resources/images/icon_dsm_64.png?v=40438" sizes="64x64"/>
|
||||
<link rel="shortcut icon" href="webman/resources/images/icon_dsm_48.png?v=40438" sizes="48x48"/>
|
||||
<link rel="shortcut icon" href="webman/resources/images/icon_dsm_32.png?v=40438" sizes="32x32"/>
|
||||
<link rel="shortcut icon" href="webman/resources/images/icon_dsm_16.png?v=40438" sizes="16x16"/>
|
||||
<title>GYRO-NAS</title>
|
||||
<link rel="stylesheet" type="text/css" href="scripts/ext-3.4/resources/css/ext-all.css?v=1672898121" />
|
||||
<link rel="stylesheet" type="text/css" href="scripts/scrollbar/flexcroll.css?v=1672898121" />
|
||||
<link rel="stylesheet" type="text/css" href="scripts/ext-3/ux/ux-all.css?v=1672898121" />
|
||||
<link rel="stylesheet" type="text/css" href="synoSDSjslib/sds.css?v=1683108982" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/desktop/dist/style.css?v=1683699872" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/sds/dist/style.css?v=1683699872" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/taskbar/dist/style.css?v=1683699872" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/resources/css/desktop.css?v=1683699872" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/login/dist/style.css?v=1683699872" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/TinyMCE/style.css?v=1664290641" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/ClipBoardJS/style.css?v=1683795523" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/Utils/style.css?v=1683795523" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/Widgets/style.css?v=1683699872" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/BandwidthControl/style.css?v=1634102886" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/DiskMessageHandler/style.css?v=1683699872" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/UpdateMaskApp/style.css?v=1683699872" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/HelpBrowser/style.css?v=1683795523" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/SharingManager/style.css?v=1683795523" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/ResourceMonitor/style.css?v=1683699872" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/MyDSCenter/style.css?v=1683795523" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/AudioPlayer/style.css?v=1683795523" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/Share/style.css?v=1683795523" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/ResetAdminApp/style.css?v=1683699872" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/DesktopProgress/style.css?v=1683795523" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/PersonalSettings/style.css?v=1683795523" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/WelcomeApp/style.css?v=1683699872" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/BackgroundTaskMonitor/style.css?v=1683795523" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/HotkeyManager/style.css?v=1683699872" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/LogCenter/style.css?v=1683102860" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/AdminCenter/style.css?v=1684221484" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/C3/style.css?v=1683699872" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/VideoPlayer2/style.css?v=1672294400" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/FileChooser/style.css?v=1683795523" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/EnableNewUpdateSetting/style.css?v=1683699872" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/ConfigBackup/style.css?v=1681465681" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/PhotoViewer/style.css?v=1683795523" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/DSMNotify/style.css?v=1683795523" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/SystemInfoApp/style.css?v=1683699872" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/SupportForm/style.css?v=1683795523" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/TaskSchedulerUtils/style.css?v=1683795523" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/TaskSchedulerWidget/style.css?v=1683699872" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/StorageManager/style.css?v=1683699872" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/PkgManApp/style.css?v=1683795523" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/OTPWizard/style.css?v=1683795523" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/SecurityScan/style.css?v=1673258467" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/PollingTask/style.css?v=1683795523" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/ExternalDevices/style.css?v=1683699872" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/DataDrivenDocuments/style.css?v=1683699872" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/ScsiTarget/style.css?v=1682669852" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/MediaServer/style.css?v=1678790334" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/DownloadStation/style.css?v=1678963497" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/SynologyApplicationService/style.css?v=1680860414" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/SupportService/style.css?v=1684410294" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/SynoFinder/style.css?v=1679717023" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/HyperBackup/style.css?v=1681269975" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/FileTaskMonitor/style.css?v=1688118145" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/ActiveInsight/style.css?v=1686219681" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/SynologyDrive-ShareSync/style.css?v=1684478206" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/CodecPack/style.css?v=1678789109" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/AudioStation/style.css?v=1678958732" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/SynologyDrive/style.css?v=1684478211" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/VPNCenter/style.css?v=1678785883" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/AntiVirus/style.css?v=1681806841" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/VideoStation/style.css?v=1682651714" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/LogCenter/style.css?v=1684289330" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/SynologyPhotos/style.css?v=1685941114" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/CloudSync/style.css?v=1686280500" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/DhcpServer/style.css?v=1681815017" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/SynologyDrive-Drive/style.css?v=1684478206" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/FileBrowser/style.css?v=1688118153" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/SMBService/style.css?v=1688543926" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/OAuthService/style.css?v=1678783966" />
|
||||
<link rel="stylesheet" type="text/css" href="sharing/style.css?v=1669770591" />
|
||||
<link rel="stylesheet" type="text/css" href="../scripts/ext-3.4/resources/css/ext-all.css?v=1690892764" />
|
||||
<link rel="stylesheet" type="text/css" href="../webman/3rdparty/FileBrowser/style.css?v=1690892764" />
|
||||
<link rel="stylesheet" type="text/css" href="../webman/3rdparty/FileBrowser/custom_template.css?v=1690892764" />
|
||||
|
||||
</head>
|
||||
<body role="application">
|
||||
<div id="sds-wallpaper"></div>
|
||||
<!-- Don't contain any text node to avoid IE insertBefore bug -->
|
||||
<div id="sds-login-dialog-form" style="position: absolute; top: -10000px; left: -10000px;"><form id="login-form" class="x-plain-body" method="POST" action="webman/login.cgi" target="login_iframe"><input type="text" class="x-form-text" id="login_username" name="username" maxlength="256" /><input type="password" class="x-form-text" id="login_passwd" name="passwd" maxlength="256" autocomplete="off" /><input class="x-form-text" type="text" id="login_otp" name="OTPcode" maxlength="8" autocomplete="off" /><input type="submit" id="login_submit" style="position: absolute; top: -10000px; left: -10000px;" tabindex="-1" /></form><iframe id="login_iframe" name="login_iframe" width="0" height="0" frameborder="0" style="display: none;"></iframe></div>
|
||||
<div id="sds-apply-preview-form" style="position: absolute; top: -10000px; left: -10000px;"><form id="preview-form" class="x-plain-body" method="POST" action="webman/modules/ControlPanel/modules/dsm.cgi" target="preview_iframe"><input type="submit" id="preview_submit" style="position: absolute; top: -10000px; left: -10000px;" tabindex="-1" /></form><iframe id="preview_iframe" name="preview_iframe" width="0" height="0" frameborder="0" style="display: none;"></iframe></div>
|
||||
<script type="text/javascript" src="webapi/entry.cgi?api=SYNO.Core.Desktop.Defs&version=1&method=getjs&v=1685730685"></script>
|
||||
<script type="text/javascript" src="webapi/entry.cgi?api=SYNO.Core.Desktop.JSUIString&version=1&method=getjs&lang=enu&v=1688388798"></script>
|
||||
<script type="text/javascript" src="webapi/entry.cgi?api=SYNO.Core.Desktop.UIString&version=1&method=getjs&lang=enu&v=1688388802"></script>
|
||||
<script type="text/javascript" src="scripts/babel-polyfill/polyfill.js?v=1672898121"></script>
|
||||
<script type="text/javascript" src="scripts/synowebapi.js/synowebapi.min.js?v=1675322301"></script>
|
||||
<script type="text/javascript" src="scripts/synocredential.js/synocredential.min.js?v=1680089528"></script>
|
||||
<script type="text/javascript" src="scripts/vue/vue.min.js?v=1664290694"></script>
|
||||
<script type="text/javascript" src="scripts/vuex/vuex.min.js?v=1664290698"></script>
|
||||
<script type="text/javascript" src="scripts/vue-router/vue-router.min.js?v=1667901351"></script>
|
||||
<script type="text/javascript" src="scripts/syno-vue-components/syno-vue-components.min.js?v=1684234437"></script>
|
||||
<script type="text/javascript" src="synoSDSjslib/dist/vendor.bundle.js?v=1683108982"></script>
|
||||
<script type="text/javascript" src="synoSDSjslib/dist/sds.bundle.js?v=1683108982"></script>
|
||||
<script type="text/javascript" src="webman/sds/dist/dsm.common.bundle.js?v=1683699872"></script>
|
||||
<script type="text/javascript" src="sharing/sharing-sds.js?v=1683699872"></script>
|
||||
<script type="text/javascript" src="sharing/sharing.js?v=1669770591"></script>
|
||||
<script type="text/javascript" src="../scripts/ext-3.4/adapter/ext/ext-base.js?v=1690892764"></script>
|
||||
<script type="text/javascript" src="../scripts/ext-3.4/ext-all.js?v=1690892764"></script>
|
||||
<script type="text/javascript" src="../scripts/ext-3.4/ux/ux-all.js?v=1690892764"></script>
|
||||
<script type="text/javascript" src="../webman/sds/dist/dsm.common.bundle.js?v=1690892764"></script>
|
||||
<script type="text/javascript" src="../wfmlogindialog.js?v=1690892764"></script>
|
||||
<script type="text/javascript" src="webapi/entry.cgi?api=SYNO.Core.Sharing.Session&version=1&method=get&sharing_id="2VsGPnJVW"&sharing_status="none"&v=1683603442"></script>
|
||||
|
||||
<div id="main"></div>
|
||||
<div class="pre-load-x-window-br"></div>
|
||||
</body>
|
||||
</html>
|
@ -1216,9 +1216,9 @@ en:
|
||||
title: Security verification failed
|
||||
'429': Too many requests
|
||||
'500':
|
||||
content: We're sorry, but something went wrong on our end. You can check the status of Wobbl and its companion systems at our status page - https://status.tarrien.net/status/wobbl .
|
||||
content: We're sorry, but something went wrong on our end. You can check the status of Wobbl and its companion systems at our status page - https://status.wobbl.xyz.
|
||||
title: This page is not correct
|
||||
'503': The page could not be served due to a temporary server failure. You can check the status of Wobbl and its companion systems at our status page - https://status.tarrien.net/status/wobbl.
|
||||
'503': The page could not be served due to a temporary server failure. You can check the status of Wobbl and its companion systems at our status page - https://status.wobbl.xyz.
|
||||
noscript_html: To use the Mastodon web application, please enable JavaScript. Alternatively, try one of the <a href="%{apps_path}">native apps</a> for Mastodon for your platform.
|
||||
existing_username_validator:
|
||||
not_found: could not find a local user with that username
|
||||
|
@ -3,10 +3,6 @@
|
||||
class CopyAccountStats < ActiveRecord::Migration[5.2]
|
||||
disable_ddl_transaction!
|
||||
|
||||
class MigrationAccount < ApplicationRecord
|
||||
self.table_name = :accounts
|
||||
end
|
||||
|
||||
def up
|
||||
safety_assured do
|
||||
if supports_upsert?
|
||||
@ -30,7 +26,7 @@ class CopyAccountStats < ActiveRecord::Migration[5.2]
|
||||
def up_fast
|
||||
say 'Upsert is available, importing counters using the fast method'
|
||||
|
||||
MigrationAccount.unscoped.select('id').find_in_batches(batch_size: 5_000) do |accounts|
|
||||
Account.unscoped.select('id').find_in_batches(batch_size: 5_000) do |accounts|
|
||||
execute <<-SQL.squish
|
||||
INSERT INTO account_stats (account_id, statuses_count, following_count, followers_count, created_at, updated_at)
|
||||
SELECT id, statuses_count, following_count, followers_count, created_at, updated_at
|
||||
@ -47,7 +43,7 @@ class CopyAccountStats < ActiveRecord::Migration[5.2]
|
||||
|
||||
# We cannot use bulk INSERT or overarching transactions here because of possible
|
||||
# uniqueness violations that we need to skip over
|
||||
MigrationAccount.unscoped.select('id, statuses_count, following_count, followers_count, created_at, updated_at').find_each do |account|
|
||||
Account.unscoped.select('id, statuses_count, following_count, followers_count, created_at, updated_at').find_each do |account|
|
||||
params = [account.id, account[:statuses_count], account[:following_count], account[:followers_count], account.created_at, account.updated_at]
|
||||
exec_insert('INSERT INTO account_stats (account_id, statuses_count, following_count, followers_count, created_at, updated_at) VALUES ($1, $2, $3, $4, $5, $6)', nil, params)
|
||||
rescue ActiveRecord::RecordNotUnique
|
||||
|
Loading…
x
Reference in New Issue
Block a user