When I create TIMESTAMP fields in my database, I'm noticing that when I save the table changes and then script over the database to export the schema the export contains changes to the timestamp fields that I did not make. For example:
`LastUpdate` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP
The DEFAULT and ON UPDATE clauses and values were not specified by me. And, after reading about the gotchas regarding the handling of TIMESTAMP fields on mysql.com, I want to let my application handle the updates to these fields. But, either the CRLab .NetDirect add-in within Visual Studio is adding these clauses/values or MySQL itself is adding them.
Do you know anything about this type of problem with TIMESTAMP field definitions being altered without our knowledge?
Thanks,
Chris
TimeStamp fields being altered by who?
-
- Posts: 15
- Joined: Fri 11 Aug 2006 14:04
- Location: Atlanta, GA USA
-
- Posts: 15
- Joined: Fri 11 Aug 2006 14:04
- Location: Atlanta, GA USA
It's the only tool I use to create my schema
I use only the CRLab mySQL add-in to create my databases and schema. And, I explictly went through all of my TimeStamp fields and ensured they didn't have a default value, clicked save within VisualStudio and then immediately right click on my database and did an Export within DBExplorer. And, the export script shows not only default values but ON UPDATE clauses added to my fields.
I'm not using any other tool. Thus, do you think MySQL would alter my fields b/c it would be the only other entity that touches my data.
I will try and isolate the problem. Maybe the problem is in the Export or maybe it's in the code behind DBExplorer... who knows...
I'm not using any other tool. Thus, do you think MySQL would alter my fields b/c it would be the only other entity that touches my data.
I will try and isolate the problem. Maybe the problem is in the Export or maybe it's in the code behind DBExplorer... who knows...
-
- Posts: 15
- Joined: Fri 11 Aug 2006 14:04
- Location: Atlanta, GA USA