Przeglądaj źródła

Correctif migrations

feature/souke
Guillaume Bourgeois 1 rok temu
rodzic
commit
8181256b48
33 zmienionych plików z 24 dodań i 188 usunięć
  1. +1
    -1
      common/components/TillerClient.php
  2. +1
    -1
      common/logic/Order/Order/Service/TillerManager.php
  3. +2
    -2
      console/migrations/m161012_074719_infos_boulanger.php
  4. +1
    -1
      console/migrations/m171227_090138_champs_priorite_developpement.php
  5. +1
    -0
      console/migrations/m181107_104051_add_champs_commande_deleted.php
  6. +1
    -0
      console/migrations/m181220_080234_translate_database.php
  7. +1
    -0
      console/migrations/m190109_080828_add_field_subscription_order.php
  8. +0
    -3
      console/migrations/m190205_164612_ajout_produit_don_aux_distributions_existantes.php
  9. +1
    -35
      console/migrations/m190226_084104_lien_utilisateur_point_de_vente.php
  10. +0
    -14
      console/migrations/m190515_122438_ajout_champs_price_product_subscription.php
  11. +1
    -1
      console/migrations/m190522_091006_option_comportement_annulation_commande.php
  12. +0
    -15
      console/migrations/m200108_145508_module_bl_devis_factures_suppression_price_unit_step_product_subscription.php
  13. +0
    -15
      console/migrations/m200108_195657_module_bl_devis_factures_order_status_history.php
  14. +1
    -1
      console/migrations/m200109_092028_module_bl_devis_factures_champs_status_document.php
  15. +0
    -1
      console/migrations/m200109_152833_module_bl_devis_factures_order_status_history_add_origin.php
  16. +2
    -1
      console/migrations/m200117_144356_user_ajout_champs_type.php
  17. +1
    -3
      console/migrations/m200117_161844_order_existantes_set_status.php
  18. +1
    -1
      console/migrations/m200601_073309_add_producer_options.php
  19. +0
    -15
      console/migrations/m200624_083903_product_distribution_change_column_quantity_max.php
  20. +1
    -0
      console/migrations/m201026_074711_option_email_confirm_producer.php
  21. +1
    -0
      console/migrations/m201218_071628_add_option_export_csv.php
  22. +1
    -0
      console/migrations/m201230_102708_add_option_export_csv.php
  23. +1
    -0
      console/migrations/m210303_090805_add_group_user_specific_prices.php
  24. +1
    -0
      console/migrations/m210317_122616_option_order_reference_type.php
  25. +1
    -0
      console/migrations/m210318_102840_add_option_allow_order_guest.php
  26. +0
    -15
      console/migrations/m210914_132350_add_options_online_payment.php
  27. +0
    -15
      console/migrations/m210915_064446_add_option_stripe_endpoint.php
  28. +0
    -15
      console/migrations/m210915_083421_add_option_stripe_mode_test.php
  29. +0
    -15
      console/migrations/m220823_084928_add_option_notify_producer_order_summary.php
  30. +1
    -1
      console/migrations/m220915_072309_producer_add_option_billing_frequency.php
  31. +1
    -1
      console/migrations/m220915_083713_producer_add_options_billing.php
  32. +1
    -1
      console/migrations/m220916_062206_add_column_document_tax_calculation_method.php
  33. +0
    -15
      console/migrations/m221109_100033_producer_add_option_display_message_new_opendistrib_version.php

+ 1
- 1
common/components/TillerClient.php Wyświetl plik

@@ -47,7 +47,7 @@ class TillerClient
var $restaurantToken;
var $urlApi = 'https://app.tillersystems.com/api/';

public function __construct(string $providerToken, string $restaurantToken)
public function __construct(string $providerToken = null, string $restaurantToken = null)
{
$this->curl = new curl\Curl();
$this->providerToken = $providerToken;

+ 1
- 1
common/logic/Order/Order/Service/TillerManager.php Wyświetl plik

@@ -11,7 +11,7 @@ use common\logic\Producer\Producer\Service\ProducerSolver;

class TillerManager extends AbstractManager
{
protected bool $tillerActivated;
protected ?bool $tillerActivated;
protected ProducerSolver $producerSolver;
protected TillerClient $tillerClient;
protected OrderSolver $orderSolver;

+ 2
- 2
console/migrations/m161012_074719_infos_boulanger.php Wyświetl plik

@@ -43,14 +43,14 @@ class m161012_074719_infos_boulanger extends Migration
{
public function up()
{
$this->addColumn('user', 'id_etablissement', Schema::TYPE_INTEGER) ;
//$this->addColumn('user', 'id_etablissement', Schema::TYPE_INTEGER) ;
//$this->addColumn('user', 'nom_magasin', Schema::TYPE_STRING) ;
//$this->addColumn('user', 'siret', Schema::TYPE_STRING) ;
}

public function down()
{
$this->dropColumn('user', 'id_etablissement') ;
//$this->dropColumn('user', 'id_etablissement') ;
//$this->dropColumn('user', 'nom_magasin') ;
//$this->dropColumn('user', 'siret') ;
}

+ 1
- 1
console/migrations/m171227_090138_champs_priorite_developpement.php Wyświetl plik

@@ -42,7 +42,7 @@ use yii\db\Schema;
class m171227_090138_champs_priorite_developpement extends Migration {

public function up() {
$this->addColumn('developpement_priorite','priorite',Schema::TYPE_STRING.' DEFAULT \''.DeveloppementPriorite::PRIORITE_NORMALE.'\'');
$this->addColumn('developpement_priorite','priorite',Schema::TYPE_STRING);
}

public function down() {

+ 1
- 0
console/migrations/m181107_104051_add_champs_commande_deleted.php Wyświetl plik

@@ -37,6 +37,7 @@ termes.
*/

use yii\db\Migration;
use yii\db\Schema;

class m181107_104051_add_champs_commande_deleted extends Migration
{

+ 1
- 0
console/migrations/m181220_080234_translate_database.php Wyświetl plik

@@ -1,6 +1,7 @@
<?php

use yii\db\Migration;
use yii\db\Schema;

class m181220_080234_translate_database extends Migration
{

+ 1
- 0
console/migrations/m190109_080828_add_field_subscription_order.php Wyświetl plik

@@ -1,6 +1,7 @@
<?php

use yii\db\Migration;
use yii\db\Schema;

class m190109_080828_add_field_subscription_order extends Migration {


+ 0
- 3
console/migrations/m190205_164612_ajout_produit_don_aux_distributions_existantes.php Wyświetl plik

@@ -5,10 +5,7 @@ use yii\db\Migration;
class m190205_164612_ajout_produit_don_aux_distributions_existantes extends Migration {

public function up() {
$distributionsArray = common\logic\Distribution\Distribution\Distribution::find()->all() ;
foreach($distributionsArray as $distribution) {

}
}

public function down() {

+ 1
- 35
console/migrations/m190226_084104_lien_utilisateur_point_de_vente.php Wyświetl plik

@@ -10,41 +10,7 @@ class m190226_084104_lien_utilisateur_point_de_vente extends Migration
{
public function up()
{
$producersArray = Producer::find()->all() ;
foreach($producersArray as $producer) {
$pointsSaleArray = PointSale::find()
->where([
'id_producer' => $producer->id
])
->all();
foreach($pointsSaleArray as $pointSale) {
$usersArray = UserModel::find()->innerJoin(
'order',
'user.id = order.id_user AND order.id_point_sale = :id_point_sale',
[':id_point_sale' => $pointSale->id]
)
->groupBy('user.id')
->all();
foreach($usersArray as $user) {
$userPointSale = UserPointSale::find()
->where([
'id_user' => $user->id,
'id_point_sale' => $pointSale->id
])->one() ;
if(!$userPointSale) {
$userPointSale = new UserPointSale() ;
$userPointSale->id_user = $user->id ;
$userPointSale->id_point_sale = $pointSale->id ;
$userPointSale->save() ;
}
}
}
}

}

public function down()

+ 0
- 14
console/migrations/m190515_122438_ajout_champs_price_product_subscription.php Wyświetl plik

@@ -2,25 +2,11 @@

use yii\db\Migration;
use yii\db\mysql\Schema;
use common\logic\Subscription\ProductSubscription\ProductSubscription;
use common\logic\Product\Product\Product;

class m190515_122438_ajout_champs_price_product_subscription extends Migration {

public function up() {
$this->addColumn('product_subscription', 'price', Schema::TYPE_FLOAT. ' DEFAULT 0') ;
$productsSubscriptionsArray = ProductSubscription::find()->all() ;
$productsArray = Product::find()->all() ;
foreach($productsSubscriptionsArray as $productSubscription) {
foreach($productsArray as $product) {
if($productSubscription->id_product == $product->id) {
$productSubscription->price = $product->price ;
$productSubscription->save() ;
}
}
}
}

public function down() {

+ 1
- 1
console/migrations/m190522_091006_option_comportement_annulation_commande.php Wyświetl plik

@@ -2,7 +2,7 @@

use yii\db\Migration;
use yii\db\mysql\Schema;
use common\logic\Producer\Producer\Producer;
use common\logic\Producer\Producer\Model\Producer;

class m190522_091006_option_comportement_annulation_commande extends Migration {


+ 0
- 15
console/migrations/m200108_145508_module_bl_devis_factures_suppression_price_unit_step_product_subscription.php Wyświetl plik

@@ -17,19 +17,4 @@ class m200108_145508_module_bl_devis_factures_suppression_price_unit_step_produc

return false;
}

/*
// Use up()/down() to run migration code without a transaction.
public function up()
{

}

public function down()
{
echo "m200108_145508_module_bl_devis_factures_suppression_price_unit_step_product_subscription cannot be reverted.\n";

return false;
}
*/
}

+ 0
- 15
console/migrations/m200108_195657_module_bl_devis_factures_order_status_history.php Wyświetl plik

@@ -21,19 +21,4 @@ class m200108_195657_module_bl_devis_factures_order_status_history extends Migra

return 'false';
}

/*
// Use up()/down() to run migration code without a transaction.
public function up()
{

}

public function down()
{
echo "m200108_195657_module_bl_devis_factures_order_status_history cannot be reverted.\n";

return false;
}
*/
}

+ 1
- 1
console/migrations/m200109_092028_module_bl_devis_factures_champs_status_document.php Wyświetl plik

@@ -2,7 +2,7 @@

use yii\db\Migration;
use yii\db\Schema;
use common\logic\Document\Document\Document
use common\logic\Document\Document\Model\Document;

class m200109_092028_module_bl_devis_factures_champs_status_document extends Migration
{

+ 0
- 1
console/migrations/m200109_152833_module_bl_devis_factures_order_status_history_add_origin.php Wyświetl plik

@@ -8,7 +8,6 @@ class m200109_152833_module_bl_devis_factures_order_status_history_add_origin ex
public function safeUp()
{
$this->addColumn('order_status_history', 'origin', Schema::TYPE_STRING);

}

public function safeDown()

+ 2
- 1
console/migrations/m200117_144356_user_ajout_champs_type.php Wyświetl plik

@@ -1,5 +1,6 @@
<?php

use common\logic\User\User\Model\User;
use yii\db\Migration;
use yii\db\Schema;

@@ -7,7 +8,7 @@ class m200117_144356_user_ajout_champs_type extends Migration
{
public function safeUp()
{
$this->addColumn('user', 'type', Schema::TYPE_STRING.' DEFAULT \''.UserModel::TYPE_INDIVIDUAL.'\'');
$this->addColumn('user', 'type', Schema::TYPE_STRING.' DEFAULT \''.User::TYPE_INDIVIDUAL.'\'');
$this->addColumn('user', 'name_legal_person', Schema::TYPE_STRING) ;
}


+ 1
- 3
console/migrations/m200117_161844_order_existantes_set_status.php Wyświetl plik

@@ -6,9 +6,7 @@ class m200117_161844_order_existantes_set_status extends Migration
{
public function safeUp()
{
Order::updateAll([
'status' => 'tmp-order'
]) ;

}

public function safeDown()

+ 1
- 1
console/migrations/m200601_073309_add_producer_options.php Wyświetl plik

@@ -2,7 +2,7 @@

use yii\db\Migration;
use yii\db\Schema;
use common\logic\Producer\Producer\Producer;
use common\logic\Producer\Producer\Model\Producer;

class m200601_073309_add_producer_options extends Migration
{

+ 0
- 15
console/migrations/m200624_083903_product_distribution_change_column_quantity_max.php Wyświetl plik

@@ -16,19 +16,4 @@ class m200624_083903_product_distribution_change_column_quantity_max extends Mig

return false;
}

/*
// Use up()/down() to run migration code without a transaction.
public function up()
{

}

public function down()
{
echo "m200624_083903_product_distribution_change_column_quantity_max cannot be reverted.\n";

return false;
}
*/
}

+ 1
- 0
console/migrations/m201026_074711_option_email_confirm_producer.php Wyświetl plik

@@ -1,6 +1,7 @@
<?php

use yii\db\Migration;
use yii\db\Schema;

class m201026_074711_option_email_confirm_producer extends Migration
{

+ 1
- 0
console/migrations/m201218_071628_add_option_export_csv.php Wyświetl plik

@@ -1,6 +1,7 @@
<?php

use yii\db\Migration;
use yii\db\Schema;

class m201218_071628_add_option_export_csv extends Migration
{

+ 1
- 0
console/migrations/m201230_102708_add_option_export_csv.php Wyświetl plik

@@ -1,6 +1,7 @@
<?php

use yii\db\Migration;
use yii\db\Schema;

class m201230_102708_add_option_export_csv extends Migration
{

+ 1
- 0
console/migrations/m210303_090805_add_group_user_specific_prices.php Wyświetl plik

@@ -1,6 +1,7 @@
<?php

use yii\db\Migration;
use yii\db\Schema;

class m210303_090805_add_group_user_specific_prices extends Migration
{

+ 1
- 0
console/migrations/m210317_122616_option_order_reference_type.php Wyświetl plik

@@ -1,6 +1,7 @@
<?php

use yii\db\Migration;
use yii\db\Schema;

class m210317_122616_option_order_reference_type extends Migration
{

+ 1
- 0
console/migrations/m210318_102840_add_option_allow_order_guest.php Wyświetl plik

@@ -1,6 +1,7 @@
<?php

use yii\db\Migration;
use yii\db\Schema;

class m210318_102840_add_option_allow_order_guest extends Migration
{

+ 0
- 15
console/migrations/m210914_132350_add_options_online_payment.php Wyświetl plik

@@ -25,19 +25,4 @@ class m210914_132350_add_options_online_payment extends Migration
$this->dropColumn('producer', 'option_stripe_public_key');
$this->dropColumn('producer', 'option_stripe_private_key');
}

/*
// Use up()/down() to run migration code without a transaction.
public function up()
{

}

public function down()
{
echo "m210914_132350_add_options_online_payment cannot be reverted.\n";

return false;
}
*/
}

+ 0
- 15
console/migrations/m210915_064446_add_option_stripe_endpoint.php Wyświetl plik

@@ -23,19 +23,4 @@ class m210915_064446_add_option_stripe_endpoint extends Migration
{
$this->dropColumn('producer', 'option_stripe_endpoint_secret');
}

/*
// Use up()/down() to run migration code without a transaction.
public function up()
{

}

public function down()
{
echo "m210915_064446_add_option_stripe_endpoint cannot be reverted.\n";

return false;
}
*/
}

+ 0
- 15
console/migrations/m210915_083421_add_option_stripe_mode_test.php Wyświetl plik

@@ -23,19 +23,4 @@ class m210915_083421_add_option_stripe_mode_test extends Migration
{
$this->dropColumn('producer', 'option_stripe_mode_test');
}

/*
// Use up()/down() to run migration code without a transaction.
public function up()
{

}

public function down()
{
echo "m210915_083421_add_option_stripe_mode_test cannot be reverted.\n";

return false;
}
*/
}

+ 0
- 15
console/migrations/m220823_084928_add_option_notify_producer_order_summary.php Wyświetl plik

@@ -27,19 +27,4 @@ class m220823_084928_add_option_notify_producer_order_summary extends Migration

return false;
}

/*
// Use up()/down() to run migration code without a transaction.
public function up()
{

}

public function down()
{
echo "m220823_084928_add_option_notify_producer_order_summary cannot be reverted.\n";

return false;
}
*/
}

+ 1
- 1
console/migrations/m220915_072309_producer_add_option_billing_frequency.php Wyświetl plik

@@ -2,7 +2,7 @@

use yii\db\Migration;
use yii\db\Schema;
use common\logic\Producer\Producer\Producer;
use common\logic\Producer\Producer\Model\Producer;

/**
* Class m220915_072309_producer_add_option_billing_frequency

+ 1
- 1
console/migrations/m220915_083713_producer_add_options_billing.php Wyświetl plik

@@ -2,7 +2,7 @@

use yii\db\Migration;
use yii\db\Schema;
use common\logic\Producer\Producer\Producer;
use common\logic\Producer\Producer\Model\Producer;

/**
* Class m220915_083713_producer_add_options_billing

+ 1
- 1
console/migrations/m220916_062206_add_column_document_tax_calculation_method.php Wyświetl plik

@@ -2,7 +2,7 @@

use yii\db\Migration;
use yii\db\Schema;
use common\logic\Document\Document\Document;
use common\logic\Document\Document\Model\Document;

/**
* Class m220916_062206_add_column_document_tax_calculation_method

+ 0
- 15
console/migrations/m221109_100033_producer_add_option_display_message_new_opendistrib_version.php Wyświetl plik

@@ -23,19 +23,4 @@ class m221109_100033_producer_add_option_display_message_new_opendistrib_version
{
$this->dropColumn('producer', 'option_display_message_new_opendistrib_version');
}

/*
// Use up()/down() to run migration code without a transaction.
public function up()
{

}

public function down()
{
echo "m221109_100033_producer_add_option_display_message_new_opendistrib_version cannot be reverted.\n";

return false;
}
*/
}

Ładowanie…
Anuluj
Zapisz