Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Insert with specific ID #5618

Closed
okonomiyaki3000 opened this issue Jan 5, 2015 · 4 comments
Closed

Insert with specific ID #5618

okonomiyaki3000 opened this issue Jan 5, 2015 · 4 comments

Comments

@okonomiyaki3000
Copy link
Contributor

In the sql update files for 2.5.28 (administrator/components/com_admin/sql/updates/...) we have an insert query something like:

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`) VALUES
(900, 'plg_quickicon_eosnotify', 'plugin', 'eosnotify', 'quickicon', 0, 1, 1, 1, '', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0);

This will fail if there is already an extension installed with id 900. It would be better to not specify an id and allow the auto-increment to set it. Like so:

INSERT INTO `#__extensions` (`name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `system_data`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES
('plg_quickicon_eosnotify', 'plugin', 'eosnotify', 'quickicon', 0, 1, 1, 1, '', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0);
@brianteeman
Copy link
Contributor

IIRC 900 is in a protected range that only the core can use


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5618.

@zero-24
Copy link
Contributor

zero-24 commented Jan 5, 2015

yes regular new extensions starts with ID 10000

screen shot 2015-01-05 at 04 29 30


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5618.

@brianteeman
Copy link
Contributor

Closing as expected behaviour - not an issue


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5618.

@okonomiyaki3000
Copy link
Contributor Author

Somehow I had a site where this didn't happen properly. Not sure why.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants