add nom to xml_incos

null lst_allergenes
This commit is contained in:
Olivier Legat 2022-03-12 12:04:40 +01:00
parent 70c7dc53e0
commit 8b3c3f31be
3 changed files with 35 additions and 1 deletions

View file

@ -61,6 +61,7 @@ class XmlIncoReader extends XmlJobs
'INCO_COMPO' => 'inco_compo', // Consider this sub array
'INCO_COMPO.NOM' => 'nom',
'INCO_COMPO.TAILLE_REF' => 'taille_ref',
'INCO_COMPO.VAL_ENERG_KJ_NUT' => 'val_energ_kj_nut',
'INCO_COMPO.VAL_ENERG_KJ_R' => 'val_energ_kj_r', //_R apports de la taille_ref
@ -168,7 +169,7 @@ class XmlIncoReader extends XmlJobs
'allegations',
'astuces', 'arg_vente',
'pds_moy_theo',
'lib_conso', 'lst_ing',
'lib_conso', 'lst_ing', 'lst_allergene',
'allegat_sante', 'allegat_nutrit', 'allegat_autre',
'inco_compo',
'inco_compo.nom',

View file

@ -16,6 +16,7 @@ class XmlInco extends Model
protected $fillable = [
'id',
'no_art',
'nom',
'prod_saison',
'allegations',
'conseil_prepa',

View file

@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddNomToXmlIncosTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('xml_incos', function (Blueprint $table) {
$table->string('nom')->nullable()->after('id');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('xml_incos', function (Blueprint $table) {
$table->dropColumn('nom');
});
}
}