From 7ca7f4adee7eafe42d75eeb820834dc0d7739536 Mon Sep 17 00:00:00 2001 From: Guillem Dolcet Date: Tue, 17 Feb 2026 13:05:13 +0100 Subject: [PATCH] modify database names --- ...3_create_table_exp_mgt_analysis_header.php | 6 +- ...46_create_table_exp_mgt_analysis_lines.php | 110 +++++++++--------- 2 files changed, 59 insertions(+), 57 deletions(-) diff --git a/database/migrations/2025_11_12_144023_create_table_exp_mgt_analysis_header.php b/database/migrations/2025_11_12_144023_create_table_exp_mgt_analysis_header.php index a3a5b7c..2da67ab 100644 --- a/database/migrations/2025_11_12_144023_create_table_exp_mgt_analysis_header.php +++ b/database/migrations/2025_11_12_144023_create_table_exp_mgt_analysis_header.php @@ -12,9 +12,9 @@ return new class extends Migration public function up(): void { Schema::create('exp_mgt_analysis_header', static function (Blueprint $table) { - $table->id('IDEXP_MGT_ANALYSIS_HEADER'); - $table->timestamp('CREATION_DATE'); - $table->integer('CREATED_BY'); + $table->id('idexp_mgt_analysis_header'); + $table->timestamp('creation_date'); + $table->integer('created_by'); }); } diff --git a/database/migrations/2025_11_12_144446_create_table_exp_mgt_analysis_lines.php b/database/migrations/2025_11_12_144446_create_table_exp_mgt_analysis_lines.php index 7b68362..3699e8e 100644 --- a/database/migrations/2025_11_12_144446_create_table_exp_mgt_analysis_lines.php +++ b/database/migrations/2025_11_12_144446_create_table_exp_mgt_analysis_lines.php @@ -12,61 +12,63 @@ return new class extends Migration public function up(): void { Schema::create("exp_mgt_analysis_lines", function (Blueprint $table) { - $table->id("IDEXP_MGT_ANALYSIS_LINES"); - $table->unsignedBigInteger("IDEXP_MGT_ANALYSIS_HEADER"); - $table->string("CUSTOMER_GROUP_CODE", 20)->nullable(); - $table->string("ITEMCODE", 50); - $table->string("MTH", 50); - $table->string("ORG", 50); - $table->string("AREA", 50); - $table->string("LOC_CUR", 50); - $table->string("CUST_GRP", 50)->nullable(); - $table->string("ITEM_CODE"); - $table->string("ITEM_DESC", 50); - $table->string("GIM_ID", 25); - $table->string("GIM_CAT_NUM", 50); - $table->string("GIM_DESC", 50); - $table->string("GIM_STER_FLAG", 50); - $table->string("BRAND", 50); - $table->string("SUB_BRAND", 50); - $table->string("GIM_ITEM_TYPE", 100)->nullable(); - $table->string("FRANCHISE", 50); - $table->string("SUB_FRANCHISE", 50); - $table->integer("GIM_LCC"); - $table->integer("ELA_ITEM_STATUS"); - $table->decimal("ITEM_MGT_COST"); - $table->string("RSM", 50)->nullable(); - $table->string("REP", 50)->nullable(); - $table->string("SAPG", 50)->nullable(); - $table->string("EARL_IMPL_DATE", 50)->nullable(); - $table->integer("LTC_QTY"); - $table->integer("LTC_QTY_INCL_PND"); - $table->integer("LTC_QTY_PND"); - $table->integer("LTC_IMP_QTY"); - $table->decimal("LTC_IMP_VAL"); - $table->decimal("LTC_INV_VAL_INCL_PND"); - $table->decimal("SAL_AMT_3_MTH_LC", 12); - $table->decimal("SAL_AMT_6_MTH_LC", 12); - $table->decimal("SAL_AMT_12_MTH_LC", 12); - $table->integer("SAL_QTY_3_MTH"); - $table->integer("SAL_QTY_6_MTH"); - $table->integer("SAL_QTY_12_MTH"); - $table->decimal("SAL_QTY_AVG"); - $table->integer("SAL_QTY_MAX"); - $table->decimal("SAL_QTY_STDDEV"); - $table->decimal("TWELVE_MTH_COGS", 12); - $table->decimal("TWELVE_MTH_COGS_CALC", 12); - $table->integer("OPT_QTY_COL"); - $table->decimal("OPT_VAL_COL"); - $table->decimal("DOH"); - $table->decimal("OPTY"); - $table->integer("LINE_NUMBER"); - $table->string("CUSTOMER_NUMBER", 50)->nullable(); - $table->timestamp("CREATIONDATE"); - $table->string("CREATEDBY", 100); - $table->string("CUSTOMER_GROUP_NAME", 50); + $table->id('idexp_mgt_analysis_lines'); + $table->unsignedBigInteger('idexp_mgt_analysis_header'); + $table->string('customer_group_code', 20)->nullable(); + $table->string('itemcode', 50); + $table->string('mth', 50); + $table->string('org', 50); + $table->string('area', 50); + $table->string('loc_cur', 50); + $table->string('cust_grp', 50)->nullable(); + $table->string('item_code'); + $table->string('item_desc', 50); + $table->string('gim_id', 25); + $table->string('gim_cat_num', 50); + $table->string('gim_desc', 50); + $table->string('gim_ster_flag', 50); + $table->string('brand', 50); + $table->string('sub_brand', 50); + $table->string('gim_item_type', 100)->nullable(); + $table->string('franchise', 50); + $table->string('sub_franchise', 50); + $table->integer('gim_lcc'); + $table->integer('ela_item_status'); + $table->decimal('item_mgt_cost'); + $table->string('rsm', 50)->nullable(); + $table->string('rep', 50)->nullable(); + $table->string('sapg', 50)->nullable(); + $table->string('earl_impl_date', 50)->nullable(); + $table->integer('ltc_qty'); + $table->integer('ltc_qty_incl_pnd'); + $table->integer('ltc_qty_pnd'); + $table->integer('ltc_imp_qty'); + $table->decimal('ltc_imp_val'); + $table->decimal('ltc_inv_val_incl_pnd'); + $table->decimal('sal_amt_3_mth_lc', 12); + $table->decimal('sal_amt_6_mth_lc', 12); + $table->decimal('sal_amt_12_mth_lc', 12); + $table->integer('sal_qty_3_mth'); + $table->integer('sal_qty_6_mth'); + $table->integer('sal_qty_12_mth'); + $table->decimal('sal_qty_avg'); + $table->integer('sal_qty_max'); + $table->decimal('sal_qty_stddev'); + $table->decimal('twelve_mth_cogs', 12); + $table->decimal('twelve_mth_cogs_calc', 12); + $table->integer('opt_qty_col'); + $table->decimal('opt_val_col'); + $table->decimal('doh'); + $table->decimal('opty'); + $table->integer('line_number'); + $table->string('customer_number', 50)->nullable(); + $table->timestamp('creationdate'); + $table->string('createdby', 100); + $table->string('customer_group_name', 50); - $table->foreign("IDEXP_MGT_ANALYSIS_HEADER")->references("IDEXP_MGT_ANALYSIS_HEADER")->on("exp_mgt_analysis_header"); + $table->foreign('idexp_mgt_analysis_header') + ->references('idexp_mgt_analysis_header') + ->on('exp_mgt_analysis_header'); }); }