-
Notifications
You must be signed in to change notification settings - Fork 580
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ticket 8848: Fix various typos causing issues on db migration #247
base: testlink_1_9_20_fixed
Are you sure you want to change the base?
Conversation
Manage this branch in SquashTest this branch here: https://heujpatch-6-6zbko.squash.io |
being_exec_ts (read begin_exec_ts) and end_exec_ts are NOT NULL, so they must have a default value. "Virtual" zero date '1970-01-01 00:00:01' may work. |
This is a new table, do not think the default value is Mandatory for the NOT NULL command, the value will be handled by the application, not by the DBMS. |
The creation fails for me: mysql> CREATE TABLE /*prefix*/baseline_l1l2_context (
-> id int(10) unsigned NOT NULL AUTO_INCREMENT,
-> testplan_id int(10) unsigned NOT NULL DEFAULT '0',
-> platform_id int(10) unsigned NOT NULL DEFAULT '0',
-> being_exec_ts timestamp NOT NULL,
-> end_exec_ts timestamp NOT NULL,
-> creation_ts timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
-> PRIMARY KEY (id),
-> UNIQUE KEY udx1 (testplan_id,platform_id,creation_ts)
-> ) DEFAULT CHARSET=utf8;
ERROR 1067 (42000): Invalid default value for 'end_exec_ts' May it be something else? |
As usual is an issue regarding different MySQL config. |
FYI, I tested using the Dockerfile provided in the sources. |
Hi,
Either allow NULL and have NULL as default: both work for me, in the pull request I chose the second option to keep consistency with all other timestamps in the sql file
|
The column definitions will be: without default, because this is valid (I've checked with one DB Admin). |
Understood. Creating a table with more than one timestamp NOT NULL and without DEFAULT, like e.g.
leads to in case db is in strict mode which it is by default on my system. This can be changed by adding |
No description provided.