In my install.mysql.utf8.sql I see this invalid setting for a DATETIME field with default value set to None: finish_timestamp DATETIME NULL DEFAULT '',
It should be: finish_timestamp DATETIME NULL,
Steps to reproduce the Bug
Create a datetime field (calendar).
In the database tab, set datatype = datetime, data default = none, Null Switch = NULL
Which Joomla version are you compiling in?
v5.2.1
Which PHP version are you compiling in?
v8.1
Which Joomla versions are you targeting?
v5.2.1
Which PHP version are you targeting?
8.2
Which Web server is JCB running on?
Apache 2.4
Which Relational Database is JCB running on?
MariaDB 10.4.31
Which OS is JCB running on?
Ubuntu 20.0.4
Which JCB version are you using?
v5.0.4-beta1
Where in JCB did this issue occur?
Installation of a component
On which browsers did you encounter the issue?
Safari
Additional Comments
No response
### What Happened?
In my install.mysql.utf8.sql I see this invalid setting for a DATETIME field with default value set to None:
`finish_timestamp` DATETIME NULL DEFAULT '',
It should be:
`finish_timestamp` DATETIME NULL,
### Steps to reproduce the Bug
Create a datetime field (calendar).
In the database tab, set datatype = datetime, data default = none, Null Switch = NULL
### Which Joomla version are you compiling in?
v5.2.1
### Which PHP version are you compiling in?
v8.1
### Which Joomla versions are you targeting?
v5.2.1
### Which PHP version are you targeting?
8.2
### Which Web server is JCB running on?
Apache 2.4
### Which Relational Database is JCB running on?
MariaDB 10.4.31
### Which OS is JCB running on?
Ubuntu 20.0.4
### Which JCB version are you using?
v5.0.4-beta1
### Where in JCB did this issue occur?
Installation of a component
### On which browsers did you encounter the issue?
Safari
### Additional Comments
_No response_
As for the finish_timestamp DATETIME NULL DEFAULT '', to change this to show NULL I will have to check... this might take a while :)
This normally worked for me:

As for the `finish_timestamp DATETIME NULL DEFAULT '',` to change this to show `NULL` I will have to check... this might take a while :)
0000-00-00 00:00:00 would require to disable strict mode on MySQL 5.7+. I think it's considered bad practice to do that. In MariaDB from 10.2.4 onwards STRICT_TRANS_TABLES is enabled by default. This mode prevents the use of invalid date values like 0000-00-00 00:00:00.
0000-00-00 00:00:00 would require to disable strict mode on MySQL 5.7+. I think it's considered bad practice to do that. In MariaDB from 10.2.4 onwards STRICT_TRANS_TABLES is enabled by default. This mode prevents the use of invalid date values like 0000-00-00 00:00:00.
This string EMPTY in the other value removes the DEFAULT '', we opt for that as the solution since we used the 'none' option to mean empty string... in most of our projects. So maybe we should rethink the whole design of that... for now just add EMPTY string to the other value and it should work.
This also works:
This will produce:
`created`DATETIMENULLDEFAULTCURRENT_TIMESTAMP
Yes, I am aware of this, and we did add this [change to the core dates](https://git.vdm.dev/joomla/Component-Builder/src/commit/703e8e0133c2266f4a711d34bb0898029a6b7671/admin/sql/install.mysql.utf8.sql#L214)
To achieve this you can do the following:

That will produce:
```sql
`created` DATETIME NULL,
```
This string `EMPTY` in the other value removes the `DEFAULT ''`, we opt for that as the solution since we used the `'none'` option to mean empty string... in most of our projects. So maybe we should rethink the whole design of that... for now just add `EMPTY` string to the other value and it should work.
This also works:

This will produce:
```sql
`created` DATETIME NULL DEFAULT CURRENT_TIMESTAMP
```
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What Happened?
In my install.mysql.utf8.sql I see this invalid setting for a DATETIME field with default value set to None:
finish_timestampDATETIME NULL DEFAULT '',It should be:
finish_timestampDATETIME NULL,Steps to reproduce the Bug
Create a datetime field (calendar).
In the database tab, set datatype = datetime, data default = none, Null Switch = NULL
Which Joomla version are you compiling in?
v5.2.1
Which PHP version are you compiling in?
v8.1
Which Joomla versions are you targeting?
v5.2.1
Which PHP version are you targeting?
8.2
Which Web server is JCB running on?
Apache 2.4
Which Relational Database is JCB running on?
MariaDB 10.4.31
Which OS is JCB running on?
Ubuntu 20.0.4
Which JCB version are you using?
v5.0.4-beta1
Where in JCB did this issue occur?
Installation of a component
On which browsers did you encounter the issue?
Safari
Additional Comments
No response
Just checking in on this issue?
This normally worked for me:
As for the
finish_timestamp DATETIME NULL DEFAULT '',to change this to showNULLI will have to check... this might take a while :)0000-00-00 00:00:00 would require to disable strict mode on MySQL 5.7+. I think it's considered bad practice to do that. In MariaDB from 10.2.4 onwards STRICT_TRANS_TABLES is enabled by default. This mode prevents the use of invalid date values like 0000-00-00 00:00:00.
Yes, I am aware of this, and we did add this change to the core dates
To achieve this you can do the following:
That will produce:
This string
EMPTYin the other value removes theDEFAULT '', we opt for that as the solution since we used the'none'option to mean empty string... in most of our projects. So maybe we should rethink the whole design of that... for now just addEMPTYstring to the other value and it should work.This also works:
This will produce:
I hope this has been resolved :)