|
|
|
Re: Change to 2000-01-01 00:00:00 everywhere [message #6315 is a reply to message #6312] |
Sun, 16 April 2017 06:16 |
apmuthu
Messages: 30 Registered: April 2017 Location: Chennai Singapore
|
Member |
|
|
For those who want to do in for an existing installation here goes:
ALTER TABLE `survey`.`answer_option` CHANGE `created_date` `created_date` DATETIME DEFAULT '2000-01-01 00:00:00' NOT NULL;
ALTER TABLE `survey`.`asset_type` CHANGE `created_date` `created_date` DATETIME DEFAULT '2000-01-01 00:00:00' NOT NULL;
ALTER TABLE `survey`.`default_prompt` CHANGE `created_date` `created_date` DATETIME DEFAULT '2000-01-01 00:00:00' NOT NULL;
ALTER TABLE `survey`.`location_address` CHANGE `created_date` `created_date` DATETIME DEFAULT '2000-01-01 00:00:00' NOT NULL;
ALTER TABLE `survey`.`location_type` CHANGE `created_date` `created_date` DATETIME DEFAULT '2000-01-01 00:00:00' NOT NULL;
ALTER TABLE `survey`.`number_option` CHANGE `created_date` `created_date` DATETIME DEFAULT '2000-01-01 00:00:00' NOT NULL;
ALTER TABLE `survey`.`org_type` CHANGE `created_date` `created_date` DATETIME DEFAULT '2000-01-01 00:00:00' NOT NULL;
ALTER TABLE `survey`.`question_prompt` CHANGE `created_date` `created_date` DATETIME DEFAULT '2000-01-01 00:00:00' NOT NULL;
ALTER TABLE `survey`.`risk_status` CHANGE `created_date` `created_date` DATETIME DEFAULT '2000-01-01 00:00:00' NOT NULL;
ALTER TABLE `survey`.`risk_weighting` CHANGE `created_date` `created_date` DATETIME DEFAULT '2000-01-01 00:00:00' NOT NULL;
ALTER TABLE `survey`.`survey_answer_dtl` CHANGE `created_date` `created_date` DATETIME DEFAULT '2000-01-01 00:00:00' NOT NULL;
ALTER TABLE `survey`.`survey_answer_hdr` CHANGE `created_date` `created_date` DATETIME DEFAULT '2000-01-01 00:00:00' NOT NULL;
ALTER TABLE `survey`.`survey_hdr` CHANGE `created_date` `created_date` DATETIME DEFAULT '2000-01-01 00:00:00' NOT NULL;
ALTER TABLE `survey`.`survey_question` CHANGE `created_date` `created_date` DATETIME DEFAULT '2000-01-01 00:00:00' NOT NULL;
ALTER TABLE `survey`.`survey_section` CHANGE `created_date` `created_date` DATETIME DEFAULT '2000-01-01 00:00:00' NOT NULL;
ALTER TABLE `survey`.`survey_type` CHANGE `created_date` `created_date` DATETIME DEFAULT '2000-01-01 00:00:00' NOT NULL;
ALTER TABLE `survey`.`tree_node` CHANGE `created_date` `created_date` DATETIME DEFAULT '2000-01-01 00:00:00' NOT NULL;
|
|
|
Re: Change to 2000-01-01 00:00:00 everywhere [message #6316 is a reply to message #6315] |
Sun, 16 April 2017 06:23 |
apmuthu
Messages: 30 Registered: April 2017 Location: Chennai Singapore
|
Member |
|
|
The classroom-schema.sql too has the same issue.
ALTER TABLE `classroom`.`crs_class` CHANGE `created_date` `created_date` DATETIME DEFAULT '2000-01-01 00:00:00' NOT NULL;
ALTER TABLE `classroom`.`crs_lesson` CHANGE `created_date` `created_date` DATETIME DEFAULT '2000-01-01 00:00:00' NOT NULL;
ALTER TABLE `classroom`.`crs_room` CHANGE `created_date` `created_date` DATETIME DEFAULT '2000-01-01 00:00:00' NOT NULL;
ALTER TABLE `classroom`.`crs_schedule` CHANGE `created_date` `created_date` DATETIME DEFAULT '2000-01-01 00:00:00' NOT NULL;
ALTER TABLE `classroom`.`crs_schedule_hdr` CHANGE `created_date` `created_date` DATETIME DEFAULT '2000-01-01 00:00:00' NOT NULL;
ALTER TABLE `classroom`.`crs_student` CHANGE `created_date` `created_date` DATETIME DEFAULT '2000-01-01 00:00:00' NOT NULL;
ALTER TABLE `classroom`.`crs_subject` CHANGE `created_date` `created_date` DATETIME DEFAULT '2000-01-01 00:00:00' NOT NULL;
ALTER TABLE `classroom`.`crs_teacher` CHANGE `created_date` `created_date` DATETIME DEFAULT '2000-01-01 00:00:00' NOT NULL;
There are still several references in the code to '0000-00-00 00:00:00' like in
$fieldvalue == '0000-00-00 00:00:00'
in both sql and .inc files,
Will NULL values (and empty checks) be useful and how do earlier (Pre 5.6) MySQL DBs be managed?
Scripts that generate PHP pages too should be taken into account.
[Updated on: Sun, 16 April 2017 06:54] Report message to a moderator
|
|
|