During my different try at last I run by mistake from ttrss/schema/versions/mysql/118.sql :
update ttrss_version set schema_version = 118;
And then when I login again on the web interface I see sql upgrading to 130…
But when I run : php /ttrss-www/ttrss/update.php --feeds
I got this error :
Fatal error: Query INSERT INTO ttrss_error_log
Table ‘ttrss.ttrss_error_log’ doesn’t exist
So I try again to create it :
root@localhost [ttrss]> create table ttrss_error_log(
→ id integer not null auto_increment primary key,
→ owner_uid integer,
→ errno integer not null,
→ errstr text not null,
→ filename text not null,
→ lineno integer not null,
→ context text not null,
→ created_at datetime not null,
→ foreign key (owner_uid) references ttrss_users(id) ON DELETE SET NULL) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
ERROR 1215 (HY000): Cannot add foreign key constraint
apache24.
php71-7.1.4.
php71-mysqli-7.1.4.
I upgrade mysql from 5.4 to 5.7.
I already try to take a backup, I have a backup of my database up to version ‘117’ but I still have the same issue when I tried to apply schema/versions/mysql/118.sql
I succefully upgrade from 105 to 117 bug hang at 118.
It seems that if I avoid table ttrss_error_log creation the other futher upgrade works.
I think it come for one of my table configuration or encodage or … long shot int … because I can create the whole database with ttrss.ttrss_error_log inside from ttrss/schema/ttrss_schema_mysql.sql
2017-05-11 10:37:45 0x8696d6800 Error in foreign key constraint of table ttrss/ttrss_error_log:
foreign key (owner_uid) references ttrss_users(id) ON DELETE SET NULL) ENGINE=InnoDB DEFAULT CHARSET=UTF8:
Cannot resolve table name close to:
(id) ON DELETE SET NULL) ENGINE=InnoDB DEFAULT CHARSET=UTF8
your other tables are probably myisam or other such garbage, also the fact that you previously randomly typed commands and shit while not knowing anything certainly didn’t help
idk about others but i’m definitely not getting into your abomination of an install, just export opml and start anew, hopefully even learning a lesson. alternatively wait for some kind soul here to sort out your mess but, you know, i wouldn’t count on it.
You know the only way to learn is to try and try again.
And I don’t ‘previously randomly typed commands and shit while not knowing anything’…
‘abomination of an install’ … it’s a Mysql as it was in 2013. So …
and then after a :
mysqldump --databases ttrss > ttrss_Innodb.sql
just in case
I can do :
root@localhost [ttrss]> create table ttrss_error_log(
-> id integer not null auto_increment primary key,
-> owner_uid integer,
-> errno integer not null,
-> errstr text not null,
-> filename text not null,
-> lineno integer not null,
-> context text not null,
-> created_at datetime not null,
-> foreign key (owner_uid) references ttrss_users(id) ON DELETE SET NULL) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
Query OK, 0 rows affected (0,20 sec)
i very much doubt this one liner conversion is going to magically reinstate all the missing constraints that didn’t fire over the years filling your database with garbage data, the fact alone that it worked tells me it didn’t, and your database still has no referential integrity.
since you’re unwilling to do the right thing i.e. wipe everything and reimport your OPML on a functional database schema, i’m going to ask you to not post about any further inevitable problems on this forum. you’re on your own.
at least your thread might serve as an example to others of things not to do, ever.
You can’t just be executing raw sql commands in the hopes to fix this.
I’m going to make this simple for you: your database is corrupt. Period. There is no recovery because you’ve been running for so long under MyISAM and you can’t just switch to InnoDB and think everything is going to work. You’ve already lost the data integrity because you’ve run so long without key constraints. Even if you manage to get this “working” (I use that term loosely) you’re going to encounter weird behaviour using TT-RSS.
Just wipe it all and start will a clean install. It’s not the end of the world, it’s just RSS feeds from web sites not launch codes for national defence.
i guess the gist here, op, is GTFO and don’t come back until you fix your shit. because what you did instead is literally horrifying to anyone with half a clue.
I don’t run at all without key constraints, it was a 1 day upgrade from a quite old version to new one…
No update of database content between because all services stop.
That key constraints didn’t exist when I was under MyISAM because I was on an old version of ttrss which didn’t require it.
That key constraints didn’t exist when I was under MyISAM because I was on an old version of ttrss which didn’t require it.
i’d like to also ask you to stop lying to my fucking face on my own fucking forum, thank you very much
what actually happened is somehow, despite innodb being explicitly required when mysql support was added (tt-rss was initially postgresql-only), a bunch of people managed to install tt-rss on myisam.
how this happened we’ll probably never know. maybe you and others like you actually modified the schema files, maybe mysql just ignored the type= requirement for some reason (given that mysql approach to foreign keys on myisam is “this statement is silently ignored” this wouldn’t surprise me tbh). i’m not going to point fingers, why this happened is not really important anyway.
now, the problem is, this kind of installation was immediately and pretty much irrevocably broken (tt-rss heavily relied on stuff like foreign keys and cascade deletions from the very beginning).
over the years people came here with the weirdest issues imaginable, and multiple times this was traced back to myisam. and you can’t just convert the table and it’ll work. it won’t. your database is fucked forever and there’s nothing you can do to fix it, other than reconstructing all key relationships manually and cleaning everything that fails integrity checks.
i’m gonna say tho this is the first time when i’m talking to someone who is so adamant at continuing to do the wrong thing as to actually lie to me about shit i wrote. well done.
e: i’m also going to state, again, that in my opinion adding mysql support was the wrong thing to do.
ok no trouble, for me it’s ok now, (I really say for me).
If something goes wrong I can only hit myself about that.
I’m just happy to find some help because you give me some help and I’m just happy with that.