Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: TheLookBook on August 06, 2011, 05:23:51 PM

Title: Members List
Post by: TheLookBook on August 06, 2011, 05:23:51 PM
Just downloaded the members backup from 1.1.14 sql file to a php file from mysql database control panel. How would I upload it from my hard-drive and get the members installed onto my installation of 2.0 allowing me to keep the existing members.
Title: Re: Members List
Post by: Ricky. on August 06, 2011, 06:34:13 PM
You mean only backup of member's table..
That is not advisable, instead simply go for a large upgrade and convert your existing 1.1.x into 2.0 !
Title: Re: Members List
Post by: TheLookBook on August 07, 2011, 04:22:44 PM
I'm currently running 2.0 so how could it be done from here. Get error message when trying to upgrade using the 2.0 large upgrade. Will run it again and leave snapshot of error. It stops working when it gets to making changes in database index.
Title: Re: Members List
Post by: TheLookBook on August 07, 2011, 04:35:22 PM
Here is the error message snapshot when trying to upgrade using the large upgrade.
Title: Re: Members List
Post by: Illori on August 07, 2011, 07:22:21 PM
Quote from: Illori on July 02, 2011, 06:48:32 AM
you could also try this

Quote from: Norv
ETA2: I know why it happens on some upgrades. You may actually try this instead, too:
upgrade_2-0.sql

---# Adding file hash.
ALTER TABLE {$db_prefix}attachments
ADD COLUMN file_hash varchar(40) NOT NULL default '';
---#

Cut and move it before the previous step(s), somewhere like, before:

---# Populate the attachment extension.

Title: Re: Members List
Post by: TheLookBook on August 07, 2011, 08:40:49 PM
Found this in file: upgrade_2-0_postgresql.sql

---# Adding file hash.
---{
   upgrade_query("

      ALTER TABLE {$db_prefix}attachments
      ADD COLUMN file_hash varchar(40) NOT NULL default ''");
---}
---#

Not to clear on what to do next.
Title: Re: Members List
Post by: Illori on August 08, 2011, 06:16:31 AM
unless you are using postgres as your sql server use the mysql version of that file.
Title: Re: Members List
Post by: TheLookBook on August 08, 2011, 11:39:11 AM
Yes I have the my sql version. Got the info and changes you provided but a little lost on exactly how to do it. Break it down just a little bit more please. Thanks for your support.
Title: Re: Members List
Post by: ziycon on August 08, 2011, 12:03:28 PM
I think that Illori means to cut and paste the snippet from within the mysql sql upgrade file:
---# Adding file hash.
ALTER TABLE {$db_prefix}attachments
ADD COLUMN file_hash varchar(40) NOT NULL default '';
---#

before the line:
---# Populate the attachment extension.
Title: Re: Members List
Post by: Illori on August 08, 2011, 12:06:13 PM
yes exactly
Title: Re: Members List
Post by: TheLookBook on August 08, 2011, 02:31:12 PM
Quote from: ziycon on August 08, 2011, 12:03:28 PM
I think that Illori means to cut and paste the snippet from within the mysql sql upgrade file:
---# Adding file hash.
ALTER TABLE {$db_prefix}attachments
ADD COLUMN file_hash varchar(40) NOT NULL default '';
---#

before the line:
---# Populate the attachment extension.

OK, cut this code:
---# Adding file hash.
ALTER TABLE {$db_prefix}attachments
ADD COLUMN file_hash varchar(40) NOT NULL default '';
---#


And replace it with:
---# Populate the attachment extension.
Title: Re: Members List
Post by: Illori on August 08, 2011, 02:33:25 PM
no the text does not say to replace anything it says to MOVE it before that part.
Title: Re: Members List
Post by: TheLookBook on August 08, 2011, 03:29:43 PM
I picked up on that when I got back to my plesk cpanel. Did just that and got the same results. Look at this just like I did it, maybe it's something I did wrong. I moved it to the top of Populate. Should I leave it where it originate as well?

---# Adding file hash.
ALTER TABLE {$db_prefix}attachments
ADD COLUMN file_hash varchar(40) NOT NULL default '';

---# Populate the attachment extension.
UPDATE {$db_prefix}attachments
SET fileext = LOWER(SUBSTRING(filename, 1 - (INSTR(REVERSE(filename), '.'))))
WHERE fileext = ''
   AND INSTR(filename, '.')
   AND attachment_type != 3;

Title: Re: Members List
Post by: Illori on August 08, 2011, 03:31:27 PM
that should work, you could try putting it higher up in the file as well.
Title: Re: Members List
Post by: TheLookBook on August 08, 2011, 03:42:30 PM
Ok, will move it up and get back with you. Thanks for the support.
Title: Re: Members List
Post by: TheLookBook on August 08, 2011, 04:08:46 PM
Put it higher up in the file:
---#
---# Adding file hash.
ALTER TABLE {$db_prefix}attachments
ADD COLUMN file_hash varchar(40) NOT NULL default '';

---# Altering attachment table.
ALTER TABLE {$db_prefix}attachments
ADD COLUMN fileext varchar(8) NOT NULL default '',
ADD COLUMN mime_type varchar(20) NOT NULL default '';

ALTER TABLE {$db_prefix}attachments
ADD COLUMN id_folder tinyint(3) NOT NULL default '1';
---#

---# Populate the attachment extension.
UPDATE {$db_prefix}attachments
SET fileext = LOWER(SUBSTRING(filename, 1 - (INSTR(REVERSE(filename), '.'))))
WHERE fileext = ''
   AND INSTR(filename, '.')
   AND attachment_type != 3;

Error message changed slightly, see attachment:
Title: Re: Members List
Post by: Illori on August 08, 2011, 04:11:00 PM
no idea on that one, i have done a few upgrades for charter members with attachments and that fix worked for them. since i dont use attachments on my forum i cant offer much other advice.
Title: Re: Members List
Post by: TheLookBook on August 08, 2011, 05:22:04 PM
Thanks for the support
Title: Re: Members List
Post by: ziycon on August 09, 2011, 03:57:29 AM
Is there an error.log file generated in SMF directory when the upgrade fails? If so could you upload it or post the relevant error message?
Title: Re: Members List
Post by: TheLookBook on August 09, 2011, 12:52:00 PM
I will check Z and let me say this, I have a file labled ( backup_members.sql ) in my database. Opened it in a text format and they are all there. The 8,000 plus that I'm trying to restore. Will check for the error.log file and get back. Thanks for the response. update: Just checked  and there is no such file in the directory. Furthermore is there another place I might look for it?
Title: Re: Members List
Post by: TheLookBook on August 10, 2011, 03:40:31 PM
Passed it on to my hosting company, they concluded that the upgrade should have completed easily. Sent them the snapshots and other info requested. They are investigating the problem and working to fix it on my end. Thanks for the help and support here at SMF.