[Tiki-devel] Old trunk db upgrade

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Tiki-devel] Old trunk db upgrade

luciash d' being
Hi,

just upgraded a rather old trunk copy on my localhost and got the
following error while doing the php console.php d:u

Queries executed successfully: 271
Error 0 in 20140402_payment_authorization_tiki
     ALTER TABLE `tiki_payment_requests` ADD COLUMN `authorized_until`
TIMESTAMP NULL AFTER `due_date`
     Invalid default value for 'due_date'

Should I just ignore this (as it is from 2014) or should we fix it?

luci


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
TikiWiki-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
Reply | Threaded
Open this post in threaded view
|

Re: [Tiki-devel] Old trunk db upgrade

Jonny Bradley-4
Hi Luci

Is that on mysql 5.7? I thought we got most of those ones (NULL and 0000-00-00 etc are not valid dates anymore).

I see in my trunk database i have:

      `due_date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',

which would now cause an error like yours... on 5.7. I guess the proper fix would be to add a new fix (to that file, or a new one) to make it

    `due_date` TIMESTAMP NULL

which is how it is in tiki.sql now.

Tricky one though as it sort of needs to be done before the one from 2014

I guess adding

   ALTER TABLE `tiki_payment_requests` CHANGE `due_date` `due_date` TIMESTAMP  NULL;

to that one and as a new one (and for any other fields like this) would be the proper fix?

Bet you wish you never asked now! :D

jb




> On 27 Feb 2017, at 16:28, luciash <[hidden email]> wrote:
>
> Hi,
>
> just upgraded a rather old trunk copy on my localhost and got the
> following error while doing the php console.php d:u
>
> Queries executed successfully: 271
> Error 0 in 20140402_payment_authorization_tiki
>     ALTER TABLE `tiki_payment_requests` ADD COLUMN `authorized_until`
> TIMESTAMP NULL AFTER `due_date`
>     Invalid default value for 'due_date'
>
> Should I just ignore this (as it is from 2014) or should we fix it?
>
> luci
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> TikiWiki-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
>


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
TikiWiki-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
Reply | Threaded
Open this post in threaded view
|

Re: [Tiki-devel] Old trunk db upgrade

luciash d' being
Hi jonny,


On 02/27/2017 05:58 PM, Jonny Bradley wrote:
> Hi Luci
>
> Is that on mysql 5.7? I thought we got most of those ones (NULL and 0000-00-00 etc are not valid dates anymore).

yup, 5.7.17

>
> I see in my trunk database i have:
>
>        `due_date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
>
> which would now cause an error like yours... on 5.7. I guess the proper fix would be to add a new fix (to that file, or a new one) to make it
>
>      `due_date` TIMESTAMP NULL
>
> which is how it is in tiki.sql now.
>
> Tricky one though as it sort of needs to be done before the one from 2014
>
> I guess adding
>
>     ALTER TABLE `tiki_payment_requests` CHANGE `due_date` `due_date` TIMESTAMP  NULL;
>
> to that one and as a new one (and for any other fields like this) would be the proper fix?
>
> Bet you wish you never asked now! :D

Hahahaha :D Well, could that be fixed in the 2014 file directly?

luci


>
> jb
>
>
>
>
>> On 27 Feb 2017, at 16:28, luciash <[hidden email]> wrote:
>>
>> Hi,
>>
>> just upgraded a rather old trunk copy on my localhost and got the
>> following error while doing the php console.php d:u
>>
>> Queries executed successfully: 271
>> Error 0 in 20140402_payment_authorization_tiki
>>      ALTER TABLE `tiki_payment_requests` ADD COLUMN `authorized_until`
>> TIMESTAMP NULL AFTER `due_date`
>>      Invalid default value for 'due_date'
>>
>> Should I just ignore this (as it is from 2014) or should we fix it?
>>
>> luci
>>
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>> _______________________________________________
>> TikiWiki-devel mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
>>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> TikiWiki-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
TikiWiki-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
Reply | Threaded
Open this post in threaded view
|

Re: [Tiki-devel] Old trunk db upgrade

Jonny Bradley-4

> On 27 Feb 2017, at 17:44, luciash <[hidden email]> wrote:
>
> Hi jonny,
>
>
> On 02/27/2017 05:58 PM, Jonny Bradley wrote:
>> Hi Luci
>>
>> Is that on mysql 5.7? I thought we got most of those ones (NULL and 0000-00-00 etc are not valid dates anymore).
>
> yup, 5.7.17
>
>>
>> I see in my trunk database i have:
>>
>>       `due_date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
>>
>> which would now cause an error like yours... on 5.7. I guess the proper fix would be to add a new fix (to that file, or a new one) to make it
>>
>>     `due_date` TIMESTAMP NULL
>>
>> which is how it is in tiki.sql now.
>>
>> Tricky one though as it sort of needs to be done before the one from 2014
>>
>> I guess adding
>>
>>    ALTER TABLE `tiki_payment_requests` CHANGE `due_date` `due_date` TIMESTAMP  NULL;
>>
>> to that one and as a new one (and for any other fields like this) would be the proper fix?
>>
>> Bet you wish you never asked now! :D
>
> Hahahaha :D Well, could that be fixed in the 2014 file directly?

Yes, i needs to be there, but also added as a new one as my trunk has already run that 2014 script on mysql 5.6 so there would be problem with payments (probably major) when i upgrade to 5.7 :)

Before 17.0 we should go through a dump of an old, but allegedly updated, tiki and see how many '0000-00-00 00:00:00' are still in there (another one for the list ;)

jb



>
> luci
>
>
>>
>> jb
>>
>>
>>
>>
>>> On 27 Feb 2017, at 16:28, luciash <[hidden email]> wrote:
>>>
>>> Hi,
>>>
>>> just upgraded a rather old trunk copy on my localhost and got the
>>> following error while doing the php console.php d:u
>>>
>>> Queries executed successfully: 271
>>> Error 0 in 20140402_payment_authorization_tiki
>>>     ALTER TABLE `tiki_payment_requests` ADD COLUMN `authorized_until`
>>> TIMESTAMP NULL AFTER `due_date`
>>>     Invalid default value for 'due_date'
>>>
>>> Should I just ignore this (as it is from 2014) or should we fix it?
>>>
>>> luci
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>>> _______________________________________________
>>> TikiWiki-devel mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
>>>
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>> _______________________________________________
>> TikiWiki-devel mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> TikiWiki-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
TikiWiki-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel