coppermine-gallery.com/forum

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Installation & Setup => Topic started by: xplicit on October 10, 2005, 12:37:59 AM

Title: MTIME problem setting to NOT NULL
Post by: xplicit on October 10, 2005, 12:37:59 AM
While transfering my database I encountered a problem with my new phpmyadmin.

While using:

ALTER TABLE `cpg131_pictures` ADD `mtime` TIMESTAMP NOT NULL AFTER `hits` ;

I get the restult

Field    type                 atrr                   Null              default            Extra
mtime timestamp(14)                           YES             NULL

So it seems NOT NULL is not supported ???

Could this cause a problem in the future?




Title: Re: MTIME problem setting to NOT NULL
Post by: artistsinhawaii on October 10, 2005, 01:18:28 AM
I would suggest manually edit your Pictures table so that the Mtime field looks like:


Field                :    mtime
Type               :    timestamp
Collation           :
Attributes        :    ON UPDATE CURRENT_TIMESTAMP
Null                 :    No
Default            :    CURRENT_TIMESTAMP
Extra               :


Dennis
Title: Re: MTIME problem setting to NOT NULL
Post by: xplicit on October 10, 2005, 02:11:12 PM
Well uhmmm..... thats the point I always do such things manually but it doenst accept the settings

Original on my old server the statement was

`mtime` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,

But my new host (same version phpmyadmin) doesn't accept the CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP so I checked the original setup script which said  mtime timestamp(14) NOT NULL,

But will try severals things today to make it somehow correct, my concern at the moment is if this will cause a problem if I really cant change it

Title: Re: MTIME problem setting to NOT NULL
Post by: Stramm on October 10, 2005, 02:17:05 PM
the new phpmyadmin has a dropdown in export - 'SQL export compatibility' -> try setting it to MYSQL40
Title: Re: MTIME problem setting to NOT NULL
Post by: xplicit on October 10, 2005, 03:54:22 PM
Ok seems I got to live with it :)

Removed the complete picture table, exported my old one with compatiblility MYSQL40 but get same result while importing this at my new host.

I guesss I have to live with it :)

Will change my testing server to see what the effect will with the "wrong" settings
Title: Re: MTIME problem setting to NOT NULL
Post by: Stramm on October 10, 2005, 04:11:03 PM
try to remove   AFTER `hits`