"Fossies" - the Fresh Open Source Software Archive

Member "administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-05-15.sql" (13 Sep 2021, 5789 Bytes) of package /linux/www/Joomla_4.0.3-Stable-Full_Package.tar.bz2:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PL/SQL source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 --
    2 -- Table structure for table `#__workflows`
    3 --
    4 
    5 CREATE TABLE IF NOT EXISTS `#__workflows` (
    6   `id` int NOT NULL AUTO_INCREMENT,
    7   `asset_id` int DEFAULT 0,
    8   `published` tinyint NOT NULL DEFAULT 0,
    9   `title` varchar(255) NOT NULL,
   10   `description` text NOT NULL,
   11   `extension` varchar(50) NOT NULL,
   12   `default` tinyint NOT NULL  DEFAULT 0,
   13   `ordering` int NOT NULL DEFAULT 0,
   14   `created` datetime NOT NULL,
   15   `created_by` int NOT NULL DEFAULT 0,
   16   `modified` datetime NOT NULL,
   17   `modified_by` int NOT NULL DEFAULT 0,
   18   `checked_out_time` datetime,
   19   `checked_out` int NOT NULL DEFAULT 0,
   20   PRIMARY KEY (`id`),
   21   KEY `idx_asset_id` (`asset_id`),
   22   KEY `idx_title` (`title`(191)),
   23   KEY `idx_extension` (`extension`),
   24   KEY `idx_default` (`default`),
   25   KEY `idx_created` (`created`),
   26   KEY `idx_created_by` (`created_by`),
   27   KEY `idx_modified` (`modified`),
   28   KEY `idx_modified_by` (`modified_by`),
   29   KEY `idx_checked_out` (`checked_out`)
   30 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;
   31 
   32 --
   33 -- Dumping data for table `#__workflows`
   34 --
   35 
   36 INSERT INTO `#__workflows` (`id`, `asset_id`, `published`, `title`, `description`, `extension`, `default`, `ordering`, `created`, `created_by`, `modified`, `modified_by`, `checked_out_time`, `checked_out`) VALUES
   37 (1, 0, 1, 'COM_WORKFLOW_BASIC_WORKFLOW', '', 'com_content.article', 1, 1, CURRENT_TIMESTAMP(), 0, CURRENT_TIMESTAMP(), 0, NULL, 0);
   38 
   39 --
   40 -- Table structure for table `#__workflow_associations`
   41 --
   42 
   43 CREATE TABLE IF NOT EXISTS `#__workflow_associations` (
   44   `item_id` int NOT NULL DEFAULT 0 COMMENT 'Extension table id value',
   45   `stage_id` int NOT NULL COMMENT 'Foreign Key to #__workflow_stages.id',
   46   `extension` varchar(50) NOT NULL,
   47   PRIMARY KEY (`item_id`, `extension`),
   48   KEY `idx_item_stage_extension` (`item_id`, `stage_id`, `extension`),
   49   KEY `idx_item_id` (`item_id`),
   50   KEY `idx_stage_id` (`stage_id`),
   51   KEY `idx_extension` (`extension`)
   52 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;
   53 
   54 --
   55 -- Table structure for table `#__workflow_stages`
   56 --
   57 
   58 CREATE TABLE IF NOT EXISTS `#__workflow_stages` (
   59   `id` int NOT NULL AUTO_INCREMENT,
   60   `asset_id` int DEFAULT 0,
   61   `ordering` int NOT NULL DEFAULT 0,
   62   `workflow_id` int NOT NULL,
   63   `published` tinyint NOT NULL DEFAULT 0,
   64   `title` varchar(255) NOT NULL,
   65   `description` text NOT NULL,
   66   `default` tinyint NOT NULL DEFAULT 0,
   67   `checked_out_time` datetime,
   68   `checked_out` int NOT NULL DEFAULT 0,
   69   PRIMARY KEY (`id`),
   70   KEY `idx_workflow_id` (`workflow_id`),
   71   KEY `idx_checked_out` (`checked_out`),
   72   KEY `idx_title` (`title`(191)),
   73   KEY `idx_asset_id` (`asset_id`),
   74   KEY `idx_default` (`default`)
   75 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;
   76 
   77 --
   78 -- Dumping data for table `#__workflow_stages`
   79 --
   80 
   81 INSERT INTO `#__workflow_stages` (`id`, `asset_id`, `ordering`, `workflow_id`, `published`, `title`, `description`, `default`, `checked_out_time`, `checked_out`) VALUES
   82 (1, 0, 1, 1, 1, 'COM_WORKFLOW_BASIC_STAGE', '', 1, NULL, 0);
   83 
   84 --
   85 -- Table structure for table `#__workflow_transitions`
   86 --
   87 
   88 CREATE TABLE IF NOT EXISTS `#__workflow_transitions` (
   89   `id` int NOT NULL AUTO_INCREMENT,
   90   `asset_id` int DEFAULT 0,
   91   `ordering` int NOT NULL DEFAULT 0,
   92   `workflow_id` int NOT NULL,
   93   `published` tinyint NOT NULL DEFAULT 0,
   94   `title` varchar(255) NOT NULL,
   95   `description` text NOT NULL,
   96   `from_stage_id` int NOT NULL,
   97   `to_stage_id` int NOT NULL,
   98   `options` text NOT NULL,
   99   `checked_out_time` datetime,
  100   `checked_out` int NOT NULL DEFAULT 0,
  101   PRIMARY KEY (`id`),
  102   KEY `idx_title` (`title`(191)),
  103   KEY `idx_asset_id` (`asset_id`),
  104   KEY `idx_checked_out` (`checked_out`),
  105   KEY `idx_from_stage_id` (`from_stage_id`),
  106   KEY `idx_to_stage_id` (`to_stage_id`),
  107   KEY `idx_workflow_id` (`workflow_id`)
  108 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;
  109 
  110 --
  111 -- Dumping data for table `#__workflow_transitions`
  112 --
  113 
  114 INSERT INTO `#__workflow_transitions` (`id`, `asset_id`, `published`, `ordering`, `workflow_id`, `title`, `description`, `from_stage_id`, `to_stage_id`, `options`, `checked_out_time`, `checked_out`) VALUES
  115 (1, 0, 1, 1, 1, 'Unpublish', '', -1, 1, '{"publishing":"0"}', NULL, 0),
  116 (2, 0, 1, 2, 1, 'Publish', '', -1, 1, '{"publishing":"1"}', NULL, 0),
  117 (3, 0, 1, 3, 1, 'Trash', '', -1, 1, '{"publishing":"-2"}', NULL, 0),
  118 (4, 0, 1, 4, 1, 'Archive', '', -1, 1, '{"publishing":"2"}', NULL, 0),
  119 (5, 0, 1, 5, 1, 'Feature', '', -1, 1, '{"featuring":"1"}', NULL, 0),
  120 (6, 0, 1, 6, 1, 'Unfeature', '', -1, 1, '{"featuring":"0"}', NULL, 0),
  121 (7, 0, 1, 7, 1, 'Publish & Feature', '', -1, 1, '{"publishing":"1","featuring":"1"}', NULL, 0);
  122 
  123 --
  124 -- Creating extension entry
  125 --
  126 -- Note that the old pseudo null dates have to be used for the `checked_out_time`
  127 -- column because the conversion to real null dates will be done with a later
  128 -- update SQL script.
  129 --
  130 
  131 INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES
  132 (0, 'com_workflow', 'component', 'com_workflow', '', 1, 1, 0, 1, '', '{}', '', 0, '0000-00-00 00:00:00', 0, 0),
  133 (0, 'plg_workflow_publishing', 'plugin', 'publishing', 'workflow', 0, 1, 1, 0, '', '{}', '', 0, '0000-00-00 00:00:00', 0, 0),
  134 (0, 'plg_workflow_featuring', 'plugin', 'featuring', 'workflow', 0, 1, 1, 0, '', '{}', '', 0, '0000-00-00 00:00:00', 0, 0),
  135 (0, 'plg_workflow_notification', 'plugin', 'notification', 'workflow', 0, 1, 1, 0, '', '{}', '', 0, '0000-00-00 00:00:00', 0, 0);
  136 
  137 --
  138 -- Creating Associations for existing content
  139 --
  140 INSERT INTO `#__workflow_associations` (`item_id`, `stage_id`, `extension`)
  141 SELECT `id`, 1, 'com_content.article' FROM `#__content`;