From ea5cdeb9343a75d495e12ae7a654dc348e25ce55 Mon Sep 17 00:00:00 2001 From: ale Date: Wed, 3 Jul 2024 19:23:37 -0300 Subject: [PATCH] traduccion columnas --- .../2024_07_03_215823_traduccion.php | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 database/migrations/2024_07_03_215823_traduccion.php diff --git a/database/migrations/2024_07_03_215823_traduccion.php b/database/migrations/2024_07_03_215823_traduccion.php new file mode 100644 index 0000000..926a361 --- /dev/null +++ b/database/migrations/2024_07_03_215823_traduccion.php @@ -0,0 +1,62 @@ +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'); + }); + } +};