Skip to content

Commit

Permalink
fix database error access can't be set to null
Browse files Browse the repository at this point in the history
  • Loading branch information
svanschu committed Apr 1, 2022
1 parent 2b45ed9 commit 50b0c13
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 8 deletions.
15 changes: 10 additions & 5 deletions administrator/components/com_schuweb_sitemap/schuweb_sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,19 @@
<description>SchuWeb Sitemap - Sitemap Generator for Joomla!</description>
<install folder="admin">
<sql>
<file driver="mysql" charset="utf8">install/install.utf8.sql</file>
<file driver="postgresql" charset="utf8">install/install.postgresql.sql</file>
<file driver="mysql" charset="utf8">sql/install.utf8.sql</file>
<file driver="postgresql" charset="utf8">sql/install.postgresql.sql</file>
</sql>
</install>
<update>
<schemas>
<schemapath type="mysql">sql/updates/mysql</schemapath>
</schemas>
</update>
<uninstall>
<sql>
<file driver="mysql" charset="utf8">install/uninstall.utf8.sql</file>
<file driver="postgresql" charset="utf8">install/uninstall.postgresql.sql</file>
<file driver="mysql" charset="utf8">sql/uninstall.utf8.sql</file>
<file driver="postgresql" charset="utf8">sql/uninstall.postgresql.sql</file>
</sql>
</uninstall>
<scriptfile>extension.script.php</scriptfile>
Expand Down Expand Up @@ -57,7 +62,7 @@
<folder>forms</folder>
<folder>helpers</folder>
<folder>images</folder>
<folder>install</folder>
<folder>sql</folder>
<folder>models</folder>
<folder>tables</folder>
<folder>views</folder>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ CREATE TABLE "#__schuweb_sitemap" (
"excluded_items" text DEFAULT NULL,
"is_default" integer DEFAULT 0,
"state" integer DEFAULT NULL,
"access" integer DEFAULT NULL,
"access" integer DEFAULT 0 NOT NULL,
"created" timestamp without time zone DEFAULT '1970-01-01 00:00:00' NOT NULL,
"count_xml" integer DEFAULT NULL,
"count_html" integer DEFAULT NULL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ CREATE TABLE IF NOT EXISTS `#__schuweb_sitemap` (
`excluded_items` text DEFAULT NULL,
`is_default` int(1) DEFAULT 0,
`state` int(2) DEFAULT NULL,
`access` int DEFAULT NULL,
`access` int unsigned DEFAULT 0 NOT NULL,
`created` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
`count_xml` int(11) DEFAULT NULL,
`count_html` int(11) DEFAULT NULL,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE `#__schuweb_sitemap` MODIFY `access` int unsigned DEFAULT 0 NOT NULL;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ALTER TABLE "#__schuweb_sitemap"
ALTER COLUMN "access" SET DEFAULT 0,
ALTER COLUMN "access" SET NOT NULL;
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@
// no direct access
defined('_JEXEC') or die;

use Joomla\CMS\Table\Table;
use Joomla\Utilities\ArrayHelper;

/**
* @package Joomla
* @subpackage com_schuweb_sitemap
* @since 2.0
*/
class SchuWeb_SitemapTableSitemap extends JTable
class SchuWeb_SitemapTableSitemap extends Table
{

/**
Expand Down

0 comments on commit 50b0c13

Please sign in to comment.