Skip to content

Add table dpdpickup_price in database#34

Open
Alexandrebothamy wants to merge 5 commits into
thelia-modules:masterfrom
Alexandrebothamy:fix/add_db_dpdpickup
Open

Add table dpdpickup_price in database#34
Alexandrebothamy wants to merge 5 commits into
thelia-modules:masterfrom
Alexandrebothamy:fix/add_db_dpdpickup

Conversation

@Alexandrebothamy

Copy link
Copy Markdown

No description provided.

Comment thread Config/schema.xml Outdated
<column name="area_id" required="true" type="INTEGER" />
<column name="weight" type="DECIMAL" scale="2" size="16" />
<column name="price" required="true" type="DECIMAL" scale="2" size="16" />
<column name="created_at" type="TIMESTAMP" />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Je t'ai dit qu'il y avait <behavior name="timestampable" /> qui permettait de gérer automatiquement les colonnes created_at et updated_at, rajoute ça et vire ces 2 colonnes

Comment thread Config/schema.xml
<behavior name="timestampable" />
</table>
<external-schema filename="/home/benjamin/dev/thelia2/local/config/schema.xml" referenceOnly="true" />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Profite-en pour corriger l'indentation du fichier

Comment thread Config/thelia.sql
REFERENCES `customer_title` (`id`)
ON UPDATE RESTRICT
ON DELETE RESTRICT,
CONSTRAINT `fk_address_icirelais_country_id`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Utilise ce nom de FK dans le schema.xml plutot, fk_address_country_id est trop générique et fait plus penser à une contrainte entre la table address et la table country

Comment thread Config/thelia.sql
PRIMARY KEY (`id`)
) ENGINE=InnoDB;

INSERT INTO `icirelais_freeshipping`(`active`, `created_at`, `updated_at`) VALUES(0, NOW(), NOW());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idem que pour DpdClassic : les INSERT doivent être conservés et injectés à l'activation du module si les données ne sont pas déjà présentes

Comment thread Config/schema.xml

<table name="dpdpickup_price" namespace="DpdPickup\Model">
<column name="id" primaryKey="true" autoIncrement="true" required="true" type="INTEGER" />
<column name="area_id" required="true" type="INTEGER" />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pourquoi tu n'as pas mis de foreign key sur area_id ? C'est bien l'id de la table area non ?

Comment thread DpdPickup.php

$database->insertSql(null, array(__DIR__ . '/Config/thelia.sql'));
try {
DpdpickupPriceQuery::create()->findOne();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Manque le message à mettre dans un fichier insert.sql comme pour DpdClassic

@etiennePerriere

Copy link
Copy Markdown
Contributor

Plus ou moins les mêmes choses que sur DpdClassic, à corriger

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants