Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-04-10 11:58:30

naomihh
New Member
Registered: 2012-04-10
Posts: 2

Is it possible to update just the database?

I’m moving a site over to a new server and I’ve got in a bit of a mess with the database.

The route of the problem is that the new server is using a new version of php so I updated Textpattern accordingly when I moved it over but I neglected to do this on the old server before I exported the database. I’ve got the site up and running on the new server and all of the forms and pages are working but none of the articles are showing up. When I log in to textpattern and go to the Articles tab I see this error:

Warning: Unknown column ‘Expires’ in ‘field list’ select *, unix_timestamp(Posted) as posted, unix_timestamp(LastMod) as lastmod, unix_timestamp(Expires) as expires from textpattern where 1 order by Posted desc limit 0, 15 in /var/www/vhosts/xxxx.com/httpdocs/textpattern/lib/txplib_db.php on line 89

So I guess the update changed the structure of the database?

Any idea how I can fix this? I can no longer access the textpattern install on the old server to update that.

Thanks

Naomi

Offline

#2 2012-04-10 15:19:44

merz1
Member
From: Hamburg
Registered: 2006-05-04
Posts: 994
Website

Re: Is it possible to update just the database?

What version number had the old installation?

Check (be careful because these docs seem to be pretty old)

(I am no database ninja. The following is just a guess! I have no idea what else has changed from your old version to the latest.)

May be in your case it is enough to add (facts checked against my TXP 4.4.1 installation)

  1. a field ‘Expires’ with standard content ’0000-00-00 00:00:00’ after field ‘Posted’ in the database table ‘textpattern’ via eg phpMyAdmin.
  2. an index Expires_idx
Feld  	Typ 	Kollation 	Attribute 	Null 	Standard 	Extra 	Aktion
Expires  	datetime 	  	  	Nein  	0000-00-00 00:00:00
Expires_idx 	INDEX 	2  	Bearbeiten 	Löschen 	Expires

Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML

Offline

#3 2012-04-10 15:36:31

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,315

Re: Is it possible to update just the database?

naomihh wrote:

Any idea how I can fix this? I can no longer access the textpattern install on the old server to update that.

You’ve updated on the new server, right? And there you have access to the admin side. Does the Diagnostics panel say anything about missing files, any messages in red color?


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#4 2012-04-10 15:36:33

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,948
Website GitHub

Re: Is it possible to update just the database?

There are a few more alterations than the ones merz1 listed, including a File title.

You could try logging out, resetting the txp_version string in phpMyAdmin to the version of your old installation and then logging in again. That’ll run the upgrade script to alter the database safely.

Last edited by Bloke (2012-04-10 15:37:15)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#5 2012-04-10 15:38:18

naomihh
New Member
Registered: 2012-04-10
Posts: 2

Re: Is it possible to update just the database?

Hi Guys

Just adding an ‘Expires’ field seems to have done the trick. Phew!

Thanks for your help

Offline

#6 2012-04-11 06:01:57

merz1
Member
From: Hamburg
Registered: 2006-05-04
Posts: 994
Website

Re: Is it possible to update just the database?

Bloke wrote:

… try logging out, resetting the txp_version string in phpMyAdmin to the version of your old installation …

In the txp_prefs table, there’s a row containing the TXP version. Try setting that to ‘the version of your old installation’ and then log in on TXP again (admin side).

That was the hint I was looking for but couldn’t find in the documentation.

naomihh Please do so.


Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML

Offline

Board footer

Powered by FluxBB