forked from joomla/joomla-cms
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from richard67/4.0-dev-bugfix-datetime-columns…
…-mod-4 Handle UCM content and not nullable datetime columns, too, and do other fixes from code reviews
- Loading branch information
Showing
10 changed files
with
91 additions
and
29 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-08-01.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
ALTER TABLE `#__ucm_content` MODIFY `core_created_time` datetime NOT NULL; | ||
ALTER TABLE `#__ucm_content` MODIFY `core_modified_time` datetime NOT NULL; | ||
|
||
ALTER TABLE `#__ucm_content` MODIFY `core_publish_up` datetime NULL DEFAULT NULL; | ||
ALTER TABLE `#__ucm_content` MODIFY `core_publish_down` datetime NULL DEFAULT NULL; | ||
ALTER TABLE `#__ucm_content` MODIFY `core_checked_out_time` datetime NULL DEFAULT NULL; | ||
|
||
ALTER TABLE `#__ucm_history` MODIFY `save_date` datetime NOT NULL; |
19 changes: 19 additions & 0 deletions
19
administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-09-14.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,26 @@ | ||
ALTER TABLE `#__content` MODIFY `created` datetime NOT NULL; | ||
ALTER TABLE `#__content` MODIFY `modified` datetime NOT NULL; | ||
|
||
ALTER TABLE `#__content` MODIFY `publish_up` datetime NULL DEFAULT NULL; | ||
ALTER TABLE `#__content` MODIFY `publish_down` datetime NULL DEFAULT NULL; | ||
ALTER TABLE `#__content` MODIFY `checked_out_time` datetime NULL DEFAULT NULL; | ||
|
||
UPDATE `#__content` SET `modified` = `created` WHERE `modified` = '0000-00-00 00:00:00'; | ||
|
||
UPDATE `#__content` SET `publish_up` = NULL WHERE `publish_up` = '0000-00-00 00:00:00'; | ||
UPDATE `#__content` SET `publish_down` = NULL WHERE `publish_down` = '0000-00-00 00:00:00'; | ||
UPDATE `#__content` SET `checked_out_time` = NULL WHERE `checked_out_time` = '0000-00-00 00:00:00'; | ||
|
||
UPDATE `#__ucm_content` SET `core_modified_time` = `core_created_time` | ||
WHERE `core_type_alias` = 'com_content.article' | ||
AND `core_modified_time` = '0000-00-00 00:00:00'; | ||
|
||
UPDATE `#__ucm_content` SET `core_publish_up` = NULL | ||
WHERE `core_type_alias` = 'com_content.article' | ||
AND `core_publish_up` = '0000-00-00 00:00:00'; | ||
UPDATE `#__ucm_content` SET `core_publish_down` = NULL | ||
WHERE `core_type_alias` = 'com_content.article' | ||
AND `core_publish_down` = '0000-00-00 00:00:00'; | ||
UPDATE `#__ucm_content` SET `core_checked_out_time` = NULL | ||
WHERE `core_type_alias` = 'com_content.article' | ||
AND `core_checked_out_time` = '0000-00-00 00:00:00'; |
14 changes: 14 additions & 0 deletions
14
administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-08-01.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
ALTER TABLE "#__ucm_content" ALTER COLUMN "core_created_time" DROP DEFAULT; | ||
|
||
ALTER TABLE "#__ucm_content" ALTER COLUMN "core_modified_time" DROP DEFAULT; | ||
|
||
ALTER TABLE "#__ucm_content" ALTER COLUMN "core_publish_up" DROP NOT NULL; | ||
ALTER TABLE "#__ucm_content" ALTER COLUMN "core_publish_up" DROP DEFAULT; | ||
|
||
ALTER TABLE "#__ucm_content" ALTER COLUMN "core_publish_down" DROP NOT NULL; | ||
ALTER TABLE "#__ucm_content" ALTER COLUMN "core_publish_down" DROP DEFAULT; | ||
|
||
ALTER TABLE "#__ucm_content" ALTER COLUMN "core_checked_out_time" DROP NOT NULL; | ||
ALTER TABLE "#__ucm_content" ALTER COLUMN "core_checked_out_time" DROP DEFAULT; | ||
|
||
ALTER TABLE "#__ucm_history" ALTER COLUMN "save_date" DROP DEFAULT; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters