From ec5a751fb4d7660148d45393bca454201925df6e Mon Sep 17 00:00:00 2001 From: Nicola Galgano Date: Mon, 31 Oct 2016 15:02:29 +0100 Subject: [PATCH 01/20] MSSQL - update sql for Custom fields (#11833) MSSQL - update sql for Custom fields (#11833) --- .../com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql diff --git a/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql new file mode 100644 index 0000000000000..9adb5056eaa9b --- /dev/null +++ b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql @@ -0,0 +1 @@ +/****** Object:  Table [#__fields] ******/SET QUOTED_IDENTIFIER ON;CREATE TABLE [#__fields]( [id] [int] IDENTITY(1,1) NOT NULL, [asset_id] [int] NOT NULL DEFAULT 0, [context] [nvarchar](255) NOT NULL DEFAULT '', [catid] [int] NOT NULL DEFAULT 0, [assigned_cat_ids] [nvarchar](255) NOT NULL DEFAULT '', [title] [nvarchar](255) NOT NULL DEFAULT '', [alias] [nvarchar](255) NOT NULL DEFAULT '', [label] [nvarchar](255) NOT NULL DEFAULT '', [default_value] [nvarchar](max) NOT NULL, [type] [nvarchar](255) NOT NULL DEFAULT '', [options] [nvarchar](255) NOT NULL DEFAULT '', [note] [nvarchar](255) NOT NULL DEFAULT '', [description] [nvarchar](max) NOT NULL, [state] [smallint] NOT NULL DEFAULT 0, [required] [smallint] NOT NULL DEFAULT 0, [checked_out] [bigint] NOT NULL DEFAULT 0, [checked_out_time] [datetime] NOT NULL DEFAULT '1900-01-01 00:00:00', [ordering] [int] NOT NULL DEFAULT 0, [params] [nvarchar](max) NOT NULL, [fieldparams] [nvarchar](max) NOT NULL, [attributes] [nvarchar](max) NOT NULL, [language] [nvarchar](7) NOT NULL DEFAULT '', [created_time] [datetime] NOT NULL DEFAULT '1900-01-01T00:00:00.000', [created_user_id] [bigint] NOT NULL DEFAULT 0, [created_by_alias] [nvarchar](255) NOT NULL DEFAULT '', [version] [bigint] NOT NULL DEFAULT 1, [modified_time] [datetime] NOT NULL DEFAULT '1900-01-01T00:00:00.000', [modified_by] [bigint] NOT NULL DEFAULT 0, [publish_up] [datetime] NOT NULL DEFAULT '1900-01-01T00:00:00.000', [publish_down] [datetime] NOT NULL DEFAULT '1900-01-01T00:00:00.000', [access] [int] NOT NULL DEFAULT 1, [hits] [bigint] NOT NULL DEFAULT 0,CONSTRAINT [PK_#__fields_id] PRIMARY KEY CLUSTERED( [id] ASC)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]) ON [PRIMARY];CREATE NONCLUSTERED INDEX [idx_checkout] ON [#__fields]( [checked_out] ASC)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF);CREATE NONCLUSTERED INDEX [idx_state] ON [#__fields]( [state] ASC)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF);CREATE NONCLUSTERED INDEX [idx_access] ON [#__fields]( [access] ASC)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF);CREATE NONCLUSTERED INDEX [idx_context] ON [#__fields]( [context] ASC)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF);CREATE NONCLUSTERED INDEX [idx_language] ON [#__fields]( [language] ASC)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF);/****** Object:  Table [#__fields_values] ******/SET QUOTED_IDENTIFIER ON;CREATE TABLE [#__fields_values]( [field_id] [bigint] NOT NULL DEFAULT 1, [context] [nvarchar](255) NOT NULL DEFAULT '', [item_id] [nvarchar](255) NOT NULL DEFAULT '', [value] [nvarchar](max) NOT NULL DEFAULT '',) ON [PRIMARY];CREATE NONCLUSTERED INDEX [idx_field_id] ON [#__fields_values]( [field_id] ASC)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF);CREATE NONCLUSTERED INDEX [idx_context] ON [#__fields_values]( [context] ASC)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF);CREATE NONCLUSTERED INDEX [idx_item_id] ON [#__fields_values]( [item_id] ASC)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF);SET IDENTITY_INSERT [#__extensions]  ON;    INSERT INTO [#__extensions] ([extension_id], [name], [type], [element], [folder], [client_id], [enabled], [access], [protected], [manifest_cache], [params], [custom_data], [system_data], [checked_out], [checked_out_time], [ordering], [state])  SELECT 33, 'com_fields', 'component', 'com_fields', '', 1, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0;  INSERT INTO [#__extensions] ([extension_id], [name], [type], [element], [folder], [client_id], [enabled], [access], [protected], [manifest_cache], [params], [custom_data], [system_data], [checked_out], [checked_out_time], [ordering], [state])  SELECT 461, 'plg_system_fields', 'plugin', 'fields', 'system', 0, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0;  INSERT INTO [#__extensions] ([extension_id], [name], [type], [element], [folder], [client_id], [enabled], [access], [protected], [manifest_cache], [params], [custom_data], [system_data], [checked_out], [checked_out_time], [ordering], [state])  SELECT 462, 'plg_fields_gallery', 'plugin', 'gallery', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0;   SET IDENTITY_INSERT [#__extensions]  OFF; From 47cb0d4eeede523c923f43af3173786895fd6bd6 Mon Sep 17 00:00:00 2001 From: Nicola Galgano Date: Mon, 31 Oct 2016 20:17:35 +0100 Subject: [PATCH 02/20] MSSQL - update sql for Custom fields (#11833) MSSQL - update sql for Custom fields (#11833) --- .../sql/updates/sqlazure/3.7.0-2016-08-29.sql | 93 ++++++++++++++++++- 1 file changed, 92 insertions(+), 1 deletion(-) diff --git a/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql index 9adb5056eaa9b..04f168f6ff0ab 100644 --- a/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql +++ b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql @@ -1 +1,92 @@ -/****** Object:  Table [#__fields] ******/SET QUOTED_IDENTIFIER ON;CREATE TABLE [#__fields]( [id] [int] IDENTITY(1,1) NOT NULL, [asset_id] [int] NOT NULL DEFAULT 0, [context] [nvarchar](255) NOT NULL DEFAULT '', [catid] [int] NOT NULL DEFAULT 0, [assigned_cat_ids] [nvarchar](255) NOT NULL DEFAULT '', [title] [nvarchar](255) NOT NULL DEFAULT '', [alias] [nvarchar](255) NOT NULL DEFAULT '', [label] [nvarchar](255) NOT NULL DEFAULT '', [default_value] [nvarchar](max) NOT NULL, [type] [nvarchar](255) NOT NULL DEFAULT '', [options] [nvarchar](255) NOT NULL DEFAULT '', [note] [nvarchar](255) NOT NULL DEFAULT '', [description] [nvarchar](max) NOT NULL, [state] [smallint] NOT NULL DEFAULT 0, [required] [smallint] NOT NULL DEFAULT 0, [checked_out] [bigint] NOT NULL DEFAULT 0, [checked_out_time] [datetime] NOT NULL DEFAULT '1900-01-01 00:00:00', [ordering] [int] NOT NULL DEFAULT 0, [params] [nvarchar](max) NOT NULL, [fieldparams] [nvarchar](max) NOT NULL, [attributes] [nvarchar](max) NOT NULL, [language] [nvarchar](7) NOT NULL DEFAULT '', [created_time] [datetime] NOT NULL DEFAULT '1900-01-01T00:00:00.000', [created_user_id] [bigint] NOT NULL DEFAULT 0, [created_by_alias] [nvarchar](255) NOT NULL DEFAULT '', [version] [bigint] NOT NULL DEFAULT 1, [modified_time] [datetime] NOT NULL DEFAULT '1900-01-01T00:00:00.000', [modified_by] [bigint] NOT NULL DEFAULT 0, [publish_up] [datetime] NOT NULL DEFAULT '1900-01-01T00:00:00.000', [publish_down] [datetime] NOT NULL DEFAULT '1900-01-01T00:00:00.000', [access] [int] NOT NULL DEFAULT 1, [hits] [bigint] NOT NULL DEFAULT 0,CONSTRAINT [PK_#__fields_id] PRIMARY KEY CLUSTERED( [id] ASC)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]) ON [PRIMARY];CREATE NONCLUSTERED INDEX [idx_checkout] ON [#__fields]( [checked_out] ASC)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF);CREATE NONCLUSTERED INDEX [idx_state] ON [#__fields]( [state] ASC)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF);CREATE NONCLUSTERED INDEX [idx_access] ON [#__fields]( [access] ASC)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF);CREATE NONCLUSTERED INDEX [idx_context] ON [#__fields]( [context] ASC)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF);CREATE NONCLUSTERED INDEX [idx_language] ON [#__fields]( [language] ASC)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF);/****** Object:  Table [#__fields_values] ******/SET QUOTED_IDENTIFIER ON;CREATE TABLE [#__fields_values]( [field_id] [bigint] NOT NULL DEFAULT 1, [context] [nvarchar](255) NOT NULL DEFAULT '', [item_id] [nvarchar](255) NOT NULL DEFAULT '', [value] [nvarchar](max) NOT NULL DEFAULT '',) ON [PRIMARY];CREATE NONCLUSTERED INDEX [idx_field_id] ON [#__fields_values]( [field_id] ASC)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF);CREATE NONCLUSTERED INDEX [idx_context] ON [#__fields_values]( [context] ASC)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF);CREATE NONCLUSTERED INDEX [idx_item_id] ON [#__fields_values]( [item_id] ASC)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF);SET IDENTITY_INSERT [#__extensions]  ON;    INSERT INTO [#__extensions] ([extension_id], [name], [type], [element], [folder], [client_id], [enabled], [access], [protected], [manifest_cache], [params], [custom_data], [system_data], [checked_out], [checked_out_time], [ordering], [state])  SELECT 33, 'com_fields', 'component', 'com_fields', '', 1, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0;  INSERT INTO [#__extensions] ([extension_id], [name], [type], [element], [folder], [client_id], [enabled], [access], [protected], [manifest_cache], [params], [custom_data], [system_data], [checked_out], [checked_out_time], [ordering], [state])  SELECT 461, 'plg_system_fields', 'plugin', 'fields', 'system', 0, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0;  INSERT INTO [#__extensions] ([extension_id], [name], [type], [element], [folder], [client_id], [enabled], [access], [protected], [manifest_cache], [params], [custom_data], [system_data], [checked_out], [checked_out_time], [ordering], [state])  SELECT 462, 'plg_fields_gallery', 'plugin', 'gallery', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0;   SET IDENTITY_INSERT [#__extensions]  OFF; +/****** Object:  Table [#__fields] ******/ + +SET QUOTED_IDENTIFIER ON; + +CREATE TABLE [#__fields]( + [id] [int] IDENTITY(1,1) NOT NULL, + [asset_id] [int] NOT NULL DEFAULT 0, + [context] [nvarchar](255) NOT NULL DEFAULT '', + [catid] [int] NOT NULL DEFAULT 0, + [assigned_cat_ids] [nvarchar](255) NOT NULL DEFAULT '', + [title] [nvarchar](255) NOT NULL DEFAULT '', + [alias] [nvarchar](255) NOT NULL DEFAULT '', + [label] [nvarchar](255) NOT NULL DEFAULT '', + [default_value] [nvarchar](max) NOT NULL, + [type] [nvarchar](255) NOT NULL DEFAULT '', + [options] [nvarchar](255) NOT NULL DEFAULT '', + [note] [nvarchar](255) NOT NULL DEFAULT '', + [description] [nvarchar](max) NOT NULL, + [state] [smallint] NOT NULL DEFAULT 0, + [required] [smallint] NOT NULL DEFAULT 0, + [checked_out] [bigint] NOT NULL DEFAULT 0, + [checked_out_time] [datetime] NOT NULL DEFAULT '1900-01-01 00:00:00', + [ordering] [int] NOT NULL DEFAULT 0, + [params] [nvarchar](max) NOT NULL, + [fieldparams] [nvarchar](max) NOT NULL, + [attributes] [nvarchar](max) NOT NULL, + [language] [nvarchar](7) NOT NULL DEFAULT '', + [created_time] [datetime] NOT NULL DEFAULT '1900-01-01T00:00:00.000', + [created_user_id] [bigint] NOT NULL DEFAULT 0, + [created_by_alias] [nvarchar](255) NOT NULL DEFAULT '', + [version] [bigint] NOT NULL DEFAULT 1, + [modified_time] [datetime] NOT NULL DEFAULT '1900-01-01T00:00:00.000', + [modified_by] [bigint] NOT NULL DEFAULT 0, + [publish_up] [datetime] NOT NULL DEFAULT '1900-01-01T00:00:00.000', + [publish_down] [datetime] NOT NULL DEFAULT '1900-01-01T00:00:00.000', + [access] [int] NOT NULL DEFAULT 1, [hits] [bigint] NOT NULL DEFAULT 0, +CONSTRAINT [PK_#__fields_id] PRIMARY KEY CLUSTERED( + [id] ASC) +WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON +) ON [PRIMARY]) ON [PRIMARY]; + +CREATE NONCLUSTERED INDEX [idx_checkout] ON [#__fields]( + [checked_out] ASC) +WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +CREATE NONCLUSTERED INDEX [idx_state] ON [#__fields]( + [state] ASC) +WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +CREATE NONCLUSTERED INDEX [idx_access] ON [#__fields]( + [access] ASC) +WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +CREATE NONCLUSTERED INDEX [idx_context] ON [#__fields]( + [context] ASC) +WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +CREATE NONCLUSTERED INDEX [idx_language] ON [#__fields]( + [language] ASC) +WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +/****** Object:  Table [#__fields_values] ******/ + +SET QUOTED_IDENTIFIER ON; + +CREATE TABLE [#__fields_values]( + [field_id] [bigint] NOT NULL DEFAULT 1, + [context] [nvarchar](255) NOT NULL DEFAULT '', + [item_id] [nvarchar](255) NOT NULL DEFAULT '', + [value] [nvarchar](max) NOT NULL DEFAULT '', +) ON [PRIMARY]; + +CREATE NONCLUSTERED INDEX [idx_field_id] ON [#__fields_values]( + [field_id] ASC) +WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +CREATE NONCLUSTERED INDEX [idx_context] ON [#__fields_values]( + [context] ASC) +WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +CREATE NONCLUSTERED INDEX [idx_item_id] ON [#__fields_values]( + [item_id] ASC) +WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +SET IDENTITY_INSERT [#__extensions] ON; + INSERT INTO [#__extensions] ([extension_id], [name], [type], [element], [folder], [client_id], [enabled], [access], [protected], [manifest_cache], [params], [custom_data], [system_data], [checked_out], [checked_out_time], [ordering], [state]) + SELECT 33, 'com_fields', 'component', 'com_fields', '', 1, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0; + INSERT INTO [#__extensions] ([extension_id], [name], [type], [element], [folder], [client_id], [enabled], [access], [protected], [manifest_cache], [params], [custom_data], [system_data], [checked_out], [checked_out_time], [ordering], [state]) + SELECT 461, 'plg_system_fields', 'plugin', 'fields', 'system', 0, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0; + INSERT INTO [#__extensions] ([extension_id], [name], [type], [element], [folder], [client_id], [enabled], [access], [protected], [manifest_cache], [params], [custom_data], [system_data], [checked_out], [checked_out_time], [ordering], [state]) + SELECT 462, 'plg_fields_gallery', 'plugin', 'gallery', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0; +SET IDENTITY_INSERT [#__extensions]  OFF; From 4ae5c4a866d176f7035a50a3b6aad40e2f096c99 Mon Sep 17 00:00:00 2001 From: Nicola Galgano Date: Mon, 31 Oct 2016 20:29:01 +0100 Subject: [PATCH 03/20] MSSQL - install sql for Custom fields (#11833) MSSQL - install sql for Custom fields (#11833) --- installation/sql/sqlazure/joomla.sql | 94 +++++++++++++++++++++++++++- 1 file changed, 92 insertions(+), 2 deletions(-) diff --git a/installation/sql/sqlazure/joomla.sql b/installation/sql/sqlazure/joomla.sql index 336a90f8d0a8c..c03ed24113092 100644 --- a/installation/sql/sqlazure/joomla.sql +++ b/installation/sql/sqlazure/joomla.sql @@ -802,7 +802,9 @@ SELECT 30, 'com_contenthistory', 'component', 'com_contenthistory', '', 1, 1, 1, UNION ALL SELECT 31, 'com_ajax', 'component', 'com_ajax', '', 1, 1, 1, 1, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0 UNION ALL -SELECT 32, 'com_postinstall', 'component', 'com_postinstall', '', 1, 1, 1, 1, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0; +SELECT 32, 'com_postinstall', 'component', 'com_postinstall', '', 1, 1, 1, 1, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0 +UNION ALL +SELECT 33, 'com_fields', 'component', 'com_fields', '', 1, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0; -- Libraries INSERT INTO [#__extensions] ([extension_id], [name], [type], [element], [folder], [client_id], [enabled], [access], [protected], [manifest_cache], [params], [custom_data], [system_data], [checked_out], [checked_out_time], [ordering], [state]) @@ -1016,7 +1018,11 @@ SELECT 458, 'plg_quickicon_phpversioncheck', 'plugin', 'phpversioncheck', 'quick UNION ALL SELECT 459, 'plg_editors-xtd_menu', 'plugin', 'menu', 'editors-xtd', 0, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0 UNION ALL -SELECT 460, 'plg_editors-xtd_contact', 'plugin', 'contact', 'editors-xtd', 0, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0; +SELECT 460, 'plg_editors-xtd_contact', 'plugin', 'contact', 'editors-xtd', 0, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0 +UNION ALL +SELECT 461, 'plg_system_fields', 'plugin', 'fields', 'system', 0, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0 +UNION ALL +SELECT 462, 'plg_fields_gallery', 'plugin', 'gallery', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0; -- Templates INSERT INTO [#__extensions] ([extension_id], [name], [type], [element], [folder], [client_id], [enabled], [access], [protected], [manifest_cache], [params], [custom_data], [system_data], [checked_out], [checked_out_time], [ordering], [state]) @@ -1044,6 +1050,90 @@ SELECT 802, 'English (en-GB) Language Pack', 'package', 'pkg_en-GB', '', 0, 1, 1 SET IDENTITY_INSERT [#__extensions] OFF; +/****** Object:  Table [#__fields] ******/ + +SET QUOTED_IDENTIFIER ON; + +CREATE TABLE [#__fields]( + [id] [int] IDENTITY(1,1) NOT NULL, + [asset_id] [int] NOT NULL DEFAULT 0, + [context] [nvarchar](255) NOT NULL DEFAULT '', + [catid] [int] NOT NULL DEFAULT 0, + [assigned_cat_ids] [nvarchar](255) NOT NULL DEFAULT '', + [title] [nvarchar](255) NOT NULL DEFAULT '', + [alias] [nvarchar](255) NOT NULL DEFAULT '', + [label] [nvarchar](255) NOT NULL DEFAULT '', + [default_value] [nvarchar](max) NOT NULL, + [type] [nvarchar](255) NOT NULL DEFAULT '', + [options] [nvarchar](255) NOT NULL DEFAULT '', + [note] [nvarchar](255) NOT NULL DEFAULT '', + [description] [nvarchar](max) NOT NULL, + [state] [smallint] NOT NULL DEFAULT 0, + [required] [smallint] NOT NULL DEFAULT 0, + [checked_out] [bigint] NOT NULL DEFAULT 0, + [checked_out_time] [datetime] NOT NULL DEFAULT '1900-01-01 00:00:00', + [ordering] [int] NOT NULL DEFAULT 0, + [params] [nvarchar](max) NOT NULL, + [fieldparams] [nvarchar](max) NOT NULL, + [attributes] [nvarchar](max) NOT NULL, + [language] [nvarchar](7) NOT NULL DEFAULT '', + [created_time] [datetime] NOT NULL DEFAULT '1900-01-01T00:00:00.000', + [created_user_id] [bigint] NOT NULL DEFAULT 0, + [created_by_alias] [nvarchar](255) NOT NULL DEFAULT '', + [version] [bigint] NOT NULL DEFAULT 1, + [modified_time] [datetime] NOT NULL DEFAULT '1900-01-01T00:00:00.000', + [modified_by] [bigint] NOT NULL DEFAULT 0, + [publish_up] [datetime] NOT NULL DEFAULT '1900-01-01T00:00:00.000', + [publish_down] [datetime] NOT NULL DEFAULT '1900-01-01T00:00:00.000', + [access] [int] NOT NULL DEFAULT 1, [hits] [bigint] NOT NULL DEFAULT 0, +CONSTRAINT [PK_#__fields_id] PRIMARY KEY CLUSTERED( + [id] ASC) +WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON +) ON [PRIMARY]) ON [PRIMARY]; + +CREATE NONCLUSTERED INDEX [idx_checkout] ON [#__fields]( + [checked_out] ASC) +WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +CREATE NONCLUSTERED INDEX [idx_state] ON [#__fields]( + [state] ASC) +WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +CREATE NONCLUSTERED INDEX [idx_access] ON [#__fields]( + [access] ASC) +WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +CREATE NONCLUSTERED INDEX [idx_context] ON [#__fields]( + [context] ASC) +WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +CREATE NONCLUSTERED INDEX [idx_language] ON [#__fields]( + [language] ASC) +WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +/****** Object:  Table [#__fields_values] ******/ + +SET QUOTED_IDENTIFIER ON; + +CREATE TABLE [#__fields_values]( + [field_id] [bigint] NOT NULL DEFAULT 1, + [context] [nvarchar](255) NOT NULL DEFAULT '', + [item_id] [nvarchar](255) NOT NULL DEFAULT '', + [value] [nvarchar](max) NOT NULL DEFAULT '', +) ON [PRIMARY]; + +CREATE NONCLUSTERED INDEX [idx_field_id] ON [#__fields_values]( + [field_id] ASC) +WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +CREATE NONCLUSTERED INDEX [idx_context] ON [#__fields_values]( + [context] ASC) +WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +CREATE NONCLUSTERED INDEX [idx_item_id] ON [#__fields_values]( + [item_id] ASC) +WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + /****** Object: Table [#__finder_filters] ******/ SET QUOTED_IDENTIFIER ON; From d6e069afb00166c80628e4ff2ab2f5409277803c Mon Sep 17 00:00:00 2001 From: andrepereiradasilva Date: Tue, 1 Nov 2016 00:14:45 +0000 Subject: [PATCH 04/20] minor cs + defaul values --- .../sql/updates/sqlazure/3.7.0-2016-08-29.sql | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql index 04f168f6ff0ab..9e8cabb253add 100644 --- a/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql +++ b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql @@ -11,19 +11,19 @@ CREATE TABLE [#__fields]( [title] [nvarchar](255) NOT NULL DEFAULT '', [alias] [nvarchar](255) NOT NULL DEFAULT '', [label] [nvarchar](255) NOT NULL DEFAULT '', - [default_value] [nvarchar](max) NOT NULL, + [default_value] [nvarchar](max) NOT NULL DEFAULT '', [type] [nvarchar](255) NOT NULL DEFAULT '', [options] [nvarchar](255) NOT NULL DEFAULT '', [note] [nvarchar](255) NOT NULL DEFAULT '', - [description] [nvarchar](max) NOT NULL, + [description] [nvarchar](max) NOT NULL DEFAULT '', [state] [smallint] NOT NULL DEFAULT 0, [required] [smallint] NOT NULL DEFAULT 0, [checked_out] [bigint] NOT NULL DEFAULT 0, [checked_out_time] [datetime] NOT NULL DEFAULT '1900-01-01 00:00:00', [ordering] [int] NOT NULL DEFAULT 0, - [params] [nvarchar](max) NOT NULL, - [fieldparams] [nvarchar](max) NOT NULL, - [attributes] [nvarchar](max) NOT NULL, + [params] [nvarchar](max) NOT NULL DEFAULT '', + [fieldparams] [nvarchar](max) NOT NULL DEFAULT '', + [attributes] [nvarchar](max) NOT NULL DEFAULT '', [language] [nvarchar](7) NOT NULL DEFAULT '', [created_time] [datetime] NOT NULL DEFAULT '1900-01-01T00:00:00.000', [created_user_id] [bigint] NOT NULL DEFAULT 0, @@ -83,10 +83,12 @@ CREATE NONCLUSTERED INDEX [idx_item_id] ON [#__fields_values]( WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); SET IDENTITY_INSERT [#__extensions] ON; - INSERT INTO [#__extensions] ([extension_id], [name], [type], [element], [folder], [client_id], [enabled], [access], [protected], [manifest_cache], [params], [custom_data], [system_data], [checked_out], [checked_out_time], [ordering], [state]) - SELECT 33, 'com_fields', 'component', 'com_fields', '', 1, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0; - INSERT INTO [#__extensions] ([extension_id], [name], [type], [element], [folder], [client_id], [enabled], [access], [protected], [manifest_cache], [params], [custom_data], [system_data], [checked_out], [checked_out_time], [ordering], [state]) - SELECT 461, 'plg_system_fields', 'plugin', 'fields', 'system', 0, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0; - INSERT INTO [#__extensions] ([extension_id], [name], [type], [element], [folder], [client_id], [enabled], [access], [protected], [manifest_cache], [params], [custom_data], [system_data], [checked_out], [checked_out_time], [ordering], [state]) - SELECT 462, 'plg_fields_gallery', 'plugin', 'gallery', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0; -SET IDENTITY_INSERT [#__extensions]  OFF; + +INSERT INTO [#__extensions] ([extension_id], [name], [type], [element], [folder], [client_id], [enabled], [access], [protected], [manifest_cache], [params], [custom_data], [system_data], [checked_out], [checked_out_time], [ordering], [state]) +SELECT 33, 'com_fields', 'component', 'com_fields', '', 1, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0 +UNION ALL +SELECT 461, 'plg_system_fields', 'plugin', 'fields', 'system', 0, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0 +UNION ALL +SELECT 462, 'plg_fields_gallery', 'plugin', 'gallery', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0; + +SET IDENTITY_INSERT [#__extensions] OFF; From 62f09e9c84f121db83b71d9108432bbb7ac544d1 Mon Sep 17 00:00:00 2001 From: Nicola Galgano Date: Tue, 1 Nov 2016 08:25:17 +0100 Subject: [PATCH 05/20] move hits field on a new line move hits field on a new line --- .../com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql index 9e8cabb253add..06348c776678c 100644 --- a/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql +++ b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql @@ -33,7 +33,8 @@ CREATE TABLE [#__fields]( [modified_by] [bigint] NOT NULL DEFAULT 0, [publish_up] [datetime] NOT NULL DEFAULT '1900-01-01T00:00:00.000', [publish_down] [datetime] NOT NULL DEFAULT '1900-01-01T00:00:00.000', - [access] [int] NOT NULL DEFAULT 1, [hits] [bigint] NOT NULL DEFAULT 0, + [access] [int] NOT NULL DEFAULT 1, + [hits] [bigint] NOT NULL DEFAULT 0, CONSTRAINT [PK_#__fields_id] PRIMARY KEY CLUSTERED( [id] ASC) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON From 7f785fa7fc60ec010d2f240fcd8aae529b8ea893 Mon Sep 17 00:00:00 2001 From: Nicola Galgano Date: Tue, 1 Nov 2016 10:09:19 +0100 Subject: [PATCH 06/20] removed version, hits fields removed (version, hits) fields #12674 --- .../com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql | 2 -- 1 file changed, 2 deletions(-) diff --git a/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql index 06348c776678c..12a6ea7206456 100644 --- a/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql +++ b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql @@ -28,13 +28,11 @@ CREATE TABLE [#__fields]( [created_time] [datetime] NOT NULL DEFAULT '1900-01-01T00:00:00.000', [created_user_id] [bigint] NOT NULL DEFAULT 0, [created_by_alias] [nvarchar](255) NOT NULL DEFAULT '', - [version] [bigint] NOT NULL DEFAULT 1, [modified_time] [datetime] NOT NULL DEFAULT '1900-01-01T00:00:00.000', [modified_by] [bigint] NOT NULL DEFAULT 0, [publish_up] [datetime] NOT NULL DEFAULT '1900-01-01T00:00:00.000', [publish_down] [datetime] NOT NULL DEFAULT '1900-01-01T00:00:00.000', [access] [int] NOT NULL DEFAULT 1, - [hits] [bigint] NOT NULL DEFAULT 0, CONSTRAINT [PK_#__fields_id] PRIMARY KEY CLUSTERED( [id] ASC) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON From bfed1dc1457cb9f910349f39d9321be075aa4baa Mon Sep 17 00:00:00 2001 From: Nicola Galgano Date: Tue, 1 Nov 2016 10:11:33 +0100 Subject: [PATCH 07/20] removed (version,hits) fields removed (version,hits) fields #12674 --- installation/sql/sqlazure/joomla.sql | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/installation/sql/sqlazure/joomla.sql b/installation/sql/sqlazure/joomla.sql index c03ed24113092..75fdfc7829d0e 100644 --- a/installation/sql/sqlazure/joomla.sql +++ b/installation/sql/sqlazure/joomla.sql @@ -1080,12 +1080,11 @@ CREATE TABLE [#__fields]( [created_time] [datetime] NOT NULL DEFAULT '1900-01-01T00:00:00.000', [created_user_id] [bigint] NOT NULL DEFAULT 0, [created_by_alias] [nvarchar](255) NOT NULL DEFAULT '', - [version] [bigint] NOT NULL DEFAULT 1, [modified_time] [datetime] NOT NULL DEFAULT '1900-01-01T00:00:00.000', [modified_by] [bigint] NOT NULL DEFAULT 0, [publish_up] [datetime] NOT NULL DEFAULT '1900-01-01T00:00:00.000', [publish_down] [datetime] NOT NULL DEFAULT '1900-01-01T00:00:00.000', - [access] [int] NOT NULL DEFAULT 1, [hits] [bigint] NOT NULL DEFAULT 0, + [access] [int] NOT NULL DEFAULT 1, CONSTRAINT [PK_#__fields_id] PRIMARY KEY CLUSTERED( [id] ASC) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON From e5cf3021bf869062b24eebe62939dba47589efb3 Mon Sep 17 00:00:00 2001 From: Nicola Galgano Date: Mon, 5 Dec 2016 20:55:39 +0100 Subject: [PATCH 08/20] mssql com_fields#13091 Fixing sql fields #13091 --- installation/sql/sqlazure/joomla.sql | 53 +++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) diff --git a/installation/sql/sqlazure/joomla.sql b/installation/sql/sqlazure/joomla.sql index 75fdfc7829d0e..7bf9a7bf082bf 100644 --- a/installation/sql/sqlazure/joomla.sql +++ b/installation/sql/sqlazure/joomla.sql @@ -1058,7 +1058,7 @@ CREATE TABLE [#__fields]( [id] [int] IDENTITY(1,1) NOT NULL, [asset_id] [int] NOT NULL DEFAULT 0, [context] [nvarchar](255) NOT NULL DEFAULT '', - [catid] [int] NOT NULL DEFAULT 0, + [group_id] [int] NOT NULL DEFAULT 0, [assigned_cat_ids] [nvarchar](255) NOT NULL DEFAULT '', [title] [nvarchar](255) NOT NULL DEFAULT '', [alias] [nvarchar](255) NOT NULL DEFAULT '', @@ -1110,6 +1110,57 @@ CREATE NONCLUSTERED INDEX [idx_language] ON [#__fields]( [language] ASC) WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); +/****** Object: Table [#__fields_groups] ******/ + +SET QUOTED_IDENTIFIER ON; + +CREATE TABLE [#__fields_groups]( + [id] [int] IDENTITY(1,1) NOT NULL, + [asset_id] [int] NOT NULL DEFAULT 0, + [extension] [nvarchar](255) NOT NULL DEFAULT '', + [title] [nvarchar](255) NOT NULL DEFAULT '', + [alias] [nvarchar](255) NOT NULL DEFAULT '', + [note] [nvarchar](255) NOT NULL DEFAULT '', + [description] [nvarchar](max) NOT NULL DEFAULT '', + [state] [smallint] NOT NULL DEFAULT 0, + [checked_out] [bigint] NOT NULL DEFAULT 0, + [checked_out_time] [datetime] NOT NULL DEFAULT '1900-01-01 00:00:00', + [ordering] [int] NOT NULL DEFAULT 0, + [language] [nvarchar](7) NOT NULL DEFAULT '' + [created] [datetime] NOT NULL DEFAULT '1900-01-01T00:00:00.000', + [created_by] [bigint] NOT NULL DEFAULT 0, + [modified] [datetime] NOT NULL DEFAULT '1900-01-01T00:00:00.000', + [modified_by] [bigint] NOT NULL DEFAULT 0, + [access] [int] NOT NULL DEFAULT 1, +CONSTRAINT [PK_#__fields_groups_id] PRIMARY KEY CLUSTERED( + [id] ASC) +WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON + ) ON [PRIMARY]) ON [PRIMARY]; + +CREATE NONCLUSTERED INDEX [idx_checkout] ON [#__fields_groups]( + [checked_out] ASC) +WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +CREATE NONCLUSTERED INDEX [idx_state] ON [#__fields_groups]( + [state] ASC) +WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +CREATE NONCLUSTERED INDEX [idx_created_by] ON [#__fields_groups]( + [created_by] ASC) +WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +CREATE NONCLUSTERED INDEX [idx_access] ON [#__fields_groups]( + [access] ASC) +WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +CREATE NONCLUSTERED INDEX [idx_extension] ON [#__fields_groups]( + [extension] ASC) +WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +CREATE NONCLUSTERED INDEX [idx_language] ON [#__fields_groups]( + [language] ASC) +WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + /****** Object:  Table [#__fields_values] ******/ SET QUOTED_IDENTIFIER ON; From 0bf80498233af3f195f1afebed50f447b3c747a4 Mon Sep 17 00:00:00 2001 From: Nicola Galgano Date: Mon, 5 Dec 2016 20:58:09 +0100 Subject: [PATCH 09/20] mssql com_fields#13091 mssql com_fields#13091 --- .../sql/updates/sqlazure/3.7.0-2016-08-29.sql | 53 ++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) diff --git a/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql index 12a6ea7206456..349fadd931a53 100644 --- a/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql +++ b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql @@ -6,7 +6,7 @@ CREATE TABLE [#__fields]( [id] [int] IDENTITY(1,1) NOT NULL, [asset_id] [int] NOT NULL DEFAULT 0, [context] [nvarchar](255) NOT NULL DEFAULT '', - [catid] [int] NOT NULL DEFAULT 0, + [group_id] [int] NOT NULL DEFAULT 0, [assigned_cat_ids] [nvarchar](255) NOT NULL DEFAULT '', [title] [nvarchar](255) NOT NULL DEFAULT '', [alias] [nvarchar](255) NOT NULL DEFAULT '', @@ -58,6 +58,57 @@ CREATE NONCLUSTERED INDEX [idx_language] ON [#__fields]( [language] ASC) WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); +/****** Object: Table [#__fields_groups] ******/ + +SET QUOTED_IDENTIFIER ON; + +CREATE TABLE [#__fields_groups]( + [id] [int] IDENTITY(1,1) NOT NULL, + [asset_id] [int] NOT NULL DEFAULT 0, + [extension] [nvarchar](255) NOT NULL DEFAULT '', + [title] [nvarchar](255) NOT NULL DEFAULT '', + [alias] [nvarchar](255) NOT NULL DEFAULT '', + [note] [nvarchar](255) NOT NULL DEFAULT '', + [description] [nvarchar](max) NOT NULL DEFAULT '', + [state] [smallint] NOT NULL DEFAULT 0, + [checked_out] [bigint] NOT NULL DEFAULT 0, + [checked_out_time] [datetime] NOT NULL DEFAULT '1900-01-01 00:00:00', + [ordering] [int] NOT NULL DEFAULT 0, + [language] [nvarchar](7) NOT NULL DEFAULT '' + [created] [datetime] NOT NULL DEFAULT '1900-01-01T00:00:00.000', + [created_by] [bigint] NOT NULL DEFAULT 0, + [modified] [datetime] NOT NULL DEFAULT '1900-01-01T00:00:00.000', + [modified_by] [bigint] NOT NULL DEFAULT 0, + [access] [int] NOT NULL DEFAULT 1, +CONSTRAINT [PK_#__fields_groups_id] PRIMARY KEY CLUSTERED( + [id] ASC) +WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON + ) ON [PRIMARY]) ON [PRIMARY]; + +CREATE NONCLUSTERED INDEX [idx_checkout] ON [#__fields_groups]( + [checked_out] ASC) +WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +CREATE NONCLUSTERED INDEX [idx_state] ON [#__fields_groups]( + [state] ASC) +WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +CREATE NONCLUSTERED INDEX [idx_created_by] ON [#__fields_groups]( + [created_by] ASC) +WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +CREATE NONCLUSTERED INDEX [idx_access] ON [#__fields_groups]( + [access] ASC) +WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +CREATE NONCLUSTERED INDEX [idx_extension] ON [#__fields_groups]( + [extension] ASC) +WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +CREATE NONCLUSTERED INDEX [idx_language] ON [#__fields_groups]( + [language] ASC) +WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + /****** Object:  Table [#__fields_values] ******/ SET QUOTED_IDENTIFIER ON; From bf5fd7a07f57f4e355ffec13e875171a71185558 Mon Sep 17 00:00:00 2001 From: Nicola Galgano Date: Wed, 7 Dec 2016 18:11:08 +0100 Subject: [PATCH 10/20] [com_fields] No need for an alias in fields groups. #13115 [com_fields] No need for an alias in fields groups. #13115 --- .../com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql | 1 - 1 file changed, 1 deletion(-) diff --git a/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql index 349fadd931a53..84461862bfb9a 100644 --- a/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql +++ b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql @@ -67,7 +67,6 @@ CREATE TABLE [#__fields_groups]( [asset_id] [int] NOT NULL DEFAULT 0, [extension] [nvarchar](255) NOT NULL DEFAULT '', [title] [nvarchar](255) NOT NULL DEFAULT '', - [alias] [nvarchar](255) NOT NULL DEFAULT '', [note] [nvarchar](255) NOT NULL DEFAULT '', [description] [nvarchar](max) NOT NULL DEFAULT '', [state] [smallint] NOT NULL DEFAULT 0, From aeb306e268689b548f791832ba7abc50d583e368 Mon Sep 17 00:00:00 2001 From: Nicola Galgano Date: Wed, 7 Dec 2016 18:14:37 +0100 Subject: [PATCH 11/20] [com_fields] No need for an alias in fields groups. #13115 [com_fields] No need for an alias in fields groups. #13115 --- installation/sql/sqlazure/joomla.sql | 1 - 1 file changed, 1 deletion(-) diff --git a/installation/sql/sqlazure/joomla.sql b/installation/sql/sqlazure/joomla.sql index 7bf9a7bf082bf..dfeeabf62cb96 100644 --- a/installation/sql/sqlazure/joomla.sql +++ b/installation/sql/sqlazure/joomla.sql @@ -1119,7 +1119,6 @@ CREATE TABLE [#__fields_groups]( [asset_id] [int] NOT NULL DEFAULT 0, [extension] [nvarchar](255) NOT NULL DEFAULT '', [title] [nvarchar](255) NOT NULL DEFAULT '', - [alias] [nvarchar](255) NOT NULL DEFAULT '', [note] [nvarchar](255) NOT NULL DEFAULT '', [description] [nvarchar](max) NOT NULL DEFAULT '', [state] [smallint] NOT NULL DEFAULT 0, From 43a7e2c0a835ec119d97dbfe60b4df33dc6a0dbf Mon Sep 17 00:00:00 2001 From: Nicola Galgano Date: Thu, 8 Dec 2016 17:46:35 +0100 Subject: [PATCH 12/20] missed comma missed comma --- .../com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql index 84461862bfb9a..8a9f665ca4a83 100644 --- a/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql +++ b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql @@ -73,7 +73,7 @@ CREATE TABLE [#__fields_groups]( [checked_out] [bigint] NOT NULL DEFAULT 0, [checked_out_time] [datetime] NOT NULL DEFAULT '1900-01-01 00:00:00', [ordering] [int] NOT NULL DEFAULT 0, - [language] [nvarchar](7) NOT NULL DEFAULT '' + [language] [nvarchar](7) NOT NULL DEFAULT '', [created] [datetime] NOT NULL DEFAULT '1900-01-01T00:00:00.000', [created_by] [bigint] NOT NULL DEFAULT 0, [modified] [datetime] NOT NULL DEFAULT '1900-01-01T00:00:00.000', From db9cce56a1a76dfbec31e2572aaa95c23869b673 Mon Sep 17 00:00:00 2001 From: Nicola Galgano Date: Thu, 8 Dec 2016 17:48:09 +0100 Subject: [PATCH 13/20] missed comma missed comma --- installation/sql/sqlazure/joomla.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installation/sql/sqlazure/joomla.sql b/installation/sql/sqlazure/joomla.sql index dfeeabf62cb96..03121de2b59c5 100644 --- a/installation/sql/sqlazure/joomla.sql +++ b/installation/sql/sqlazure/joomla.sql @@ -1125,7 +1125,7 @@ CREATE TABLE [#__fields_groups]( [checked_out] [bigint] NOT NULL DEFAULT 0, [checked_out_time] [datetime] NOT NULL DEFAULT '1900-01-01 00:00:00', [ordering] [int] NOT NULL DEFAULT 0, - [language] [nvarchar](7) NOT NULL DEFAULT '' + [language] [nvarchar](7) NOT NULL DEFAULT '', [created] [datetime] NOT NULL DEFAULT '1900-01-01T00:00:00.000', [created_by] [bigint] NOT NULL DEFAULT 0, [modified] [datetime] NOT NULL DEFAULT '1900-01-01T00:00:00.000', From a3209e55f4223b40982de7305a8d6a5d12a4574b Mon Sep 17 00:00:00 2001 From: Nicola Galgano Date: Mon, 19 Dec 2016 07:44:48 +0100 Subject: [PATCH 14/20] update for #13175 from extension to context --- installation/sql/sqlazure/joomla.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/installation/sql/sqlazure/joomla.sql b/installation/sql/sqlazure/joomla.sql index 03121de2b59c5..71252e9ef624e 100644 --- a/installation/sql/sqlazure/joomla.sql +++ b/installation/sql/sqlazure/joomla.sql @@ -1117,7 +1117,7 @@ SET QUOTED_IDENTIFIER ON; CREATE TABLE [#__fields_groups]( [id] [int] IDENTITY(1,1) NOT NULL, [asset_id] [int] NOT NULL DEFAULT 0, - [extension] [nvarchar](255) NOT NULL DEFAULT '', + [context] [nvarchar](255) NOT NULL DEFAULT '', [title] [nvarchar](255) NOT NULL DEFAULT '', [note] [nvarchar](255) NOT NULL DEFAULT '', [description] [nvarchar](max) NOT NULL DEFAULT '', @@ -1152,8 +1152,8 @@ CREATE NONCLUSTERED INDEX [idx_access] ON [#__fields_groups]( [access] ASC) WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); -CREATE NONCLUSTERED INDEX [idx_extension] ON [#__fields_groups]( - [extension] ASC) +CREATE NONCLUSTERED INDEX [idx_context] ON [#__fields_groups]( + [context] ASC) WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); CREATE NONCLUSTERED INDEX [idx_language] ON [#__fields_groups]( From aa015c0cea16c921fc81da8562b2ebc4d070b95e Mon Sep 17 00:00:00 2001 From: Nicola Galgano Date: Mon, 19 Dec 2016 07:46:33 +0100 Subject: [PATCH 15/20] update for #13175 from extension to context --- .../com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql index 8a9f665ca4a83..86f7f4c3e3f08 100644 --- a/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql +++ b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql @@ -65,7 +65,7 @@ SET QUOTED_IDENTIFIER ON; CREATE TABLE [#__fields_groups]( [id] [int] IDENTITY(1,1) NOT NULL, [asset_id] [int] NOT NULL DEFAULT 0, - [extension] [nvarchar](255) NOT NULL DEFAULT '', + [context] [nvarchar](255) NOT NULL DEFAULT '', [title] [nvarchar](255) NOT NULL DEFAULT '', [note] [nvarchar](255) NOT NULL DEFAULT '', [description] [nvarchar](max) NOT NULL DEFAULT '', @@ -100,8 +100,8 @@ CREATE NONCLUSTERED INDEX [idx_access] ON [#__fields_groups]( [access] ASC) WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); -CREATE NONCLUSTERED INDEX [idx_extension] ON [#__fields_groups]( - [extension] ASC) +CREATE NONCLUSTERED INDEX [idx_context] ON [#__fields_groups]( + [context] ASC) WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); CREATE NONCLUSTERED INDEX [idx_language] ON [#__fields_groups]( From 76c7f98a9c1b0cb7b26ae656c5e71b416eb57f09 Mon Sep 17 00:00:00 2001 From: Nicola Galgano Date: Wed, 21 Dec 2016 10:47:44 +0100 Subject: [PATCH 16/20] update for #13246 update for #13246 --- .../sql/updates/sqlazure/3.7.0-2016-08-29.sql | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql index 86f7f4c3e3f08..2ed50d4889eb2 100644 --- a/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql +++ b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql @@ -7,7 +7,6 @@ CREATE TABLE [#__fields]( [asset_id] [int] NOT NULL DEFAULT 0, [context] [nvarchar](255) NOT NULL DEFAULT '', [group_id] [int] NOT NULL DEFAULT 0, - [assigned_cat_ids] [nvarchar](255) NOT NULL DEFAULT '', [title] [nvarchar](255) NOT NULL DEFAULT '', [alias] [nvarchar](255) NOT NULL DEFAULT '', [label] [nvarchar](255) NOT NULL DEFAULT '', @@ -58,6 +57,19 @@ CREATE NONCLUSTERED INDEX [idx_language] ON [#__fields]( [language] ASC) WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); +/****** Object:  Table [#__fields_categories] ******/ + +SET QUOTED_IDENTIFIER ON; + +CREATE TABLE [#__fields_categories](  + [field_id] [int] NOT NULL DEFAULT 0,    + [category_id] [int] NOT NULL DEFAULT 0,    +CONSTRAINT [PK_#__fields_categories_id] PRIMARY KEY CLUSTERED( + [field_id] ASC,  + [category_id] ASC) +WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON +) ON [PRIMARY]) ON [PRIMARY]; + /****** Object: Table [#__fields_groups] ******/ SET QUOTED_IDENTIFIER ON; From 1d43641bd190cf0b11cac65029547c30609353f0 Mon Sep 17 00:00:00 2001 From: Nicola Galgano Date: Wed, 21 Dec 2016 18:19:33 +0100 Subject: [PATCH 17/20] updated for #13246 updated for #13246 --- installation/sql/sqlazure/joomla.sql | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/installation/sql/sqlazure/joomla.sql b/installation/sql/sqlazure/joomla.sql index 71252e9ef624e..b282e896892ef 100644 --- a/installation/sql/sqlazure/joomla.sql +++ b/installation/sql/sqlazure/joomla.sql @@ -1059,7 +1059,6 @@ CREATE TABLE [#__fields]( [asset_id] [int] NOT NULL DEFAULT 0, [context] [nvarchar](255) NOT NULL DEFAULT '', [group_id] [int] NOT NULL DEFAULT 0, - [assigned_cat_ids] [nvarchar](255) NOT NULL DEFAULT '', [title] [nvarchar](255) NOT NULL DEFAULT '', [alias] [nvarchar](255) NOT NULL DEFAULT '', [label] [nvarchar](255) NOT NULL DEFAULT '', @@ -1110,6 +1109,19 @@ CREATE NONCLUSTERED INDEX [idx_language] ON [#__fields]( [language] ASC) WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); +/****** Object: Table [#__fields_categories] ******/ + +SET QUOTED_IDENTIFIER ON; + +CREATE TABLE [#__fields_categories]( + [field_id] [int] NOT NULL DEFAULT 0, + [category_id] [int] NOT NULL DEFAULT 0, +CONSTRAINT [PK_#__fields_categories_id] PRIMARY KEY CLUSTERED( + [field_id] ASC, + [category_id] ASC) +WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON +) ON [PRIMARY]) ON [PRIMARY]; + /****** Object: Table [#__fields_groups] ******/ SET QUOTED_IDENTIFIER ON; From 377364ee2175d4c8f192a077ebf14bc71e928efc Mon Sep 17 00:00:00 2001 From: Nicola Galgano Date: Thu, 5 Jan 2017 08:26:46 +0100 Subject: [PATCH 18/20] added the missed DEFAULT added the missed DEFAULT --- installation/sql/sqlazure/joomla.sql | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/installation/sql/sqlazure/joomla.sql b/installation/sql/sqlazure/joomla.sql index b282e896892ef..cf00817d35711 100644 --- a/installation/sql/sqlazure/joomla.sql +++ b/installation/sql/sqlazure/joomla.sql @@ -1062,19 +1062,19 @@ CREATE TABLE [#__fields]( [title] [nvarchar](255) NOT NULL DEFAULT '', [alias] [nvarchar](255) NOT NULL DEFAULT '', [label] [nvarchar](255) NOT NULL DEFAULT '', - [default_value] [nvarchar](max) NOT NULL, + [default_value] [nvarchar](max) NOT NULL DEFAULT '', [type] [nvarchar](255) NOT NULL DEFAULT '', [options] [nvarchar](255) NOT NULL DEFAULT '', [note] [nvarchar](255) NOT NULL DEFAULT '', - [description] [nvarchar](max) NOT NULL, + [description] [nvarchar](max) NOT NULL DEFAULT '', [state] [smallint] NOT NULL DEFAULT 0, [required] [smallint] NOT NULL DEFAULT 0, [checked_out] [bigint] NOT NULL DEFAULT 0, [checked_out_time] [datetime] NOT NULL DEFAULT '1900-01-01 00:00:00', [ordering] [int] NOT NULL DEFAULT 0, - [params] [nvarchar](max) NOT NULL, - [fieldparams] [nvarchar](max) NOT NULL, - [attributes] [nvarchar](max) NOT NULL, + [params] [nvarchar](max) NOT NULL DEFAULT '', + [fieldparams] [nvarchar](max) NOT NULL DEFAULT '', + [attributes] [nvarchar](max) NOT NULL DEFAULT '', [language] [nvarchar](7) NOT NULL DEFAULT '', [created_time] [datetime] NOT NULL DEFAULT '1900-01-01T00:00:00.000', [created_user_id] [bigint] NOT NULL DEFAULT 0, From ec4bbc4c4a2bc1157085d2ad876a5e8357a03b14 Mon Sep 17 00:00:00 2001 From: Nicola Galgano Date: Thu, 5 Jan 2017 19:58:59 +0100 Subject: [PATCH 19/20] added space before ( added space before ( --- .../com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql index 2ed50d4889eb2..ac53db1cf4f9f 100644 --- a/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql +++ b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql @@ -2,7 +2,7 @@ SET QUOTED_IDENTIFIER ON; -CREATE TABLE [#__fields]( +CREATE TABLE [#__fields] ( [id] [int] IDENTITY(1,1) NOT NULL, [asset_id] [int] NOT NULL DEFAULT 0, [context] [nvarchar](255) NOT NULL DEFAULT '', @@ -61,7 +61,7 @@ WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, O SET QUOTED_IDENTIFIER ON; -CREATE TABLE [#__fields_categories](  +CREATE TABLE [#__fields_categories] (  [field_id] [int] NOT NULL DEFAULT 0,    [category_id] [int] NOT NULL DEFAULT 0,    CONSTRAINT [PK_#__fields_categories_id] PRIMARY KEY CLUSTERED( @@ -74,7 +74,7 @@ WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW SET QUOTED_IDENTIFIER ON; -CREATE TABLE [#__fields_groups]( +CREATE TABLE [#__fields_groups] ( [id] [int] IDENTITY(1,1) NOT NULL, [asset_id] [int] NOT NULL DEFAULT 0, [context] [nvarchar](255) NOT NULL DEFAULT '', @@ -124,7 +124,7 @@ WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, O SET QUOTED_IDENTIFIER ON; -CREATE TABLE [#__fields_values]( +CREATE TABLE [#__fields_values] ( [field_id] [bigint] NOT NULL DEFAULT 1, [context] [nvarchar](255) NOT NULL DEFAULT '', [item_id] [nvarchar](255) NOT NULL DEFAULT '', From 6fad1a277653d22ab841bd27389ea0067d106251 Mon Sep 17 00:00:00 2001 From: Nicola Galgano Date: Thu, 5 Jan 2017 20:02:17 +0100 Subject: [PATCH 20/20] added space before ( added space before ( --- installation/sql/sqlazure/joomla.sql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/installation/sql/sqlazure/joomla.sql b/installation/sql/sqlazure/joomla.sql index cf00817d35711..de689e4c6d769 100644 --- a/installation/sql/sqlazure/joomla.sql +++ b/installation/sql/sqlazure/joomla.sql @@ -1054,7 +1054,7 @@ SET IDENTITY_INSERT [#__extensions] OFF; SET QUOTED_IDENTIFIER ON; -CREATE TABLE [#__fields]( +CREATE TABLE [#__fields] ( [id] [int] IDENTITY(1,1) NOT NULL, [asset_id] [int] NOT NULL DEFAULT 0, [context] [nvarchar](255) NOT NULL DEFAULT '', @@ -1113,7 +1113,7 @@ WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, O SET QUOTED_IDENTIFIER ON; -CREATE TABLE [#__fields_categories]( +CREATE TABLE [#__fields_categories] ( [field_id] [int] NOT NULL DEFAULT 0, [category_id] [int] NOT NULL DEFAULT 0, CONSTRAINT [PK_#__fields_categories_id] PRIMARY KEY CLUSTERED( @@ -1126,7 +1126,7 @@ WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW SET QUOTED_IDENTIFIER ON; -CREATE TABLE [#__fields_groups]( +CREATE TABLE [#__fields_groups] ( [id] [int] IDENTITY(1,1) NOT NULL, [asset_id] [int] NOT NULL DEFAULT 0, [context] [nvarchar](255) NOT NULL DEFAULT '', @@ -1176,7 +1176,7 @@ WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, O SET QUOTED_IDENTIFIER ON; -CREATE TABLE [#__fields_values]( +CREATE TABLE [#__fields_values] ( [field_id] [bigint] NOT NULL DEFAULT 1, [context] [nvarchar](255) NOT NULL DEFAULT '', [item_id] [nvarchar](255) NOT NULL DEFAULT '',