traduccion columnas
This commit is contained in:
parent
ccfdb4bf11
commit
ea5cdeb934
|
@ -0,0 +1,62 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::table('barrios', function (Blueprint $table) {
|
||||||
|
$table->renameColumn('name', 'nombre');
|
||||||
|
});
|
||||||
|
Schema::table('categorias', function (Blueprint $table) {
|
||||||
|
$table->renameColumn('name', 'nombre');
|
||||||
|
});
|
||||||
|
Schema::table('pedidos', function (Blueprint $table) {
|
||||||
|
$table->renameColumn('name', 'nombre');
|
||||||
|
});
|
||||||
|
Schema::table('regiones', function (Blueprint $table) {
|
||||||
|
$table->renameColumn('name', 'nombre');
|
||||||
|
});
|
||||||
|
Schema::table('caracteristicas', function (Blueprint $table) {
|
||||||
|
$table->renameColumn('name', 'nombre');
|
||||||
|
$table->renameColumn('key', 'codigo');
|
||||||
|
});
|
||||||
|
Schema::table('productos', function (Blueprint $table) {
|
||||||
|
$table->renameColumn('name', 'nombre');
|
||||||
|
$table->renameColumn('price', 'precio');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::table('barrios', function (Blueprint $table) {
|
||||||
|
$table->renameColumn('nombre', 'name');
|
||||||
|
});
|
||||||
|
Schema::table('categorias', function (Blueprint $table) {
|
||||||
|
$table->renameColumn('nombre', 'name');
|
||||||
|
});
|
||||||
|
Schema::table('pedidos', function (Blueprint $table) {
|
||||||
|
$table->renameColumn('nombre', 'name');
|
||||||
|
});
|
||||||
|
Schema::table('regiones', function (Blueprint $table) {
|
||||||
|
$table->renameColumn('nombre', 'name');
|
||||||
|
});
|
||||||
|
Schema::table('caracteristicas', function (Blueprint $table) {
|
||||||
|
$table->renameColumn('nombre', 'name');
|
||||||
|
$table->renameColumn('codigo', 'key');
|
||||||
|
});
|
||||||
|
Schema::table('productos', function (Blueprint $table) {
|
||||||
|
$table->renameColumn('nombre', 'name');
|
||||||
|
$table->renameColumn('precio', 'price');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
Loading…
Reference in New Issue