opennetadmin / ona

OpenNetAdmin IP Address Management (IPAM) system
opennetadmin.com
GNU General Public License v2.0
136 stars 34 forks source link

ctime doesnt have default value #151

Open mattpascoe opened 4 years ago

mattpascoe commented 4 years ago

It looks as though mysql 8+ and or the version adodb we are on is not working well with default timestamps. It seems mysql is not getting the settings during a fresh install to define a default timestamp when nothing is provided. This causes a downstream set of errors.

I've been having several recent issues with timestamps stored in the database. I'm very tempted to scrap database particulars and just make the code store what it is supposed to instead of relying on ever changing database crap.

I know there are those who wont agree with that but I grow tired of varying database practices around this stuff. All I want is basic structure and types. I'll worry about my own data integrity, and that database can just store what I tell it to.

mattpascoe commented 4 years ago

I have fixed a few locations where ctime started blank.. the code now sets it to the current date. I know there are more to fix.. this needs more testing.. currently lives in the development branch.

dmgeurts commented 4 years ago

Ah, yes I forgot I had to fiddle with that as well. Let me give the latest dev branch a go now. Thank you for looking into this.