I finally got around to upgrading my DB to use LONGTEXT instead of
TEXT in the same places that you have changed in the upstream.
These are the commands I used, perhaps they can be used by other
people?
start transaction;
ALTER TABLE record MODIFY COLUMN data LONGTEXT NOT NULL;
ALTER TABLE user MODIFY COLUMN header LONGTEXT NOT NULL;
ALTER TABLE user MODIFY COLUMN statistics LONGTEXT NOT NULL;
ALTER TABLE recordversion MODIFY COLUMN header LONGTEXT NOT NULL;
ALTER TABLE recordversion MODIFY COLUMN data LONGTEXT NOT NULL;
commit;
Thanks,
-josh
On Aug 17 2009, 5:24 pm, Giulio Cesare Solaroli
<giulio.ces...@gmail.com> wrote:
> Hello,
>
> I have just committed a few changes in the PHP code of the community
> edition, in order to create someLONGTEXTfields where regular TEXT
> fields were used before.
>
> This should avoid the problem of data truncation that a few users have
> experienced.
>
> The new code is available in the public SVN repository (revision 8),
> but I have not actually tested it. I will create the packed ZIP as
> soon as some users will report a successful installation of the new
> version.
>
> Current users will have to migrate the DB, as the structure of the
> tables is different. If someone is willing to create a script to
> migrate the DB from the current structure, to the new structure, I
> will be very pleased to include it in the main distribution.
>
> Hope this helps.
>
> Regards,
>
> Giulio Cesare
>
> On Fri, Aug 7, 2009 at 10:10 AM, Giulio Cesare
>
>
>
>
>
>
>
> Solaroli<giulio.ces...@gmail.com> wrote:
> > Thanks Lutz!
>
> > Giulio Cesare
>
> > On Wed, Aug 5, 2009 at 3:13 AM, Lutz<lutz.ho...@googlemail.com> wrote:
>
> >> Today I had a bit time, so I made a copy of my clipperz dir & database
> >> and took a look into the code. I got it repaired with doing two
> >> things:
>
> >> - I used the pog generator link which is mentioned in the
> >> class.user.php, to generate a new class.user.php. For the new class
> >> file i only changed type of header from TEXT to MEDIUMTEXT. I replaced
> >> the old class.user.php file with the new one.
> >> - I used phpmyadmin to change the data type of header filed (in user
> >> table) also from TEXT to MEDIUMTEXT.
>
> >> That's all!
> >> I have added some new cards. Now the content of header field is bigger
> >> as 65535 chars. And it still works.
>
> >> I did the following tests:
> >> Logout / Login: WORKS
> >> Download & Use Offline Copy: WORKS
> >> Generate, Use & Delete One Time Passwords: WORKS
> >> Delete Account: WORKS
>
> >> Also the automated table creation using /php/setup/index.php works &
> >> creates the tables like in the new style.
> >> So for new installations it looks like the only thing what is needed
> >> to exchange is the class.user.php file.
>
> >> This is link creates a new class.user.php file with MEDIUMTEXT for the
> >> header field:
> >>http://www.phpobjectgenerator.com/?language=php5.1&wrapper=pdo&pdoDri...
you can write an UPGRADE.txt file (003->004), then we can upload it to the
commutiy edition git repository and make a 004 tar.gz. Also,
INSTALL.txt would need some love (e.g. which directories are really
needed). That way, all users would be able to use the latest edition and
less duplicate bug reports would show up on the mailing list!
Greetings,
Johannes