Dotclear

Vous n'êtes pas identifié(e).

Annonce

13 février 2024 Sortie de Dotclear 2.29

#1 2013-09-15 17:43:40

reppep
Membre
Inscription : 2009-11-14

Something went wrong with auto upgrade: SQLite Database Schema

I have been running DC 2.3 (Mercurial checkout) on CentOS 6. Today I got Mercurial 2.2.2 and updated to 2.5.3 with "hg update -r 2.5.3".

I logged out and can log back in, but the login page says:

> Something went wrong with auto upgrade: SQLite Database Schema cannot be upgraded.

Google just finds the PHP source code with the error messages -- nothing helpful. Do you all have any advice here?

Once I login the site is usable but not quite right -- I see a couple spurious bullets at the top of the Dashboard, for instance.

Thanks,

Chris Pepper

Hors ligne

#2 2013-09-16 12:51:17

Franck
Footer de merde
Lieu : Paris
Inscription : 2004-11-09
Site Web

Re : Something went wrong with auto upgrade: SQLite Database Schema

The SQLite database structure cannot be upgraded by Dotclear.

So you have to export your blogs, install a fresh version of DC, and then import the blogs inside the new version.


Dotclear addicted since 2004

Hors ligne

#3 2013-09-16 13:09:15

reppep
Membre
Inscription : 2009-11-14

Re : Something went wrong with auto upgrade: SQLite Database Schema

Thanks. This seems like it will be a problem for many users over time.

1) Can the error message be augmented with a URL pointing to a web page explaining the procedure?

2) Is there an ETA for DC gaining the ability to upgrade the SQLite DB?

3) Is it safe to export from v2.5.3, or do I need to downgrade back to v2.3 for the export, then update back to 2.5.3 for the import?

4) The right-side notices link to blog posts about DC updates. They should probably warn that users need to export and reimport.

Hors ligne

#4 2013-10-16 16:04:02

reppep
Membre
Inscription : 2009-11-14

Re : Something went wrong with auto upgrade: SQLite Database Schema

Can I use sqlite commands to upgrade my 18mb dotclear.sqlite file? It contains several blogs and I don't want to break image links or anything else.

Hors ligne

#5 2013-10-17 11:09:06

Franck
Footer de merde
Lieu : Paris
Inscription : 2004-11-09
Site Web

Re : Something went wrong with auto upgrade: SQLite Database Schema

I think that it should be very hazardous to upgrade a sqlite db, and as I said before, you have to export, update, and then import.

Personnaly I will try this on a copy of my blog before doing it on the public one.


Dotclear addicted since 2004

Hors ligne

#6 2013-10-18 13:29:31

nikrou
Membre
Inscription : 2007-10-02
Site Web

Re : Something went wrong with auto upgrade: SQLite Database Schema

reppep a écrit :

Can I use sqlite commands to upgrade my 18mb dotclear.sqlite file? It contains several blogs and I don't want to break image links or anything else.

Yes but you have to do it manually. The real advantage with sqlite is that it's easy to make backups and restore them. Copy you database manually and keep it.

To upgrade sqlite database you must create new tables for all tables which database schema changed between 2.3 and 2.5.3 and copy data from old table to new one. For example table post_media changed and to upgrade you need to do someting like that :

CREATE TABLE "tmp_dc_post_media" (
   media_id INTEGER NOT NULL ,
   post_id INTEGER NOT NULL ,
   link_type VARCHAR(32) NOT NULL DEFAULT 'attachment' ,
   CONSTRAINT pk_post_media PRIMARY KEY (media_id,post_id,link_type) 
);
INSERT INTO tmp_dc_post_media (media_id, post_id) SELECT media_id, post_id FROM dc_post_media;
DROP TABLE dc_post_media;
ALTER TABLE tm_dc_post_media RENAME dc_post_media;

I didn't test on a large database but you can test on a copy of you database.

Do you think you are able to do something like that ? If yes I can search to have the exact changes. The work is useful for people as I already do the job for debian package.


Je préfère être atteint de parkinson plutôt qu'alzheimer : je prefère renverser un peu de ma bière plutôt qu'oublier de la boire !

Présentez vos photos simplement avec Phyxo !

Hors ligne

#7 2014-03-13 03:07:02

reppep
Membre
Inscription : 2009-11-14

Re : Something went wrong with auto upgrade: SQLite Database Schema

nikrou,

Sorry, but I would love a list of commands to upgrade. I'm running on CentOS 6.4 with sqlite-3.6.20-1.el6.i686.

Hors ligne

#8 2014-03-23 16:20:41

reppep
Membre
Inscription : 2009-11-14

Re : Something went wrong with auto upgrade: SQLite Database Schema

Okay, this is bizarre. I dumped the whole multiblog DB, imported into 2.6.2 on a new webserver, added a new post, and was fine.

Today the new site, with the new post, now says "Something went wrong with auto upgrade: SQLite Database Schema cannot be upgraded." WTF? Is there a sqlite command I can use to check an internal version number or data structure? I am so confused.

Hors ligne

#9 2014-03-23 16:50:12

nikrou
Membre
Inscription : 2007-10-02
Site Web

Re : Something went wrong with auto upgrade: SQLite Database Schema

Hi reppep. You upgraded your blog with the legacy way to upgrade when using SQLite. But even if SQLite is supported officially, database cannot be upgraded easilly. But I hope it will change : http://dev.dotclear.org/2.0/ticket/1913

There's an ugly test in auto upgrade to by pass SQLite. So you've got that strange message. No problem it works. Auto upgrade is tried on login only if I remembered.


Je préfère être atteint de parkinson plutôt qu'alzheimer : je prefère renverser un peu de ma bière plutôt qu'oublier de la boire !

Présentez vos photos simplement avec Phyxo !

Hors ligne

#10 2014-03-24 01:09:10

reppep
Membre
Inscription : 2009-11-14

Re : Something went wrong with auto upgrade: SQLite Database Schema

I am confused. I did a full dump from the source, created an empty dotclear.sqlite file on the target, and loaded the dump in. That doesn't give me a current SQLite DB?

I am puzzled about why I didn't see this error yesterday when I was loading the DB into the new target site...

What do I need to do to fix it? Do I really need to just switch to MySQL?

Thanks!

Hors ligne

Vous n'êtes pas identifié(e).

Pied de page des forums

Sites map