Skip to content

Commit

Permalink
database table #__extensions - Set enabled to 0 by default (#12753)
Browse files Browse the repository at this point in the history
* extension databasetable - set enabled to 0 by default

* database update for existing sites

* database update for mysql for existing sites
  • Loading branch information
pe7er authored and rdeutz committed Nov 15, 2016
1 parent af8fbde commit 20557af
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE `#__extensions` CHANGE `enabled` `enabled` TINYINT(3) NOT NULL DEFAULT '0';
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE "#__extensions" ALTER COLUMN "enabled" SET DEFAULT 0;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE [#__extensions] ALTER COLUMN [enabled] DEFAULT 0;
2 changes: 1 addition & 1 deletion installation/sql/mysql/joomla.sql
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ CREATE TABLE IF NOT EXISTS `#__extensions` (
`element` varchar(100) NOT NULL,
`folder` varchar(100) NOT NULL,
`client_id` tinyint(3) NOT NULL,
`enabled` tinyint(3) NOT NULL DEFAULT 1,
`enabled` tinyint(3) NOT NULL DEFAULT 0,
`access` int(10) unsigned NOT NULL DEFAULT 1,
`protected` tinyint(3) NOT NULL DEFAULT 0,
`manifest_cache` text NOT NULL,
Expand Down
2 changes: 1 addition & 1 deletion installation/sql/postgresql/joomla.sql
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ CREATE TABLE "#__extensions" (
"element" varchar(100) NOT NULL,
"folder" varchar(100) NOT NULL,
"client_id" smallint NOT NULL,
"enabled" smallint DEFAULT 1 NOT NULL,
"enabled" smallint DEFAULT 0 NOT NULL,
"access" bigint DEFAULT 1 NOT NULL,
"protected" smallint DEFAULT 0 NOT NULL,
"manifest_cache" text NOT NULL,
Expand Down
2 changes: 1 addition & 1 deletion installation/sql/sqlazure/joomla.sql
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ CREATE TABLE [#__extensions](
[element] [nvarchar](100) NOT NULL,
[folder] [nvarchar](100) NOT NULL,
[client_id] [smallint] NOT NULL,
[enabled] [smallint] NOT NULL DEFAULT 1,
[enabled] [smallint] NOT NULL DEFAULT 0,
[access] [int] NOT NULL DEFAULT 1,
[protected] [smallint] NOT NULL DEFAULT 0,
[manifest_cache] [nvarchar](max) NOT NULL,
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/schema/ddl.sql
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ CREATE TABLE `jos_extensions` (
`element` TEXT NOT NULL DEFAULT '',
`folder` TEXT NOT NULL DEFAULT '',
`client_id` INTEGER NOT NULL,
`enabled` INTEGER NOT NULL DEFAULT '1',
`enabled` INTEGER NOT NULL DEFAULT '0',
`access` INTEGER NOT NULL DEFAULT '1',
`protected` INTEGER NOT NULL DEFAULT '0',
`manifest_cache` TEXT NOT NULL DEFAULT '',
Expand Down

0 comments on commit 20557af

Please sign in to comment.