Thanks Sumedha, that worked.

IS guys, please note to update your db scripts accordingly.

Thanks,
NuwanD.


On Fri, Sep 20, 2013 at 3:39 PM, Sumedha Rubasinghe <sume...@wso2.com>wrote:

> MySQL by default updates this. (see
> http://dev.mysql.com/doc/refman/5.0/en/timestamp-initialization.html)
> You need to explicitly turn this off by
>
> TIME_CREATED TIMESTAMP DEFAULT 0,
>
>
>
>
> On Fri, Sep 20, 2013 at 3:34 PM, Prabath Siriwardena <prab...@wso2.com>wrote:
>
>> Can you please change the script to following and see..
>>
>> TIME_CREATED TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
>>
>> Thanks & regards,
>> -Prabath
>>
>> On Fri, Sep 20, 2013 at 3:27 PM, Nuwan Dias <nuw...@wso2.com> wrote:
>> > No. Just TIMESTAMP. We thought of manually setting the created time to
>> what
>> > it originally was. Since changing the column type requires some effort
>> which
>> > will include a need of migrating older version users as well.
>> >
>> > Thanks,
>> > NuwanD.
>> >
>> >
>> > On Fri, Sep 20, 2013 at 3:19 PM, Prabath Siriwardena <prab...@wso2.com>
>> > wrote:
>> >>
>> >> Do you have "ON UPDATE CURRENT_TIMESTAMP"  against the TIME_CREATED
>> column
>> >> ?
>> >>
>> >> Thanks & regards,
>> >> -Prabath
>> >>
>> >> On Fri, Sep 20, 2013 at 2:26 PM, Nuwan Dias <nuw...@wso2.com> wrote:
>> >> > We can, but this would mean that we need to change the code and set
>> the
>> >> > time
>> >> > in all places that do an INSERT to this table.
>> >> >
>> >> > Thanks,
>> >> > NuwanD.
>> >> >
>> >> >
>> >> > On Fri, Sep 20, 2013 at 2:22 PM, Prabath Siriwardena <
>> prab...@wso2.com>
>> >> > wrote:
>> >> >>
>> >> >> It's not rights to update the TIME_CREATED every time we update the
>> >> >> record.
>> >> >>
>> >> >> Can we update it to DATETIME?
>> >> >>
>> >> >> Thanks & regards,
>> >> >> -Prabath
>> >> >>
>> >> >>
>> >> >> On Fri, Sep 20, 2013 at 2:12 PM, Nuwan Dias <nuw...@wso2.com>
>> wrote:
>> >> >>>
>> >> >>> Hi,
>> >> >>>
>> >> >>> This is regarding the issue [1]. When an OAuth2 token is initially
>> >> >>> created, it is created in the 'Active' state. When revoking a
>> token,
>> >> >>> its
>> >> >>> state is changed to 'REVOKED'. But this time, the TIME_CREATED
>> value
>> >> >>> of that
>> >> >>> particular database entry is also updated.
>> >> >>>
>> >> >>> When looking at the issue, I found that the TIME_CREATED column
>> has a
>> >> >>> TIMESTAMP type. According to [2], in MySQL databases this means
>> that
>> >> >>> the
>> >> >>> TIME_CREATED column is always updated whenever that row is updated.
>> >> >>> Hence
>> >> >>> the cause for the issue [1]. Is it right to have this column type
>> as
>> >> >>> TIMESTAMP?
>> >> >>>
>> >> >>> [1] - https://wso2.org/jira/browse/APIMANAGER-1696
>> >> >>> [2] -
>> http://stackoverflow.com/questions/409286/datetime-vs-timestamp
>> >> >>>
>> >> >>> Thanks,
>> >> >>> NuwanD.
>> >> >>>
>> >> >>> --
>> >> >>> Nuwan Dias
>> >> >>>
>> >> >>> Senior Software Engineer - WSO2, Inc. http://wso2.com
>> >> >>> email : nuw...@wso2.com
>> >> >>> Phone : +94 777 775 729
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >> --
>> >> >> Thanks & Regards,
>> >> >> Prabath
>> >> >>
>> >> >> Mobile : +94 71 809 6732
>> >> >>
>> >> >> http://blog.facilelogin.com
>> >> >> http://RampartFAQ.com
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > Nuwan Dias
>> >> >
>> >> > Senior Software Engineer - WSO2, Inc. http://wso2.com
>> >> > email : nuw...@wso2.com
>> >> > Phone : +94 777 775 729
>> >>
>> >>
>> >>
>> >> --
>> >> Thanks & Regards,
>> >> Prabath
>> >>
>> >> Mobile : +94 71 809 6732
>> >>
>> >> http://blog.facilelogin.com
>> >> http://RampartFAQ.com
>> >
>> >
>> >
>> >
>> > --
>> > Nuwan Dias
>> >
>> > Senior Software Engineer - WSO2, Inc. http://wso2.com
>> > email : nuw...@wso2.com
>> > Phone : +94 777 775 729
>>
>>
>>
>> --
>> Thanks & Regards,
>> Prabath
>>
>> Mobile : +94 71 809 6732
>>
>> http://blog.facilelogin.com
>> http://RampartFAQ.com
>> _______________________________________________
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>
>
>
> --
> /sumedha
> m: +94 773017743
> b :  bit.ly/sumedha
>



-- 
Nuwan Dias

Senior Software Engineer - WSO2, Inc. http://wso2.com
email : nuw...@wso2.com
Phone : +94 777 775 729
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to