Skip to content

Commit a139c9c

Browse files
fixes; mysql added
1 parent a7f9a21 commit a139c9c

File tree

5 files changed

+18
-6
lines changed

5 files changed

+18
-6
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
CREATE TABLE ibexa_product_specification_attribute_symbol (id INT NOT NULL, value VARCHAR(160) DEFAULT NULL, INDEX ibexa_product_specification_attribute_symbol_value_idx (value), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_520_ci` ENGINE = InnoDB;
2+
ALTER TABLE ibexa_product_specification_attribute_symbol ADD CONSTRAINT ibexa_product_specification_attribute_symbol_fk FOREIGN KEY (id) REFERENCES ibexa_product_specification_attribute (id) ON UPDATE CASCADE ON DELETE CASCADE
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CREATE TABLE ibexa_product_specification_attribute_symbol (id INT NOT NULL, value VARCHAR(160) DEFAULT NULL, PRIMARY KEY(id));
2+
CREATE INDEX ibexa_product_specification_attribute_symbol_value_idx ON ibexa_product_specification_attribute_symbol (value);
3+
ALTER TABLE ibexa_product_specification_attribute_symbol ADD CONSTRAINT ibexa_product_specification_attribute_symbol_fk FOREIGN KEY (id) REFERENCES ibexa_product_specification_attribute (id) ON UPDATE CASCADE ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE;

docs/ibexa_products/editions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,4 @@ The features brought by LTS Updates become standard parts of the next LTS releas
6565
| [AI Actions](ai_actions_guide.md) | ✔ | ✔ | ✔ |
6666
| [Date and time attribute type](date_and_time.md) | ✔ | ✔ | ✔ |
6767
| [Discounts](discounts.md) | | | ✔ |
68+
| [Symbol attribute type](symbol_attribute_type.md) | ✔ | ✔ | ✔ |

docs/pim/attributes/symbol_attribute_type.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,17 @@ return [
3939
To store symbol attribute values, the `IbexaProductCatalogSymbolAttributeBundle` needs an extra table.
4040
The following SQL query can be used to build the required database structure:
4141

42-
``` sql
43-
CREATE TABLE ibexa_product_specification_attribute_symbol (id INT NOT NULL, value VARCHAR(160) DEFAULT NULL, PRIMARY KEY(id));
44-
CREATE INDEX ibexa_product_specification_attribute_symbol_value_idx ON ibexa_product_specification_attribute_symbol (value);
45-
ALTER TABLE ibexa_product_specification_attribute_symbol ADD CONSTRAINT ibexa_product_specification_attribute_symbol_fk FOREIGN KEY (id) REFERENCES ibexa_product_specification_attribute (id) ON UPDATE CASCADE ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE;
46-
```
42+
=== "MySQL"
43+
44+
``` sql
45+
[[= include_file('code_samples/symbol_attribute/config/mysql/symbol_attribute.sql') =]]
46+
```
47+
48+
=== "PostgreSQL"
49+
50+
``` sql
51+
[[= include_file('code_samples/symbol_attribute/config/postgresql/symbol_attribute.sql') =]]
52+
```
4753

4854
### Create symbol attribute definition (optional)
4955

docs/search/criteria_reference/symbolattribute_criterion.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ The `SymbolAttribute` Search Criterion searches for products by [symbol attribut
1717
### PHP
1818

1919
``` php
20-
[[= include_file(code_samples/back_office/search/src/Query/SymbolAttributeTypeQuery.php) =]]
20+
[[= include_file('code_samples/back_office/search/src/Query/SymbolAttributeTypeQuery.php') =]]
2121
```

0 commit comments

Comments
 (0)