Skip to content

Commit

Permalink
Fixed missing default value for visible field
Browse files Browse the repository at this point in the history
  • Loading branch information
Franck Allimant committed Mar 21, 2022
1 parent 159bb71 commit 2b4681e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Config/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<language>en_US</language>
<language>fr_FR</language>
</languages>
<version>1.1.18</version>
<version>1.1.19</version>
<authors>
<author>
<name>Maxime BRUCHET</name>
Expand Down
4 changes: 2 additions & 2 deletions Config/schema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<table name="selection" namespace="Selection\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER"/>
<column name="visible" required="true" type="TINYINT"/>
<column name="visible" required="true" default="false" type="TINYINT"/>
<column name="code" type="VARCHAR" size="255" />
<column name="title" type="VARCHAR" size="255" />
<column name="description" type="LONGVARCHAR" />
Expand Down Expand Up @@ -72,7 +72,7 @@

<table name="selection_container" namespace="Selection\Model" allowPkInsert="true">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER"/>
<column name="visible" required="true" type="TINYINT"/>
<column name="visible" required="true" default="false" type="TINYINT"/>
<column name="code" type="VARCHAR" size="255" />
<column name="title" type="VARCHAR" size="255" />
<column name="description" type="LONGVARCHAR" />
Expand Down
4 changes: 2 additions & 2 deletions Config/thelia.sql
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ DROP TABLE IF EXISTS `selection`;
CREATE TABLE `selection`
(
`id` INTEGER NOT NULL AUTO_INCREMENT,
`visible` TINYINT NOT NULL,
`visible` TINYINT DEFAULT false NOT NULL,
`code` VARCHAR(255),
`position` INTEGER,
`created_at` DATETIME,
Expand Down Expand Up @@ -107,7 +107,7 @@ DROP TABLE IF EXISTS `selection_container`;
CREATE TABLE `selection_container`
(
`id` INTEGER NOT NULL AUTO_INCREMENT,
`visible` TINYINT NOT NULL,
`visible` TINYINT DEFAULT false NOT NULL,
`code` VARCHAR(255),
`position` INTEGER,
`created_at` DATETIME,
Expand Down
6 changes: 6 additions & 0 deletions Config/update/1.1.19.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
SET FOREIGN_KEY_CHECKS = 0;

ALTER TABLE `selection` CHANGE `visible` `visible` tinyint(4) NOT NULL DEFAULT '1' AFTER `id`;
ALTER TABLE `selection_container` CHANGE `visible` `visible` tinyint(4) NOT NULL DEFAULT '1' AFTER `id`;

SET FOREIGN_KEY_CHECKS = 1;

0 comments on commit 2b4681e

Please sign in to comment.