From aa725c0ccef96e6e71ca73088b76e7823af26f60 Mon Sep 17 00:00:00 2001 From: Nicola Galgano Date: Mon, 22 Apr 2019 11:04:05 +0200 Subject: [PATCH 01/17] use nullable for datetime fields --- installation/sql/mysql/joomla.sql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/installation/sql/mysql/joomla.sql b/installation/sql/mysql/joomla.sql index 65230edbe122e..6b1e4914a2462 100644 --- a/installation/sql/mysql/joomla.sql +++ b/installation/sql/mysql/joomla.sql @@ -283,7 +283,7 @@ CREATE TABLE IF NOT EXISTS `#__contact_details` ( `default_con` tinyint(1) unsigned NOT NULL DEFAULT 0, `published` tinyint(1) NOT NULL DEFAULT 0, `checked_out` int(10) unsigned NOT NULL DEFAULT 0, - `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `checked_out_time` datetime, `ordering` int(11) NOT NULL DEFAULT 0, `params` text NOT NULL, `user_id` int(11) NOT NULL DEFAULT 0, @@ -298,15 +298,15 @@ CREATE TABLE IF NOT EXISTS `#__contact_details` ( `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `created_by` int(10) unsigned NOT NULL DEFAULT 0, `created_by_alias` varchar(255) NOT NULL DEFAULT '', - `modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `modified` datetime, `modified_by` int(10) unsigned NOT NULL DEFAULT 0, `metakey` text NOT NULL, `metadesc` text NOT NULL, `metadata` text NOT NULL, `featured` tinyint(3) unsigned NOT NULL DEFAULT 0 COMMENT 'Set if contact is featured.', `xreference` varchar(50) NOT NULL DEFAULT '' COMMENT 'A reference to enable linkages to external data sets.', - `publish_up` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `publish_down` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `publish_up` datetime, + `publish_down` datetime, `version` int(10) unsigned NOT NULL DEFAULT 1, `hits` int(10) unsigned NOT NULL DEFAULT 0, PRIMARY KEY (`id`), From 84976de403c6ba69a7026d5b9ee440f27ba54d20 Mon Sep 17 00:00:00 2001 From: Nicola Galgano Date: Mon, 22 Apr 2019 11:07:21 +0200 Subject: [PATCH 02/17] use nullable for timestamp fields --- installation/sql/postgresql/joomla.sql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/installation/sql/postgresql/joomla.sql b/installation/sql/postgresql/joomla.sql index 5c681314516f5..bfc956106ead8 100644 --- a/installation/sql/postgresql/joomla.sql +++ b/installation/sql/postgresql/joomla.sql @@ -288,7 +288,7 @@ CREATE TABLE IF NOT EXISTS "#__contact_details" ( "default_con" smallint NOT NULL DEFAULT 0, "published" smallint NOT NULL DEFAULT 0, "checked_out" bigint NOT NULL DEFAULT 0, - "checked_out_time" timestamp without time zone NOT NULL DEFAULT '1970-01-01 00:00:00', + "checked_out_time" timestamp without time zone, "ordering" bigint NOT NULL DEFAULT 0, "params" text NOT NULL, "user_id" bigint NOT NULL DEFAULT 0, @@ -303,15 +303,15 @@ CREATE TABLE IF NOT EXISTS "#__contact_details" ( "created" timestamp without time zone NOT NULL DEFAULT '1970-01-01 00:00:00', "created_by" integer NOT NULL DEFAULT 0, "created_by_alias" varchar(255) NOT NULL DEFAULT '', - "modified" timestamp without time zone NOT NULL DEFAULT '1970-01-01 00:00:00', + "modified" timestamp without time zone, "modified_by" integer NOT NULL DEFAULT 0, "metakey" text NOT NULL, "metadesc" text NOT NULL, "metadata" text NOT NULL, "featured" smallint NOT NULL DEFAULT 0, "xreference" varchar(50) NOT NULL DEFAULT '', - "publish_up" timestamp without time zone NOT NULL DEFAULT '1970-01-01 00:00:00', - "publish_down" timestamp without time zone NOT NULL DEFAULT '1970-01-01 00:00:00', + "publish_up" timestamp without time zone, + "publish_down" timestamp without time zone, "version" bigint NOT NULL DEFAULT 1, "hits" bigint NOT NULL DEFAULT 0, PRIMARY KEY ("id") From 29973538dc0fe119aa90bbd24291c988e86fcb70 Mon Sep 17 00:00:00 2001 From: Nicola Galgano Date: Mon, 22 Apr 2019 11:10:03 +0200 Subject: [PATCH 03/17] nullable fields --- .../com_contact/Table/ContactTable.php | 38 +++++++++++-------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/administrator/components/com_contact/Table/ContactTable.php b/administrator/components/com_contact/Table/ContactTable.php index 64d7dee246efa..ed2cbf6a8cf4e 100644 --- a/administrator/components/com_contact/Table/ContactTable.php +++ b/administrator/components/com_contact/Table/ContactTable.php @@ -27,6 +27,15 @@ */ class ContactTable extends Table { + + /** + * Indicates that columns fully support the NULL value in the database + * + * @var boolean + * @since __DEPLOY_VERSION__ + */ + protected $_supportNullValue = true; + /** * Ensure the params and metadata in json encoded in the bind method * @@ -58,7 +67,7 @@ public function __construct(DatabaseDriver $db) * * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { // Transform the params field if (is_array($this->params)) @@ -91,18 +100,6 @@ public function store($updateNulls = false) } } - // Set publish_up to null date if not set - if (!$this->publish_up) - { - $this->publish_up = $this->_db->getNullDate(); - } - - // Set publish_down to null date if not set - if (!$this->publish_down) - { - $this->publish_down = $this->_db->getNullDate(); - } - // Set xreference to empty string if not set if (!$this->xreference) { @@ -253,9 +250,20 @@ public function check() $this->metadata = '{}'; } - if (empty($this->modified)) + // Set publish_up, publish_down, modified to null if not set + if (!$this->publish_up) + { + $this->publish_up = null; + } + + if (!$this->publish_down) + { + $this->publish_down = null; + } + + if (!$this->modified) { - $this->modified = $this->getDbo()->getNullDate(); + $this->modified = null; } return true; From 686f52be9a30b336a3905b72500362e846aa8a94 Mon Sep 17 00:00:00 2001 From: Nicola Galgano Date: Mon, 22 Apr 2019 11:13:23 +0200 Subject: [PATCH 04/17] nullable fields --- components/com_contact/Model/ContactModel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/com_contact/Model/ContactModel.php b/components/com_contact/Model/ContactModel.php index 01b459ead0a3b..5dd24f4ecbc47 100644 --- a/components/com_contact/Model/ContactModel.php +++ b/components/com_contact/Model/ContactModel.php @@ -215,8 +215,8 @@ public function getItem($pk = null) if (is_numeric($published)) { $query->where('(a.published = ' . (int) $published . ' OR a.published =' . (int) $archived . ')') - ->where('(a.publish_up = ' . $nullDate . ' OR a.publish_up <= ' . $nowDate . ')') - ->where('(a.publish_down = ' . $nullDate . ' OR a.publish_down >= ' . $nowDate . ')'); + ->where('(' . $query->isNullDatetime('a.publish_up') . ' OR a.publish_up <= ' . $db->quote($nowDate) . ')') + ->where('(' . $query->isNullDatetime('a.publish_down') . ' OR a.publish_down >= ' . $db->quote($nowDate) . ')'); } $db->setQuery($query); From abe4fa891a7da0348b03132bbf5ea19d9f891b70 Mon Sep 17 00:00:00 2001 From: Nicola Galgano Date: Mon, 22 Apr 2019 11:15:24 +0200 Subject: [PATCH 05/17] nullable fields --- components/com_contact/Model/CategoryModel.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/com_contact/Model/CategoryModel.php b/components/com_contact/Model/CategoryModel.php index bbfb193c941bd..83978df802513 100644 --- a/components/com_contact/Model/CategoryModel.php +++ b/components/com_contact/Model/CategoryModel.php @@ -179,9 +179,9 @@ protected function getListQuery() $nowDate = $db->quote(Factory::getDate()->toSql()); if ($this->getState('filter.publish_date')) - { - $query->where('(a.publish_up = ' . $nullDate . ' OR a.publish_up <= ' . $nowDate . ')') - ->where('(a.publish_down = ' . $nullDate . ' OR a.publish_down >= ' . $nowDate . ')'); + { + $query->where('(' . $query->isNullDatetime('a.publish_up') . ' OR a.publish_up <= ' . $db->quote($nowDate) . ')') + ->where('(' . $query->isNullDatetime('a.publish_down') . ' OR a.publish_down >= ' . $db->quote($nowDate) . ')'); } // Filter by search in title From ef9742f5146ad3c65f794f85068ed0188add2ce0 Mon Sep 17 00:00:00 2001 From: Nicola Galgano Date: Mon, 22 Apr 2019 11:28:22 +0200 Subject: [PATCH 06/17] blank line --- administrator/components/com_contact/Table/ContactTable.php | 1 - 1 file changed, 1 deletion(-) diff --git a/administrator/components/com_contact/Table/ContactTable.php b/administrator/components/com_contact/Table/ContactTable.php index ed2cbf6a8cf4e..453adb02cdc18 100644 --- a/administrator/components/com_contact/Table/ContactTable.php +++ b/administrator/components/com_contact/Table/ContactTable.php @@ -27,7 +27,6 @@ */ class ContactTable extends Table { - /** * Indicates that columns fully support the NULL value in the database * From 61d847d64d841a998cb3e4b44faa19edb40db844 Mon Sep 17 00:00:00 2001 From: Nicola Galgano Date: Mon, 22 Apr 2019 11:29:33 +0200 Subject: [PATCH 07/17] spaces removed --- components/com_contact/Model/CategoryModel.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/com_contact/Model/CategoryModel.php b/components/com_contact/Model/CategoryModel.php index 83978df802513..02e32764fdb83 100644 --- a/components/com_contact/Model/CategoryModel.php +++ b/components/com_contact/Model/CategoryModel.php @@ -179,7 +179,7 @@ protected function getListQuery() $nowDate = $db->quote(Factory::getDate()->toSql()); if ($this->getState('filter.publish_date')) - { + { $query->where('(' . $query->isNullDatetime('a.publish_up') . ' OR a.publish_up <= ' . $db->quote($nowDate) . ')') ->where('(' . $query->isNullDatetime('a.publish_down') . ' OR a.publish_down >= ' . $db->quote($nowDate) . ')'); } From a80f575569e7eea90e9c948e5d431e32483f8cb5 Mon Sep 17 00:00:00 2001 From: Nicola Galgano Date: Mon, 22 Apr 2019 11:36:22 +0200 Subject: [PATCH 08/17] sql update --- .../com_admin/sql/updates/mysql/4.0.0-2019-04-22.sql | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-04-22.sql diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-04-22.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-04-22.sql new file mode 100644 index 0000000000000..fc1306b2df455 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-04-22.sql @@ -0,0 +1,11 @@ +ALTER TABLE `#__contact_details` MODIFY `publish_up` datetime NULL DEFAULT NULL; +ALTER TABLE `#__contact_details` MODIFY `publish_down` datetime NULL DEFAULT NULL; +ALTER TABLE `#__contact_details` MODIFY `checked_out_time` datetime NULL DEFAULT NULL; +ALTER TABLE `#__contact_details` MODIFY `modified` datetime NULL DEFAULT NULL; + + +UPDATE `#__contact_details` SET + `publish_up` = CASE WHEN `publish_up` IN ('0000-00-00 00:00:00', '1000-01-01 00:00:00') THEN NULL ELSE `publish_up` END, + `publish_down` = CASE WHEN `publish_down` IN ('0000-00-00 00:00:00', '1000-01-01 00:00:00') THEN NULL ELSE `publish_down` END, + `checked_out_time` = CASE WHEN `checked_out_time` IN ('0000-00-00 00:00:00', '1000-01-01 00:00:00') THEN NULL ELSE `checked_out_time` END, + `modified` = CASE WHEN `modified` IN ('0000-00-00 00:00:00', '1000-01-01 00:00:00') THEN NULL ELSE `modified` END; From 404733d4aef0f70dd6917807a4598be4c8d05ce5 Mon Sep 17 00:00:00 2001 From: Nicola Galgano Date: Mon, 22 Apr 2019 11:42:24 +0200 Subject: [PATCH 09/17] sql updates --- .../sql/updates/postgresql/4.0.0-2019-04-22.sql | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-04-22.sql diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-04-22.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-04-22.sql new file mode 100644 index 0000000000000..70c959029ea35 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-04-22.sql @@ -0,0 +1,17 @@ +ALTER TABLE "#__contact_details" ALTER COLUMN "publish_up" DROP NOT NULL; +ALTER TABLE "#__contact_details" ALTER COLUMN "publish_up" DROP DEFAULT; + +ALTER TABLE "#__contact_details" ALTER COLUMN "publish_down" DROP NOT NULL; +ALTER TABLE "#__contact_details" ALTER COLUMN "publish_down" DROP DEFAULT; + +ALTER TABLE "#__contact_details" ALTER COLUMN "checked_out_time" DROP NOT NULL; +ALTER TABLE "#__contact_details" ALTER COLUMN "checked_out_time" DROP DEFAULT; + +ALTER TABLE "#__contact_details" ALTER COLUMN "modified" DROP NOT NULL; +ALTER TABLE "#__contact_details" ALTER COLUMN "modified" DROP DEFAULT; + +UPDATE "#__contact_details" SET + "publish_up" = CASE WHEN "publish_up" = '1970-01-01 00:00:00' THEN NULL ELSE "publish_up" END, + "publish_down" = CASE WHEN "publish_down" = '1970-01-01 00:00:00' THEN NULL ELSE "publish_down" END, + "checked_out_time" = CASE WHEN "checked_out_time" = '1970-01-01 00:00:00' THEN NULL ELSE "checked_out_time" END, + "modified" = CASE WHEN "modified" = '1970-01-01 00:00:00' THEN NULL ELSE "modified" END; From e42342e1eac32360a37597cfb4dc3846f3b69eb4 Mon Sep 17 00:00:00 2001 From: Nicola Galgano Date: Mon, 22 Apr 2019 11:57:53 +0200 Subject: [PATCH 10/17] featured --- components/com_contact/Model/FeaturedModel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/com_contact/Model/FeaturedModel.php b/components/com_contact/Model/FeaturedModel.php index 1a2148f228edb..1368557428f4e 100644 --- a/components/com_contact/Model/FeaturedModel.php +++ b/components/com_contact/Model/FeaturedModel.php @@ -118,8 +118,8 @@ protected function getListQuery() $date = Factory::getDate(); $nowDate = $db->quote($date->toSql()); - $query->where('(a.publish_up = ' . $nullDate . ' OR a.publish_up <= ' . $nowDate . ')') - ->where('(a.publish_down = ' . $nullDate . ' OR a.publish_down >= ' . $nowDate . ')'); + $query->where('(' . $query->isNullDatetime('a.publish_up') . ' OR a.publish_up <= ' . $db->quote($nowDate) . ')') + ->where('(' . $query->isNullDatetime('a.publish_down') . ' OR a.publish_down >= ' . $db->quote($nowDate). ')'); } // Filter by language From 44b90c5a7778dba24f249b8dba0d4f4ac6db08d7 Mon Sep 17 00:00:00 2001 From: Nicola Galgano Date: Mon, 22 Apr 2019 12:35:58 +0200 Subject: [PATCH 11/17] cs --- components/com_contact/Model/FeaturedModel.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/com_contact/Model/FeaturedModel.php b/components/com_contact/Model/FeaturedModel.php index 1368557428f4e..96c4129265070 100644 --- a/components/com_contact/Model/FeaturedModel.php +++ b/components/com_contact/Model/FeaturedModel.php @@ -119,7 +119,7 @@ protected function getListQuery() $nowDate = $db->quote($date->toSql()); $query->where('(' . $query->isNullDatetime('a.publish_up') . ' OR a.publish_up <= ' . $db->quote($nowDate) . ')') - ->where('(' . $query->isNullDatetime('a.publish_down') . ' OR a.publish_down >= ' . $db->quote($nowDate). ')'); + ->where('(' . $query->isNullDatetime('a.publish_down') . ' OR a.publish_down >= ' . $db->quote($nowDate) . ')'); } // Filter by language From 05d069609ce2dd1ad75798fce88e9fe24817ef02 Mon Sep 17 00:00:00 2001 From: Nicola Galgano Date: Tue, 7 May 2019 20:44:20 +0200 Subject: [PATCH 12/17] modified is not nullable --- .../com_admin/sql/updates/mysql/4.0.0-2019-04-22.sql | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-04-22.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-04-22.sql index fc1306b2df455..9459c3d8abaaa 100644 --- a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-04-22.sql +++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-04-22.sql @@ -1,11 +1,8 @@ ALTER TABLE `#__contact_details` MODIFY `publish_up` datetime NULL DEFAULT NULL; ALTER TABLE `#__contact_details` MODIFY `publish_down` datetime NULL DEFAULT NULL; ALTER TABLE `#__contact_details` MODIFY `checked_out_time` datetime NULL DEFAULT NULL; -ALTER TABLE `#__contact_details` MODIFY `modified` datetime NULL DEFAULT NULL; - UPDATE `#__contact_details` SET `publish_up` = CASE WHEN `publish_up` IN ('0000-00-00 00:00:00', '1000-01-01 00:00:00') THEN NULL ELSE `publish_up` END, `publish_down` = CASE WHEN `publish_down` IN ('0000-00-00 00:00:00', '1000-01-01 00:00:00') THEN NULL ELSE `publish_down` END, - `checked_out_time` = CASE WHEN `checked_out_time` IN ('0000-00-00 00:00:00', '1000-01-01 00:00:00') THEN NULL ELSE `checked_out_time` END, - `modified` = CASE WHEN `modified` IN ('0000-00-00 00:00:00', '1000-01-01 00:00:00') THEN NULL ELSE `modified` END; + `checked_out_time` = CASE WHEN `checked_out_time` IN ('0000-00-00 00:00:00', '1000-01-01 00:00:00') THEN NULL ELSE `checked_out_time` END; From fb77ab387f0aa707b874a691a03031116ed2dd4f Mon Sep 17 00:00:00 2001 From: Nicola Galgano Date: Tue, 7 May 2019 20:45:17 +0200 Subject: [PATCH 13/17] modifyed is not nullable --- .../com_admin/sql/updates/postgresql/4.0.0-2019-04-22.sql | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-04-22.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-04-22.sql index 70c959029ea35..32d91acc14636 100644 --- a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-04-22.sql +++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-04-22.sql @@ -7,11 +7,7 @@ ALTER TABLE "#__contact_details" ALTER COLUMN "publish_down" DROP DEFAULT; ALTER TABLE "#__contact_details" ALTER COLUMN "checked_out_time" DROP NOT NULL; ALTER TABLE "#__contact_details" ALTER COLUMN "checked_out_time" DROP DEFAULT; -ALTER TABLE "#__contact_details" ALTER COLUMN "modified" DROP NOT NULL; -ALTER TABLE "#__contact_details" ALTER COLUMN "modified" DROP DEFAULT; - UPDATE "#__contact_details" SET "publish_up" = CASE WHEN "publish_up" = '1970-01-01 00:00:00' THEN NULL ELSE "publish_up" END, "publish_down" = CASE WHEN "publish_down" = '1970-01-01 00:00:00' THEN NULL ELSE "publish_down" END, - "checked_out_time" = CASE WHEN "checked_out_time" = '1970-01-01 00:00:00' THEN NULL ELSE "checked_out_time" END, - "modified" = CASE WHEN "modified" = '1970-01-01 00:00:00' THEN NULL ELSE "modified" END; + "checked_out_time" = CASE WHEN "checked_out_time" = '1970-01-01 00:00:00' THEN NULL ELSE "checked_out_time" END; From 0c173d9b3749bf043cc35c34cd694cb8cfca03f9 Mon Sep 17 00:00:00 2001 From: Nicola Galgano Date: Tue, 7 May 2019 20:46:47 +0200 Subject: [PATCH 14/17] modified is not nullable --- administrator/components/com_contact/Table/ContactTable.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/administrator/components/com_contact/Table/ContactTable.php b/administrator/components/com_contact/Table/ContactTable.php index 453adb02cdc18..d6d60a300c071 100644 --- a/administrator/components/com_contact/Table/ContactTable.php +++ b/administrator/components/com_contact/Table/ContactTable.php @@ -262,7 +262,7 @@ public function check() if (!$this->modified) { - $this->modified = null; + $this->modified = $this->created; } return true; From a39380f5fc88860830d287b2ee72cd0ad016303e Mon Sep 17 00:00:00 2001 From: Nicola Galgano Date: Tue, 7 May 2019 20:48:26 +0200 Subject: [PATCH 15/17] modified is not nullable --- installation/sql/mysql/joomla.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installation/sql/mysql/joomla.sql b/installation/sql/mysql/joomla.sql index 6b1e4914a2462..5f1754382ec53 100644 --- a/installation/sql/mysql/joomla.sql +++ b/installation/sql/mysql/joomla.sql @@ -298,7 +298,7 @@ CREATE TABLE IF NOT EXISTS `#__contact_details` ( `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `created_by` int(10) unsigned NOT NULL DEFAULT 0, `created_by_alias` varchar(255) NOT NULL DEFAULT '', - `modified` datetime, + `modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `modified_by` int(10) unsigned NOT NULL DEFAULT 0, `metakey` text NOT NULL, `metadesc` text NOT NULL, From b8b49a1f07dd316caba13dc418d93c787cb7b560 Mon Sep 17 00:00:00 2001 From: Nicola Galgano Date: Tue, 7 May 2019 20:50:26 +0200 Subject: [PATCH 16/17] modified is not nullable --- installation/sql/postgresql/joomla.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installation/sql/postgresql/joomla.sql b/installation/sql/postgresql/joomla.sql index bfc956106ead8..3ce2e8d3802ef 100644 --- a/installation/sql/postgresql/joomla.sql +++ b/installation/sql/postgresql/joomla.sql @@ -303,7 +303,7 @@ CREATE TABLE IF NOT EXISTS "#__contact_details" ( "created" timestamp without time zone NOT NULL DEFAULT '1970-01-01 00:00:00', "created_by" integer NOT NULL DEFAULT 0, "created_by_alias" varchar(255) NOT NULL DEFAULT '', - "modified" timestamp without time zone, + "modified" timestamp without time zone NOT NULL DEFAULT '1970-01-01 00:00:00', "modified_by" integer NOT NULL DEFAULT 0, "metakey" text NOT NULL, "metadesc" text NOT NULL, From c5ae1414988e75d38a55493ed595e272d17a0317 Mon Sep 17 00:00:00 2001 From: Quy Date: Tue, 7 May 2019 21:29:41 +0200 Subject: [PATCH 17/17] Update administrator/components/com_contact/Table/ContactTable.php Co-Authored-By: alikon --- administrator/components/com_contact/Table/ContactTable.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/administrator/components/com_contact/Table/ContactTable.php b/administrator/components/com_contact/Table/ContactTable.php index d6d60a300c071..04f53ce83dc45 100644 --- a/administrator/components/com_contact/Table/ContactTable.php +++ b/administrator/components/com_contact/Table/ContactTable.php @@ -249,7 +249,7 @@ public function check() $this->metadata = '{}'; } - // Set publish_up, publish_down, modified to null if not set + // Set publish_up, publish_down to null if not set if (!$this->publish_up) { $this->publish_up = null;