HOME


Mini Shell 1.0
DIR: /home/cardxfeb/www/database/migrations/
Upload File :
Current File : //home/cardxfeb/www/database/migrations/2025_02_14_183840_add_language_to_tables.php
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AddLanguageToTables extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('about_us', function (Blueprint $table) {
            $table->string('language',10)->after('id');
            $table->string('slug', 255)->after('language');
            $table->unique('slug');
        });

        Schema::table('banners', function (Blueprint $table) {
            $table->string('language',10)->after('id');
        });

        Schema::table('features', function (Blueprint $table) {
            $table->string('language',10)->after('id');
            $table->string('slug')->after('language');
        });

        Schema::table('front_faqs', function (Blueprint $table) {
            $table->string('language',10)->after('id');
        });

        Schema::table('front_testimonials', function (Blueprint $table) {
            $table->string('language',10)->after('id');
        });

        Schema::table('plans', function (Blueprint $table) {
            $table->string('language',10)->after('id');
        });

        Schema::table('products', function (Blueprint $table) {
            $table->string('language',10)->after('id');
        });

        Schema::table('settings', function (Blueprint $table) {
            $table->string('language',10)->after('id');
        });

        Schema::table('term_conditions', function (Blueprint $table) {
            $table->string('language',10)->after('id');
        });

        Schema::table('testimonials', function (Blueprint $table) {
            $table->string('language',10)->after('id');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('about_us', function (Blueprint $table) {
            $table->dropColumn('language');
        });

        Schema::table('banners', function (Blueprint $table) {
            $table->dropColumn('language');
        });

        Schema::table('features', function (Blueprint $table) {
            $table->dropColumn('language');
        });

        Schema::table('front_faqs', function (Blueprint $table) {
            $table->dropColumn('language');
        });

        Schema::table('front_testimonials', function (Blueprint $table) {
            $table->dropColumn('language');
        });

        Schema::table('plans', function (Blueprint $table) {
            $table->dropColumn('language');
        });

        Schema::table('products', function (Blueprint $table) {
            $table->dropColumn('language');
        });

        Schema::table('settings', function (Blueprint $table) {
            $table->dropColumn('language');
        });

        Schema::table('term_conditions', function (Blueprint $table) {
            $table->dropColumn('language');
        });

        Schema::table('testimonials', function (Blueprint $table) {
            $table->dropColumn('language');
        });
    }
}