Skip to content

Commit

Permalink
Add v9 related queries
Browse files Browse the repository at this point in the history
  • Loading branch information
M0rgan01 committed May 13, 2024
1 parent a1e64c4 commit 150a23f
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 2 deletions.
4 changes: 2 additions & 2 deletions upgrade/sql/8.1.0.sql
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ CREATE TABLE `PREFIX_authorized_application`
description LONGTEXT NOT NULL,
UNIQUE INDEX UNIQ_475B9BA55E237E06 (name),
PRIMARY KEY (id_authorized_application)
) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB;
) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = ENGINE_TYPE;

CREATE TABLE `PREFIX_api_access`
(
Expand All @@ -104,4 +104,4 @@ CREATE TABLE `PREFIX_api_access`
scopes LONGTEXT NOT NULL COMMENT '(DC2Type:array)',
INDEX IDX_6E064442D8BFF738 (id_authorized_application),
PRIMARY KEY (id_api_access)
) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB;
) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = ENGINE_TYPE;
40 changes: 40 additions & 0 deletions upgrade/sql/9.0.0.sql
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,43 @@ DROP TABLE `PREFIX_accessory`;
RENAME TABLE `PREFIX_accessory_tmp` TO `PREFIX_accessory`;

ALTER TABLE `PREFIX_stock_mvt` MODIFY `id_supply_order` INT(11) DEFAULT '0';

DROP TABLE IF EXISTS `PREFIX_api_access`;
DROP TABLE IF EXISTS `PREFIX_authorized_application`;
CREATE TABLE `PREFIX_api_client`
(
`id_api_client` int(10) unsigned NOT NULL AUTO_INCREMENT,
`client_id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`client_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`client_secret` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`enabled` tinyint(1) NOT NULL,
`scopes` json NOT NULL,
`description` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`external_issuer` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`lifetime` int(11) NOT NULL DEFAULT '3600',
PRIMARY KEY (`id_api_client`),
UNIQUE KEY `api_client_client_id_idx` (`client_id`,`external_issuer`),
UNIQUE KEY `api_client_client_name_idx` (`client_name`,`external_issuer`)
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

ALTER TABLE `PREFIX_image_type`
CHANGE `id_image_type` `id_image_type` int(11) NOT NULL AUTO_INCREMENT,
CHANGE `width` `width` int(11) NOT NULL,
CHANGE `height` `height` int(11) NOT NULL,
CHANGE `products` `products` tinyint(1) NOT NULL,
CHANGE `manufacturers` `manufacturers` tinyint(1) NOT NULL,
CHANGE `stores` `stores` tinyint(1) NOT NULL,
DROP key `image_type_name`,
ADD UNIQUE KEY `UNIQ_907C95215E237E06` (`name`);

CREATE TABLE `PREFIX_mutation` (
`id_mutation` int(10) unsigned NOT NULL AUTO_INCREMENT,
`mutation_table` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`mutation_row_id` bigint(20) NOT NULL,
`mutation_action` enum('create','update','delete') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`mutator_type` enum('employee','api_client','module') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`mutator_identifier` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`mutation_details` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`date_add` datetime NOT NULL,
PRIMARY KEY (`id_mutation`)
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

0 comments on commit 150a23f

Please sign in to comment.