Last active
February 3, 2022 10:02
-
-
Save gdamjan/7a586e5fd809b4719e359683573d9d8f to your computer and use it in GitHub Desktop.
pgloader script to migrate tt-rss from mysql to postgresql - https://pgloader.readthedocs.io/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LOAD DATABASE | |
FROM mysql://ttrss:ttrss@127.0.0.1:3306/ttrss | |
INTO postgresql://tt-rss:tt-rss@127.0.0.1:5432/tt-rss | |
WITH include no drop, create no tables, truncate | |
ALTER schema 'ttrss' rename to 'public' | |
CAST type datetime to timestamp, | |
type timestamp to timestamp, | |
column "ttrss_entries"."guid" to text, | |
column "ttrss_feeds"."last_error" to text, | |
column "ttrss_feeds"."last_modified" to text | |
EXCLUDING TABLE NAMES MATCHING | |
'ttrss_sessions', | |
'ttrss_prefs_sections', | |
~/^ttrss_plugin_af_sort_bayes_/ | |
; | |
-- 2022-02-03T03:00:30.337000Z ERROR Database error 23502: null value in column "section_name" of relation "ttrss_prefs_sections" violates not-null constraint | |
-- DETAIL: Failing row contains (1, 0, null). | |
-- CONTEXT: COPY ttrss_prefs_sections, line 1: "1 0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2022-02-03T03:21:28.195000Z LOG report summary reset | |
table name errors read imported bytes total time read write | |
------------------------------- --------- --------- --------- --------- -------------- --------- --------- | |
fetch meta data 0 69 69 0.837s | |
Drop Foreign Keys 0 62 62 8.128s | |
Truncate 0 31 31 1.115s | |
------------------------------- --------- --------- --------- --------- -------------- --------- --------- | |
public.ttrss_tags 0 53744 53744 1.5 MB 15.386s 8.430s 0.099s | |
public.ttrss_user_entries 0 25324 25324 2.4 MB 17.575s 9.435s 0.140s | |
public.ttrss_entries 0 25324 25324 95.3 MB 1m27.742s 1m27.500s 18.210s | |
public.ttrss_enclosures 0 9924 9924 1.3 MB 11.324s 8.025s 0.075s | |
public.ttrss_user_prefs 0 316 316 11.2 kB 19.510s 3.893s 0.002s | |
public.ttrss_user_prefs2 0 25 25 0.8 kB 32.901s 3.225s 0.001s | |
public.ttrss_filter_actions 0 10 10 0.2 kB 46.515s 4.737s | |
public.ttrss_users 0 6 6 2.8 kB 52.083s 4.411s 0.001s | |
public.ttrss_access_keys 0 3 3 0.1 kB 54.059s 2.998s | |
public.ttrss_archived_feeds 0 0 0 53.814s 3.458s | |
public.ttrss_counters_cache 0 0 0 51.422s 3.680s | |
public.ttrss_error_log 0 0 0 48.804s 3.791s | |
public.ttrss_filters2 0 0 0 46.078s 4.841s | |
public.ttrss_filters2_rules 0 0 0 42.078s 4.112s | |
public.ttrss_linked_feeds 0 0 0 38.213s 3.558s | |
public.ttrss_plugin_storage 0 0 0 35.577s 3.387s | |
public.ttrss_user_labels2 0 0 0 32.442s 4.781s | |
public.ttrss_feeds 0 352 352 99.5 kB 0.507s 0.270s 0.014s | |
public.ttrss_prefs 0 53 53 1.6 kB 1.045s 0.247s 0.001s | |
public.ttrss_feed_categories 0 18 18 0.5 kB 1.049s 0.252s 0.001s | |
public.ttrss_filter_types 0 7 7 0.1 kB 1.609s 0.261s | |
public.ttrss_prefs_types 0 3 3 0.0 kB 1.606s 0.251s | |
public.ttrss_app_passwords 0 1 1 0.2 kB 2.174s 0.249s | |
public.ttrss_cat_counters_cache 0 0 0 2.172s 0.250s | |
public.ttrss_entry_comments 0 0 0 2.748s 0.247s | |
public.ttrss_feedbrowser_cache 0 0 0 2.756s 0.254s | |
public.ttrss_filters2_actions 0 0 0 3.414s 0.248s | |
public.ttrss_labels2 0 0 0 3.426s 0.246s | |
public.ttrss_linked_instances 0 0 0 3.990s 0.248s | |
public.ttrss_settings_profiles 0 0 0 3.802s 0.248s | |
public.ttrss_version 0 1 1 0.0 kB 3.757s 0.248s | |
------------------------------- --------- --------- --------- --------- -------------- --------- --------- | |
COPY Threads Completion 0 4 4 1m42.943s | |
Reset Sequences 0 18 18 1.483s | |
Create Foreign Keys 0 31 31 11.824s | |
Install Comments 0 0 0 0.000s | |
------------------------------- --------- --------- --------- --------- -------------- --------- --------- | |
Total import time ? 115111 115111 100.7 MB 1m56.250s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment