Skip to content

Commit

Permalink
Merge pull request #13 from lopes-vincent/longtext_value
Browse files Browse the repository at this point in the history
Change value DB type to longtext
  • Loading branch information
lopes-vincent authored Dec 16, 2020
2 parents 674a18a + 73c9070 commit 0aac0d7
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Config/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<language>en_US</language>
<language>fr_FR</language>
</languages>
<version>1.3.2</version>
<version>1.3.3</version>
<author>
<name>Gilles Bourgeat</name>
<email>gilles.bourgeat@gmail.com</email>
Expand Down
2 changes: 1 addition & 1 deletion Config/schema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<column name="attribute_av_id" required="true" type="INTEGER" />
<column name="attribute_attribute_type_id" required="true" type="INTEGER" />
<column name="locale" size="5" required="true" type="VARCHAR" default="en_US" />
<column name="value" size="255" type="VARCHAR" />
<column name="value" type="CLOB" />

<foreign-key foreignTable="attribute_av" name="fk_attribute_av_meta_attribute_av_id" onDelete="CASCADE">
<reference foreign="id" local="attribute_av_id" />
Expand Down
2 changes: 2 additions & 0 deletions Config/sqldb.map
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Sqlfile -> Database map
thelia.sql=thelia
8 changes: 4 additions & 4 deletions Config/thelia.sql
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ CREATE TABLE `attribute_attribute_type`
`attribute_type_id` INTEGER NOT NULL,
PRIMARY KEY (`id`),
UNIQUE INDEX `attribute_attribute_type_unique` (`attribute_id`, `attribute_type_id`),
INDEX `FI_attribute_attribute_type_attribute_type_id` (`attribute_type_id`),
INDEX `fi_attribute_attribute_type_attribute_type_id` (`attribute_type_id`),
CONSTRAINT `fk_attribute_attribute_type_attribute_id`
FOREIGN KEY (`attribute_id`)
REFERENCES `attribute` (`id`)
Expand All @@ -68,12 +68,12 @@ CREATE TABLE `attribute_type_av_meta`
`attribute_av_id` INTEGER NOT NULL,
`attribute_attribute_type_id` INTEGER NOT NULL,
`locale` VARCHAR(5) DEFAULT 'en_US' NOT NULL,
`value` VARCHAR(255),
`value` LONGTEXT,
`created_at` DATETIME,
`updated_at` DATETIME,
PRIMARY KEY (`id`),
UNIQUE INDEX `attribute_type_av_meta_unique` (`attribute_av_id`, `attribute_attribute_type_id`, `locale`),
INDEX `FI_attribute_av_meta_attribute_attribute_type_id` (`attribute_attribute_type_id`),
INDEX `fi_attribute_av_meta_attribute_attribute_type_id` (`attribute_attribute_type_id`),
CONSTRAINT `fk_attribute_av_meta_attribute_av_id`
FOREIGN KEY (`attribute_av_id`)
REFERENCES `attribute_av` (`id`)
Expand All @@ -97,7 +97,7 @@ CREATE TABLE `attribute_type_i18n`
`title` VARCHAR(255),
`description` LONGTEXT,
PRIMARY KEY (`id`,`locale`),
CONSTRAINT `attribute_type_i18n_FK_1`
CONSTRAINT `attribute_type_i18n_fk_3cf0df`
FOREIGN KEY (`id`)
REFERENCES `attribute_type` (`id`)
ON DELETE CASCADE
Expand Down
1 change: 1 addition & 0 deletions Config/update/1.3.3.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE attribute_type_av_meta MODIFY COLUMN `value` LONGTEXT;

0 comments on commit 0aac0d7

Please sign in to comment.