defualt value none for database fields #602
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: joomla/Component-Builder#602
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Steps to reproduce the issue
When set none for default value for a filed in database tap
Expected result
'column1' INT NULL,
Actual result
'column1' INT NULL DEFAULT '',
System information (as much as possible)
Additional comments
we expect that when set none for default value it means that no DEFAULT keyword will not appear in the sql install script for that filed but the DEFAULT '' is inserted!
Let see, yes that seems to be the case. What we can try and do to please as many as possible. Se will need to look at the expected behavior, and then see if we can change things not to break that.
So I initially said if field is
NOT NULL
and default of none, then we give it aDEFAULT ''
which is the expected behavior. But you are saying it isNULL
and then I agree it should not add a empty default, since no value should beNULL
. Lets see if I can change that.Would you agree with making only that change?
Okay I am looking over the code, and I am wondering if you can do some tests for me?
So on line 10009 we are checking if the default is "EMPTY" and then adding the null switch. So this EMPTY is set in the Other value like this:
Can you try this and see if it resolves your issue.
I am closing this, should the solution not work for you, just bump the closed issue again.