hrk / tt-rss-mysql2pgsql

A quick & dirty tool to migrate an existing TT-RSS installation from MySQL to PostgreSQL.
19 stars 1 forks source link

Error to use (Timestamp) #1

Closed chyuaner closed 9 years ago

chyuaner commented 9 years ago

I use your tool. But failed in "can not be represented as java.sql.Timestamp".

Imgur

hrk commented 9 years ago

There are multiple issues here. I'll look into it, but it may be an issue with character encoding.

chatainsim commented 9 years ago

Hello, I've the same issue here.

Exception in thread "main" java.sql.SQLException: Value '1022iny Tiny RSS: New Releases�http://tt-rss.org/releases.rss000000-00-00 00:00:00�0001000�2014-12-01   13:37:420000000�0�' can not be represented as java.sql.Timestamp
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1078)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:989)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:975)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:920)
        at com.mysql.jdbc.ResultSetRow.getTimestampFast(ResultSetRow.java:1102)
        at com.mysql.jdbc.BufferRow.getTimestampFast(BufferRow.java:576)
        at com.mysql.jdbc.ResultSetImpl.getTimestampInternal(ResultSetImpl.java:6592)
        at com.mysql.jdbc.ResultSetImpl.getTimestamp(ResultSetImpl.java:6192)
        at it.sineo.ttrssMySQL2PGSQL.Sync.main(Sync.java:148)

Did you found how to fix it ?

Thanks

hrk commented 9 years ago

The source code for the exception is this one:

case Types.TIMESTAMP: {
    Timestamp _ts = rs.getTimestamp(i);

That means that the MySQL driver is trying to read the "i-th" column as a Timestamp (having looked at the column metadata earlier) but then fails and reads too much data (the entire row '1022iny Tiny RSS: New Releases�http://tt-rss.org/releases.rss000000-00-00 00:00:00�0001000�2014-12-01 13:37:420000000�0�'). What MySQL database and JDBC driver are you (both) using?

chatainsim commented 9 years ago

For MySQL:

$ mysql --version
mysql  Ver 14.14 Distrib 5.5.44, for debian-linux-gnu (x86_64) using readline 6.2

For Postgresql:

$ psql -version
psql (9.1.18)

For JDBC:

Source: mysql-connector-java
Version: 5.1.16-2
hrk commented 9 years ago

Why are you using a MySQL connector older than the one I pushed in the dist/ directory? Anyway, I just pushed updated jars, MySQL 5.1.36 and PGSQL 9.4. Give them a try (Java 1.7+) and report, as I guess it should be an issue w/ MySQL.

chatainsim commented 9 years ago

Still the same issue. Using java version "1.7.0_79".

hrk commented 9 years ago

Just out of curiosity... could you please perform a mysqlcheck and/or mysqlrepair on the schema, to check if everything is in order?

chatainsim commented 9 years ago

mysqlcheck:

$ mysqlcheck -c ttrss -u ttrss -p
Enter password:
ttrss.ttrss_access_keys                            OK
ttrss.ttrss_archived_feeds                         OK
ttrss.ttrss_cat_counters_cache                     OK
ttrss.ttrss_counters_cache                         OK
ttrss.ttrss_enclosures                             OK
ttrss.ttrss_entries                                OK
ttrss.ttrss_entry_comments                         OK
ttrss.ttrss_error_log                              OK
ttrss.ttrss_feed_categories                        OK
ttrss.ttrss_feedbrowser_cache                      OK
ttrss.ttrss_feeds                                  OK
ttrss.ttrss_filter_actions                         OK
ttrss.ttrss_filter_types                           OK
ttrss.ttrss_filters                                OK
ttrss.ttrss_filters2                               OK
ttrss.ttrss_filters2_actions                       OK
ttrss.ttrss_filters2_rules                         OK
ttrss.ttrss_labels2                                OK
ttrss.ttrss_linked_feeds                           OK
ttrss.ttrss_linked_instances                       OK
ttrss.ttrss_plugin_af_sort_bayes_categories        OK
ttrss.ttrss_plugin_af_sort_bayes_references        OK
ttrss.ttrss_plugin_af_sort_bayes_wordfreqs         OK
ttrss.ttrss_plugin_storage                         OK
ttrss.ttrss_prefs                                  OK
ttrss.ttrss_prefs_sections                         OK
ttrss.ttrss_prefs_types                            OK
ttrss.ttrss_sessions                               OK
ttrss.ttrss_settings_profiles                      OK
ttrss.ttrss_tags                                   OK
ttrss.ttrss_user_entries                           OK
ttrss.ttrss_user_labels2                           OK
ttrss.ttrss_user_prefs                             OK
ttrss.ttrss_users                                  OK
ttrss.ttrss_version                                OK

mysqlrepair:

$ mysqlrepair -c ttrss -u ttrss -p
Enter password:
ttrss.ttrss_access_keys                            OK
ttrss.ttrss_archived_feeds                         OK
ttrss.ttrss_cat_counters_cache                     OK
ttrss.ttrss_counters_cache                         OK
ttrss.ttrss_enclosures                             OK
ttrss.ttrss_entries                                OK
ttrss.ttrss_entry_comments                         OK
ttrss.ttrss_error_log                              OK
ttrss.ttrss_feed_categories                        OK
ttrss.ttrss_feedbrowser_cache                      OK
ttrss.ttrss_feeds                                  OK
ttrss.ttrss_filter_actions                         OK
ttrss.ttrss_filter_types                           OK
ttrss.ttrss_filters                                OK
ttrss.ttrss_filters2                               OK
ttrss.ttrss_filters2_actions                       OK
ttrss.ttrss_filters2_rules                         OK
ttrss.ttrss_labels2                                OK
ttrss.ttrss_linked_feeds                           OK
ttrss.ttrss_linked_instances                       OK
ttrss.ttrss_plugin_af_sort_bayes_categories        OK
ttrss.ttrss_plugin_af_sort_bayes_references        OK
ttrss.ttrss_plugin_af_sort_bayes_wordfreqs         OK
ttrss.ttrss_plugin_storage                         OK
ttrss.ttrss_prefs                                  OK
ttrss.ttrss_prefs_sections                         OK
ttrss.ttrss_prefs_types                            OK
ttrss.ttrss_sessions                               OK
ttrss.ttrss_settings_profiles                      OK
ttrss.ttrss_tags                                   OK
ttrss.ttrss_user_entries                           OK
ttrss.ttrss_user_labels2                           OK
ttrss.ttrss_user_prefs                             OK
ttrss.ttrss_users                                  OK
ttrss.ttrss_version                                OK
hrk commented 9 years ago

I'm clueless. Let's do something different. Delete that feed (since it's long gone upstream and you won't need it) and try again. Is the DB open to the outside world (i.e.: can I connect to it?)

chatainsim commented 9 years ago

I have the same issue with the tt-rss forum feed. I've deleted it too.

I still have some error:

ERROR: L'élément du batch 37 INSERT INTO ttrss_feeds(id, owner_uid, title, cat_id, feed_url, icon_url, update_interval, purge_interval, last_updated, last_error, site_url, auth_login, auth_pass, parent_feed, private, rtl_content, hidden, include_in_digest, cache_images, cache_content, auth_pass_encrypted, last_viewed, last_update_started, always_display_enclosures, update_method, order_id, mark_unread_on_update, update_on_checksum_change, strip_images, pubsub_state, favicon_last_checked, hide_images, view_settings, favicon_avg_color, feed_language) VALUES (113, 3, 'Korben', 16, 'http://feeds.feedburner.com/KorbensBlog-UpgradeYourMind', '', 0, 90, '2013-08-15 08:02:17.000000 +02:00:00', '', 'http://korben.info', '', '', NULL, '0', '0', '0', '1', '0', '0', '0', '2013-07-16 07:18:53.000000 +02:00:00', '2015-04-04 14:00:12.000000 +02:00:00', '0', 0, 0, '0', '0', '0', 0, '2013-08-14 23:02:34.000000 +02:00:00', '0', '', '#996666', '') a été annulé. Appeler getNextException pour en connaître la cause.
[ttrss_feeds] setting sequence to 307
INSERT INTO ttrss_archived_feeds(id, owner_uid, title, feed_url, site_url) VALUES (?, ?, ?, ?, ?)
ERROR: L'élément du batch 38 INSERT INTO ttrss_archived_feeds(id, owner_uid, title, feed_url, site_url) VALUES (103, 3, 'Tiny Tiny RSS: Forum', 'http://tt-rss.org/forum/rss.php', '') a été annulé. Appeler getNextException pour en connaître la cause.
[ttrss_archived_feeds] 386 ms.
INSERT INTO ttrss_counters_cache(feed_id, owner_uid, value, updated) VALUES (?, ?, ?, ?)
ERROR: L'élément du batch 4 INSERT INTO ttrss_counters_cache(feed_id, owner_uid, value, updated) VALUES (115, 3, 56, '2013-08-15 08:02:17.000000 +02:00:00') a été annulé. Appeler getNextException pour en connaître la cause.
[ttrss_counters_cache] 99 ms.
INSERT INTO ttrss_cat_counters_cache(feed_id, owner_uid, value, updated) VALUES (?, ?, ?, ?)
ERROR: L'élément du batch 2 INSERT INTO ttrss_cat_counters_cache(feed_id, owner_uid, value, updated) VALUES (16, 3, 2771, '2013-08-15 08:02:17.000000 +02:00:00') a été annulé. Appeler getNextException pour en connaître la cause.

But the script still running for now. And no there is no outside world access to my DB.

I'll keep you in touch when the script end.

chatainsim commented 9 years ago

Script done, but a lot's of data is missing. For example, in ttrss_feeds I have 123 feeds in MySQL but none in PgSQL.

[ttrss_filters2_actions] 1 ms.
INSERT INTO ttrss_tags(id, owner_uid, tag_name, post_int_id) VALUES (?, ?, ?, ?)
ERROR: L'élément du batch 0 INSERT INTO ttrss_tags(id, owner_uid, tag_name, post_int_id) VALUES (70434, 1, 'non classé', 31693) a été annulé. Appeler getNextException pour en connaître la cause.
ERROR: L'élément du batch 0 INSERT INTO ttrss_tags(id, owner_uid, tag_name, post_int_id) VALUES (252374, 1, 'document', 104615) a été annulé. Appeler getNextException pour en connaître la cause.
ERROR: L'élément du batch 0 INSERT INTO ttrss_tags(id, owner_uid, tag_name, post_int_id) VALUES (469951, 4, 'événements', 136058) a été annulé. Appeler getNextException pour en connaître la cause.
ERROR: L'élément du batch 0 INSERT INTO ttrss_tags(id, owner_uid, tag_name, post_int_id) VALUES (634695, 1, 'ecigarette', 167736) a été annulé. Appeler getNextException pour en connaître la cause.
ERROR: L'élément du batch 0 INSERT INTO ttrss_tags(id, owner_uid, tag_name, post_int_id) VALUES (739176, 1, 'msi', 176493) a été annulé. Appeler getNextException pour en connaître la cause.
ERROR: L'élément du batch 0 INSERT INTO ttrss_tags(id, owner_uid, tag_name, post_int_id) VALUES (813685, 1, 'vidéo', 179561) a été annulé. Appeler getNextException pour en connaître la cause.
ERROR: L'élément du batch 0 INSERT INTO ttrss_tags(id, owner_uid, tag_name, post_int_id) VALUES (856649, 1, 'goûter', 181438) a été annulé. Appeler getNextException pour en connaître la cause.
ERROR: L'élément du batch 0 INSERT INTO ttrss_tags(id, owner_uid, tag_name, post_int_id) VALUES (869958, 1, 'pc', 182513) a été annulé. Appeler getNextException pour en connaître la cause.
ERROR: L'élément du batch 0 INSERT INTO ttrss_tags(id, owner_uid, tag_name, post_int_id) VALUES (886021, 1, 'streamers', 183466) a été annulé. Appeler getNextException pour en connaître la cause.
ERROR: L'élément du batch 0 INSERT INTO ttrss_tags(id, owner_uid, tag_name, post_int_id) VALUES (895125, 1, 'contact', 184003) a été annulé. Appeler getNextException pour en connaître la cause.
ERROR: L'élément du batch 0 INSERT INTO ttrss_tags(id, owner_uid, tag_name, post_int_id) VALUES (898215, 1, 'omega vape', 184329) a été annulé. Appeler getNextException pour en connaître la cause.
ERROR: L'élément du batch 0 INSERT INTO ttrss_tags(id, owner_uid, tag_name, post_int_id) VALUES (898715, 1, 'somebody should build a full size hyrule castle and i will come visit/squat', 184556) a été annulé. Appeler getNextException pour en connaître la cause.
ERROR: L'élément du batch 0 INSERT INTO ttrss_tags(id, owner_uid, tag_name, post_int_id) VALUES (899215, 1, 'film', 184751) a été annulé. Appeler getNextException pour en connaître la cause.
ERROR: L'élément du batch 0 INSERT INTO ttrss_tags(id, owner_uid, tag_name, post_int_id) VALUES (899715, 1, 'wishing you hadnt restaurant', 184945) a été annulé. Appeler getNextException pour en connaître la cause.
ERROR: L'élément du batch 0 INSERT INTO ttrss_tags(id, owner_uid, tag_name, post_int_id) VALUES (900215, 1, 'film', 185207) a été annulé. Appeler getNextException pour en connaître la cause.
ERROR: L'élément du batch 0 INSERT INTO ttrss_tags(id, owner_uid, tag_name, post_int_id) VALUES (900715, 1, 'blu-ray', 185470) a été annulé. Appeler getNextException pour en connaître la cause.
chatainsim commented 9 years ago

You can find the whole logs here: http://pastebin.com/u7yL3wx1

hrk commented 9 years ago

Are you sure you're running the version I uploaded some days ago? That output looks like the old one, since it still doesn't show the "getNextException" output. Oh, and please, when you run the new version, try setting "usebatch=false" just in case.

chatainsim commented 9 years ago

Strange, i've done a git pull before. To be sure, I restart from scratch with a git clone after removing all the datas. Seems better, but still have some error:

[ttrss_users] setting sequence to 4
INSERT INTO ttrss_feed_categories(id, owner_uid, title, collapsed, order_id, parent_cat, view_settings) VALUES (?, ?, ?, ?, ?, ?, ?)
ERROR: ERROR: insert or update on table "ttrss_feed_categories" violates foreign key constraint "ttrss_feed_categories_owner_uid_fkey"
  Détail : Key (owner_uid)=(1) is not present in table "ttrss_users".
ERROR: ERROR: insert or update on table "ttrss_feed_categories" violates foreign key constraint "ttrss_feed_categories_owner_uid_fkey"
  Détail : Key (owner_uid)=(1) is not present in table "ttrss_users".
ERROR: ERROR: insert or update on table "ttrss_feed_categories" violates foreign key constraint "ttrss_feed_categories_owner_uid_fkey"
  Détail : Key (owner_uid)=(1) is not present in table "ttrss_users".
ERROR: ERROR: insert or update on table "ttrss_feed_categories" violates foreign key constraint "ttrss_feed_categories_owner_uid_fkey"
  Détail : Key (owner_uid)=(1) is not present in table "ttrss_users".
ERROR: ERROR: insert or update on table "ttrss_feed_categories" violates foreign key constraint "ttrss_feed_categories_owner_uid_fkey"
  Détail : Key (owner_uid)=(1) is not present in table "ttrss_users".
ERROR: ERROR: insert or update on table "ttrss_feed_categories" violates foreign key constraint "ttrss_feed_categories_owner_uid_fkey"
  Détail : Key (owner_uid)=(1) is not present in table "ttrss_users".
ERROR: ERROR: insert or update on table "ttrss_feed_categories" violates foreign key constraint "ttrss_feed_categories_owner_uid_fkey"
  Détail : Key (owner_uid)=(1) is not present in table "ttrss_users".
ERROR: ERROR: insert or update on table "ttrss_feed_categories" violates foreign key constraint "ttrss_feed_categories_owner_uid_fkey"
  Détail : Key (owner_uid)=(1) is not present in table "ttrss_users".
ERROR: ERROR: insert or update on table "ttrss_feed_categories" violates foreign key constraint "ttrss_feed_categories_owner_uid_fkey"

I'll post the full logs when done.

chatainsim commented 9 years ago

The full logs are here: http://dl.free.fr/v4x9F1Uqn

hrk commented 9 years ago

Ok, perfect. The log is very clear: the first lines show an error due to the schemas not being equal. MySQL has a "theme_id" column in the table ttrss_users which doesn't exist on PGSQL. And since the users table can't be populated, all the tables depending on it fail too. You need to have both schemas at the same version in order to use the tool.

In tt-rss/schema/mysql/83.sql you can see that the column was dropped. You're trying to port the data from a schema (at the very least) older than 83 into a new schema. The current schema version is 129. You can manually upgrade your mysql schema by running all the scripts in tt-rss/schema/versions/mysql/ After you upgrade it, run again the tool. :-)

chatainsim commented 9 years ago

Ok, I'll try this. But current schema version in MySQL is 129. I think some upgrades wasn't complete.

chatainsim commented 9 years ago

I've force to run all mysql script then I lost access to my tt-rss. I'll try this again tomorrow.

Thank you for your help !

hrk commented 9 years ago

Check if the version is still 129, maybe just limit to column adding/dropping statements... good luck :)

chatainsim commented 9 years ago

Hello, So, I've only removed the theme_id column in ttrss_users. I also removed the contraint:

ttrss_user_prefs_pref_name_fkey FOREIGN KEY (pref_name) REFERENCES ttrss_prefs(pref_name) ON DELETE CASCADE

Then import working fine:

$ more log.txt
INSERT INTO ttrss_users(id, login, pwd_hash, last_login, access_level, email, full_name, email_digest, last_digest_sent, salt, created, twitter_oauth, otp_enabled, resetpass_token) VALUES (?, ?, ?, ?, ?,
?, ?, ?, ?, ?, ?, ?, ?, ?)
[ttrss_users] 214 ms.
[ttrss_users] setting sequence to 4
INSERT INTO ttrss_feed_categories(id, owner_uid, title, collapsed, order_id, parent_cat, view_settings) VALUES (?, ?, ?, ?, ?, ?, ?)
[ttrss_feed_categories] 252 ms.
[ttrss_feed_categories] setting sequence to 27
INSERT INTO ttrss_feeds(id, owner_uid, title, cat_id, feed_url, icon_url, update_interval, purge_interval, last_updated, last_error, site_url, auth_login, auth_pass, parent_feed, private, rtl_content, hid
den, include_in_digest, cache_images, cache_content, auth_pass_encrypted, last_viewed, last_update_started, always_display_enclosures, update_method, order_id, mark_unread_on_update, update_on_checksum_ch
ange, strip_images, pubsub_state, favicon_last_checked, hide_images, view_settings, favicon_avg_color, feed_language) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
?, ?, ?, ?, ?, ?, ?, ?, ?)
[ttrss_feeds] 1508 ms.
[ttrss_feeds] setting sequence to 307
INSERT INTO ttrss_archived_feeds(id, owner_uid, title, feed_url, site_url) VALUES (?, ?, ?, ?, ?)
[ttrss_archived_feeds] 2016 ms.
INSERT INTO ttrss_counters_cache(feed_id, owner_uid, value, updated) VALUES (?, ?, ?, ?)
[ttrss_counters_cache] 1390 ms.
INSERT INTO ttrss_cat_counters_cache(feed_id, owner_uid, value, updated) VALUES (?, ?, ?, ?)
[ttrss_cat_counters_cache] 216 ms.
INSERT INTO ttrss_entries(id, title, guid, link, updated, content, content_hash, cached_content, no_orig_date, date_entered, date_updated, num_comments, plugin_data, comments, author, lang) VALUES (?, ?,
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
[ttrss_entries] 232319 ms.
[ttrss_entries] setting sequence to 186648
INSERT INTO ttrss_user_entries(int_id, ref_id, uuid, feed_id, orig_feed_id, owner_uid, marked, published, tag_cache, label_cache, last_read, score, note, unread, last_marked, last_published) VALUES (?, ?,
 ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
[ttrss_user_entries] 228617 ms.
[ttrss_user_entries] setting sequence to 187181
INSERT INTO ttrss_entry_comments(id, ref_id, owner_uid, private, date_entered) VALUES (?, ?, ?, ?, ?)
[ttrss_entry_comments] 2 ms.
INSERT INTO ttrss_filters2(id, owner_uid, match_any_rule, enabled, inverse, order_id, title) VALUES (?, ?, ?, ?, ?, ?, ?)
[ttrss_filters2] 2 ms.
INSERT INTO ttrss_filters2_rules(id, filter_id, reg_exp, filter_type, feed_id, cat_id, cat_filter, inverse) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
[ttrss_filters2_rules] 2 ms.
INSERT INTO ttrss_filters2_actions(id, filter_id, action_id, action_param) VALUES (?, ?, ?, ?)
[ttrss_filters2_actions] 2 ms.
INSERT INTO ttrss_tags(id, owner_uid, tag_name, post_int_id) VALUES (?, ?, ?, ?)
[ttrss_tags] 105914 ms.
[ttrss_tags] setting sequence to 904690
INSERT INTO ttrss_enclosures(id, content_url, content_type, post_id, title, duration, width, height) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
[ttrss_enclosures] 49840 ms.
[ttrss_enclosures] setting sequence to 80088
INSERT INTO ttrss_settings_profiles(id, title, owner_uid) VALUES (?, ?, ?)
[ttrss_settings_profiles] 10 ms.
INSERT INTO ttrss_user_prefs(owner_uid, pref_name, value, profile) VALUES (?, ?, ?, ?)
[ttrss_user_prefs] 1331 ms.
INSERT INTO ttrss_feedbrowser_cache(feed_url, site_url, title, subscribers) VALUES (?, ?, ?, ?)
[ttrss_feedbrowser_cache] 1132 ms.
INSERT INTO ttrss_labels2(id, owner_uid, caption, fg_color, bg_color) VALUES (?, ?, ?, ?, ?)
[ttrss_labels2] 1 ms.
INSERT INTO ttrss_user_labels2(label_id, article_id) VALUES (?, ?)
[ttrss_user_labels2] 1 ms.
INSERT INTO ttrss_access_keys(id, access_key, feed_id, is_cat, owner_uid) VALUES (?, ?, ?, ?, ?)
[ttrss_access_keys] 129 ms.
[ttrss_access_keys] setting sequence to 17
INSERT INTO ttrss_linked_instances(id, last_connected, last_status_in, last_status_out, access_key, access_url) VALUES (?, ?, ?, ?, ?, ?)
[ttrss_linked_instances] 1 ms.
INSERT INTO ttrss_linked_feeds(feed_url, site_url, title, created, updated, instance_id, subscribers) VALUES (?, ?, ?, ?, ?, ?, ?)
[ttrss_linked_feeds] 1 ms.
INSERT INTO ttrss_plugin_storage(id, name, owner_uid, content) VALUES (?, ?, ?, ?)
[ttrss_plugin_storage] 70 ms.
[ttrss_plugin_storage] setting sequence to 8
INSERT INTO ttrss_error_log(id, owner_uid, errno, errstr, filename, lineno, context, created_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
[ttrss_error_log] 691 ms.
[ttrss_error_log] setting sequence to 92

Now I think I have ane issue with tt-rss himself, I'm not able to login. In apache logs I found this:

[Tue Sep 01 14:52:39 2015] [error] [client 193.57.249.2] PHP Warning:  pg_fetch_result(): Unable to jump to row 0 on PostgreSQL result index 37 in ttrss/classes/db/pgsql.php on line 61
hrk commented 9 years ago

This last issue is better suited for the general forum :) I'd think about closing this issue as solved w/ the update of the MySQL JDBC driver...

chatainsim commented 9 years ago

My mistake, every time I only empty the table in PSQL. I've just drop all tables then import the default schema and then run your script. It work fine now ! I'm able to login with default password.

Thank you again for your help !!

Just in case, here are the latest logs:

$ java -jar tt-rss-mysql2pgsql.jar | tee log.txt
INSERT INTO ttrss_users(id, login, pwd_hash, last_login, access_level, email, full_name, email_digest, last_digest_sent, salt, created, twitter_oauth, otp_enabled, resetpass_token) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
ERROR: ERROR: duplicate key value violates unique constraint "ttrss_users_pkey"
  Détail : Key (id)=(1) already exists.
[ttrss_users] 139 ms.
[ttrss_users] setting sequence to 4
INSERT INTO ttrss_feed_categories(id, owner_uid, title, collapsed, order_id, parent_cat, view_settings) VALUES (?, ?, ?, ?, ?, ?, ?)
[ttrss_feed_categories] 788 ms.
[ttrss_feed_categories] setting sequence to 27
INSERT INTO ttrss_feeds(id, owner_uid, title, cat_id, feed_url, icon_url, update_interval, purge_interval, last_updated, last_error, site_url, auth_login, auth_pass, parent_feed, private, rtl_content, hidden, include_in_digest, cache_images, cache_content, auth_pass_encrypted, last_viewed, last_update_started, always_display_enclosures, update_method, order_id, mark_unread_on_update, update_on_checksum_change, strip_images, pubsub_state, favicon_last_checked, hide_images, view_settings, favicon_avg_color, feed_language) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
[ttrss_feeds] 3655 ms.
[ttrss_feeds] setting sequence to 307
INSERT INTO ttrss_archived_feeds(id, owner_uid, title, feed_url, site_url) VALUES (?, ?, ?, ?, ?)
[ttrss_archived_feeds] 3147 ms.
INSERT INTO ttrss_counters_cache(feed_id, owner_uid, value, updated) VALUES (?, ?, ?, ?)
[ttrss_counters_cache] 1632 ms.
INSERT INTO ttrss_cat_counters_cache(feed_id, owner_uid, value, updated) VALUES (?, ?, ?, ?)
[ttrss_cat_counters_cache] 290 ms.
INSERT INTO ttrss_entries(id, title, guid, link, updated, content, content_hash, cached_content, no_orig_date, date_entered, date_updated, num_comments, plugin_data, comments, author, lang) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
[ttrss_entries] 340852 ms.
[ttrss_entries] setting sequence to 186663
INSERT INTO ttrss_user_entries(int_id, ref_id, uuid, feed_id, orig_feed_id, owner_uid, marked, published, tag_cache, label_cache, last_read, score, note, unread, last_marked, last_published) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
ERROR: ERROR: insert or update on table "ttrss_user_entries" violates foreign key constraint "ttrss_user_entries_ref_id_fkey"
  Détail : Key (ref_id)=(186664) is not present in table "ttrss_entries".
[ttrss_user_entries] 317768 ms.
[ttrss_user_entries] setting sequence to 187197
INSERT INTO ttrss_entry_comments(id, ref_id, owner_uid, private, date_entered) VALUES (?, ?, ?, ?, ?)
[ttrss_entry_comments] 2 ms.
INSERT INTO ttrss_filters2(id, owner_uid, match_any_rule, enabled, inverse, order_id, title) VALUES (?, ?, ?, ?, ?, ?, ?)
[ttrss_filters2] 2 ms.
INSERT INTO ttrss_filters2_rules(id, filter_id, reg_exp, filter_type, feed_id, cat_id, cat_filter, inverse) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
[ttrss_filters2_rules] 2 ms.
INSERT INTO ttrss_filters2_actions(id, filter_id, action_id, action_param) VALUES (?, ?, ?, ?)
[ttrss_filters2_actions] 2 ms.
INSERT INTO ttrss_tags(id, owner_uid, tag_name, post_int_id) VALUES (?, ?, ?, ?)
ERROR: ERROR: insert or update on table "ttrss_tags" violates foreign key constraint "ttrss_tags_post_int_id_fkey"
  Détail : Key (post_int_id)=(187197) is not present in table "ttrss_user_entries".
[ttrss_tags] 138852 ms.
[ttrss_tags] setting sequence to 904723
INSERT INTO ttrss_enclosures(id, content_url, content_type, post_id, title, duration, width, height) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
ERROR: ERROR: insert or update on table "ttrss_enclosures" violates foreign key constraint "ttrss_enclosures_post_id_fkey"
  Détail : Key (post_id)=(186664) is not present in table "ttrss_entries".
[ttrss_enclosures] 64236 ms.
[ttrss_enclosures] setting sequence to 80091
INSERT INTO ttrss_settings_profiles(id, title, owner_uid) VALUES (?, ?, ?)
[ttrss_settings_profiles] 12 ms.
INSERT INTO ttrss_user_prefs(owner_uid, pref_name, value, profile) VALUES (?, ?, ?, ?)
[ttrss_user_prefs] 1612 ms.
INSERT INTO ttrss_feedbrowser_cache(feed_url, site_url, title, subscribers) VALUES (?, ?, ?, ?)
[ttrss_feedbrowser_cache] 1241 ms.
INSERT INTO ttrss_labels2(id, owner_uid, caption, fg_color, bg_color) VALUES (?, ?, ?, ?, ?)
[ttrss_labels2] 1 ms.
INSERT INTO ttrss_user_labels2(label_id, article_id) VALUES (?, ?)
[ttrss_user_labels2] 1 ms.
INSERT INTO ttrss_access_keys(id, access_key, feed_id, is_cat, owner_uid) VALUES (?, ?, ?, ?, ?)
[ttrss_access_keys] 171 ms.
[ttrss_access_keys] setting sequence to 17
INSERT INTO ttrss_linked_instances(id, last_connected, last_status_in, last_status_out, access_key, access_url) VALUES (?, ?, ?, ?, ?, ?)
[ttrss_linked_instances] 2 ms.
INSERT INTO ttrss_linked_feeds(feed_url, site_url, title, created, updated, instance_id, subscribers) VALUES (?, ?, ?, ?, ?, ?, ?)
[ttrss_linked_feeds] 2 ms.
INSERT INTO ttrss_plugin_storage(id, name, owner_uid, content) VALUES (?, ?, ?, ?)
[ttrss_plugin_storage] 117 ms.
[ttrss_plugin_storage] setting sequence to 8
INSERT INTO ttrss_error_log(id, owner_uid, errno, errstr, filename, lineno, context, created_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
[ttrss_error_log] 717 ms.
[ttrss_error_log] setting sequence to 93
hrk commented 9 years ago

Fixed with 672bb12