-
Notifications
You must be signed in to change notification settings - Fork 14
Add table dpdpickup_price in database #34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add table dpdpickup_price in database #34
Conversation
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" /> |
There was a problem hiding this comment.
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
| <behavior name="timestampable" /> | ||
| </table> | ||
| <external-schema filename="/home/benjamin/dev/thelia2/local/config/schema.xml" referenceOnly="true" /> | ||
|
|
There was a problem hiding this comment.
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
| REFERENCES `customer_title` (`id`) | ||
| ON UPDATE RESTRICT | ||
| ON DELETE RESTRICT, | ||
| CONSTRAINT `fk_address_icirelais_country_id` |
There was a problem hiding this comment.
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
| PRIMARY KEY (`id`) | ||
| ) ENGINE=InnoDB; | ||
|
|
||
| INSERT INTO `icirelais_freeshipping`(`active`, `created_at`, `updated_at`) VALUES(0, NOW(), NOW()); |
There was a problem hiding this comment.
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
|
|
||
| <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" /> |
There was a problem hiding this comment.
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 ?
|
|
||
| $database->insertSql(null, array(__DIR__ . '/Config/thelia.sql')); | ||
| try { | ||
| DpdpickupPriceQuery::create()->findOne(); |
There was a problem hiding this comment.
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
390e2b7 to
4c8f127
Compare
|
Plus ou moins les mêmes choses que sur DpdClassic, à corriger |
4c8f127 to
9b38a77
Compare
No description provided.