File manager - Edit - /home/u816558632/domains/postills.com/public_html/public/database.zip
Back
PK �d�Z�쟱 .gitignorenu �[��� *.sqlite PK �d�Z�}��� � N migrations/2018_09_27_111609_modify_transactions_table_for_purchase_return.phpnu �[��� <?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. * * @return void */ public function up() { DB::statement("ALTER TABLE transactions MODIFY COLUMN type ENUM('purchase','sell', 'expense', 'stock_adjustment', 'sell_transfer', 'purchase_transfer', 'opening_stock', 'sell_return', 'opening_balance', 'purchase_return') DEFAULT NULL"); Schema::table('transactions', function (Blueprint $table) { $table->integer('return_parent_id')->nullable()->after('transfer_parent_id'); }); } /** * Reverse the migrations. * * @return void */ public function down() { // Schema::table('transactions', function (Blueprint $table) { // // // }); } }; PK �d�Z��Hx� � K migrations/2018_02_26_134500_add_commission_agent_to_transactions_table.phpnu �[��� <?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::table('transactions', function (Blueprint $table) { $table->integer('commission_agent')->nullable()->after('expense_for'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('transactions', function (Blueprint $table) { // }); } }; PK �d�Z��G� @ migrations/2022_04_21_083327_create_cash_denominations_table.phpnu �[��� <?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('cash_denominations', function (Blueprint $table) { $table->bigIncrements('id'); $table->integer('business_id'); $table->decimal('amount', 22, 4); $table->integer('total_count'); $table->morphs('model'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('cash_denominations'); } }; PK �d�Zfrt� � D migrations/2018_09_19_123914_create_notification_templates_table.phpnu �[��� <?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('notification_templates', function (Blueprint $table) { $table->increments('id'); $table->integer('business_id'); $table->string('template_for'); $table->text('email_body')->nullable(); $table->text('sms_body')->nullable(); $table->string('subject')->nullable(); $table->boolean('auto_send')->default(0); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('notification_templates'); } }; PK �d�Z� �� � P migrations/2023_01_28_114255_add_letter_head_column_to_invoice_layouts_table.phpnu �[��� <?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::table('invoice_layouts', function (Blueprint $table) { $table->boolean('show_letter_head')->default(0)->after('business_id'); $table->string('letter_head')->nullable()->after('show_letter_head'); }); } /** * Reverse the migrations. * * @return void */ public function down() { } }; PK �d�ZP�� � 6 migrations/2018_01_27_184322_create_printers_table.phpnu �[��� <?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('printers', function (Blueprint $table) { $table->increments('id'); $table->integer('business_id')->unsigned(); $table->foreign('business_id')->references('id')->on('business')->onDelete('cascade'); $table->string('name'); $table->enum('connection_type', ['network', 'windows', 'linux']); $table->enum('capability_profile', ['default', 'simple', 'SP2000', 'TEP-200M', 'P822D'])->default('default'); $table->string('char_per_line')->nullable(); $table->string('ip_address')->nullable(); $table->string('port')->nullable(); $table->string('path')->nullable(); $table->integer('created_by')->unsigned(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('printers'); } }; PK �d�Z���� � H migrations/2018_02_26_130519_modify_users_table_for_sales_cmmsn_agnt.phpnu �[��� <?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. * * @return void */ public function up() { DB::statement('ALTER TABLE users MODIFY COLUMN surname CHAR(10)'); Schema::table('users', function (Blueprint $table) { $table->char('contact_no', 15)->nullable()->after('language'); $table->text('address')->nullable()->after('contact_no'); $table->boolean('is_cmmsn_agnt')->default(0)->after('business_id'); $table->decimal('cmmsn_percent', 4, 2)->default(0)->after('is_cmmsn_agnt'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('users', function (Blueprint $table) { // }); } }; PK �d�Z/�ʱ E migrations/2018_05_18_191956_add_sell_return_to_transaction_table.phpnu �[��� <?php use Illuminate\Database\Migrations\Migration; return new class extends Migration { /** * Run the migrations. * * @return void */ public function up() { DB::statement("ALTER TABLE `transactions` CHANGE `type` `type` ENUM('purchase','sell','expense','stock_adjustment','sell_transfer','purchase_transfer','opening_stock','sell_return') DEFAULT NULL"); } /** * Reverse the migrations. * * @return void */ public function down() { // } }; PK �d�Z\6h� � R migrations/2018_05_31_114645_add_res_order_status_column_to_transactions_table.phpnu �[��� <?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::table('transactions', function (Blueprint $table) { $table->enum('res_order_status', ['received', 'cooked', 'served'])->nullable()->after('res_waiter_id'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('transactions', function (Blueprint $table) { }); } }; PK �d�ZX�f�( ( 7 migrations/2019_02_19_103118_create_discounts_table.phpnu �[��� <?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('discounts', function (Blueprint $table) { $table->increments('id'); $table->string('name'); $table->integer('business_id'); $table->integer('brand_id')->nullable(); $table->integer('category_id')->nullable(); $table->integer('location_id')->nullable(); $table->integer('priority')->nullable(); $table->string('discount_type')->nullable(); $table->decimal('discount_amount', 22, 4)->default(0); $table->dateTime('starts_at')->nullable(); $table->dateTime('ends_at')->nullable(); $table->boolean('is_active')->default(1); $table->boolean('applicable_in_spg')->default(0)->nullable(); $table->boolean('applicable_in_cg')->default(0)->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('discounts'); } }; PK �d�Z���L� � ? migrations/2019_09_04_184008_create_types_of_services_table.phpnu �[��� <?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('types_of_services', function (Blueprint $table) { $table->increments('id'); $table->string('name'); $table->text('description')->nullable(); $table->integer('business_id')->index(); $table->text('location_price_group')->nullable(); $table->decimal('packing_charge', 22, 4)->nullable(); $table->enum('packing_charge_type', ['fixed', 'percent'])->nullable(); $table->boolean('enable_custom_fields')->default(0); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('types_of_services'); } }; PK �d�ZEi�} } W migrations/2018_02_09_124945_modify_transaction_payments_table_for_contact_payments.phpnu �[��� <?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() { DB::statement('ALTER TABLE transaction_payments MODIFY COLUMN transaction_id INT(11) UNSIGNED DEFAULT NULL'); Schema::table('transaction_payments', function (Blueprint $table) { $table->integer('payment_for')->after('created_by')->nullable()->comment('stores the contact id'); $table->integer('parent_id')->after('payment_for')->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('transaction_payments', function (Blueprint $table) { // }); } }; PK �d�Z�t� � U migrations/2019_11_25_160340_modify_categories_table_for_polymerphic_relationship.phpnu �[��� <?php use App\Category; 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::table('categories', function (Blueprint $table) { $table->string('category_type')->nullable()->after('created_by'); $table->text('description')->nullable()->after('category_type'); $table->string('slug')->nullable()->after('description'); }); Schema::create('categorizables', function (Blueprint $table) { $table->integer('category_id'); $table->morphs('categorizable'); }); Category::whereNotNull('id')->update(['category_type' => 'product']); } /** * Reverse the migrations. * * @return void */ public function down() { } }; PK �d�Z|odl l L migrations/2019_09_23_161906_add_media_description_cloumn_to_media_table.phpnu �[��� <?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::table('media', function (Blueprint $table) { $table->text('description')->nullable()->after('file_name'); $table->integer('uploaded_by')->nullable()->after('description'); }); } /** * Reverse the migrations. * * @return void */ public function down() { } }; PK �d�Z^(ۃ � K migrations/2018_02_19_121537_stock_adjustment_move_to_transaction_table.phpnu �[��� <?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. * * @return void */ public function up() { DB::statement("ALTER TABLE `transactions` CHANGE `type` `type` ENUM('purchase','sell','expense','stock_adjustment') DEFAULT NULL"); DB::statement('SET FOREIGN_KEY_CHECKS = 0'); DB::statement('DROP TABLE IF EXISTS stock_adjustment_lines'); Schema::create('stock_adjustment_lines', function (Blueprint $table) { $table->increments('id'); $table->integer('transaction_id')->unsigned(); $table->foreign('transaction_id')->references('id')->on('transactions')->onDelete('cascade'); $table->integer('product_id')->unsigned(); $table->foreign('product_id')->references('id')->on('products')->onDelete('cascade'); $table->integer('variation_id')->unsigned(); $table->foreign('variation_id')->references('id')->on('variations') ->onDelete('cascade'); $table->decimal('quantity', 22, 4); $table->decimal('unit_price', 22, 4)->comment('Last purchase unit price')->nullable(); $table->timestamps(); //Indexing $table->index('transaction_id'); }); Schema::table('transactions', function (Blueprint $table) { $table->enum('adjustment_type', ['normal', 'abnormal'])->nullable()->after('payment_status'); $table->decimal('total_amount_recovered', 22, 4)->comment('Used for stock adjustment.')->nullable()->after('exchange_rate'); }); //Create & Rename stock_adjustment table. DB::statement('CREATE TABLE IF NOT EXISTS `stock_adjustments` (`id` int(11) DEFAULT NULL) '); Schema::rename('stock_adjustments', 'stock_adjustments_temp'); DB::statement('SET FOREIGN_KEY_CHECKS = 1'); } /** * Reverse the migrations. * * @return void */ public function down() { // } }; PK �d�Z�6� � B migrations/2018_11_28_104410_modify_units_table_for_multi_unit.phpnu �[��� <?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::table('units', function (Blueprint $table) { $table->integer('base_unit_id')->nullable()->after('allow_decimal'); $table->decimal('base_unit_multiplier', 20, 4)->nullable()->after('base_unit_id'); }); } /** * Reverse the migrations. * * @return void */ public function down() { } }; PK �d�Z��u�* * Q migrations/2019_11_19_170824_add_is_active_column_to_business_locations_table.phpnu �[��� <?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::table('business_locations', function (Blueprint $table) { $table->boolean('is_active')->default(1)->after('website'); }); } /** * Reverse the migrations. * * @return void */ public function down() { } }; PK �d�ZN8� 6 migrations/2018_02_07_173326_modify_business_table.phpnu �[��� <?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::table('business', function (Blueprint $table) { $table->boolean('purchase_in_diff_currency')->default(0)->after('enable_tooltip')->comment('Allow purchase to be in different currency then the business currency'); $table->integer('purchase_currency_id')->unsigned()->nullable()->references('id')->on('currencies')->after('purchase_in_diff_currency'); $table->decimal('p_exchange_rate', 5, 3)->default(1)->after('purchase_currency_id')->comment('1 Purchase currency = ? Base Currency'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('business', function (Blueprint $table) { // }); } }; PK �d�Z���� � D migrations/2023_06_21_033923_add_delivery_person_in_transactions.phpnu �[��� <?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::table('transactions', function (Blueprint $table) { $table->bigInteger('delivery_person')->nullable()->index()->after('delivered_to'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('transactions', function (Blueprint $table) { // }); } }; PK �d�Z�R/�� � M migrations/2018_05_22_154540_add_ref_no_prefixes_column_to_business_table.phpnu �[��� <?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::table('business', function (Blueprint $table) { $table->text('ref_no_prefixes')->nullable()->after('time_format'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('business', function (Blueprint $table) { // }); } }; PK �d�Z��D� � O migrations/2018_10_22_114441_add_columns_for_variable_product_modifications.phpnu �[��� <?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::table('product_variations', function (Blueprint $table) { $table->integer('variation_template_id')->nullable()->after('id'); }); Schema::table('variations', function (Blueprint $table) { $table->integer('variation_value_id')->nullable()->after('product_variation_id'); }); } /** * Reverse the migrations. * * @return void */ public function down() { // } }; PK �d�Zw9�H H g migrations/2018_10_03_104918_add_qty_returned_column_to_transaction_sell_lines_purchase_lines_table.phpnu �[��� <?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::table('transaction_sell_lines_purchase_lines', function (Blueprint $table) { $table->decimal('qty_returned', 22, 4)->default(0)->after('quantity'); }); } /** * Reverse the migrations. * * @return void */ public function down() { } }; PK �d�ZM,�& & G migrations/2020_12_29_165925_add_model_document_type_to_media_table.phpnu �[��� <?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::table('media', function (Blueprint $table) { $table->string('model_media_type')->nullable()->after('model_type'); }); } /** * Reverse the migrations. * * @return void */ public function down() { } }; PK �d�Z�h��z z V migrations/2021_08_25_114932_add_payment_link_fields_to_transaction_payments_table.phpnu �[��� <?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. * * @return void */ public function up() { DB::statement('ALTER TABLE transaction_payments MODIFY COLUMN created_by INT(11) DEFAULT NULL'); Schema::table('transaction_payments', function (Blueprint $table) { $table->boolean('paid_through_link')->default(0)->after('created_by'); $table->string('gateway')->nullable()->after('paid_through_link'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('transaction_payments', function (Blueprint $table) { // }); } }; PK �d�Z�6�� � O migrations/2020_09_21_123224_modify_booking_status_column_in_bookings_table.phpnu �[��� <?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. * * @return void */ public function up() { DB::statement('ALTER TABLE bookings MODIFY COLUMN `booking_status` VARCHAR(191) NOT NULL;'); Schema::table('bookings', function (Blueprint $table) { $table->index('booking_status'); }); } /** * Reverse the migrations. * * @return void */ public function down() { } }; PK �d�Z�� � � B migrations/2019_08_26_133419_update_price_fields_decimal_point.phpnu �[��� <?php use Illuminate\Database\Migrations\Migration; use Illuminate\Support\Facades\DB; return new class extends Migration { /** * Run the migrations. * * @return void */ public function up() { //Get all columns with type decimal(20, 2) $db_name = env('DB_DATABASE'); $columns = DB::select("SELECT distinct table_name, column_name, data_type, column_default from information_schema.columns where data_type='decimal' and table_schema='$db_name' and numeric_scale=2 and numeric_precision=20"); //Alter all columns foreach ($columns as $col) { if (! empty($col->table_name)) { $table_name = $col->table_name; $col_name = $col->column_name; $default = is_null($col->column_default) ? 'NULL' : $col->column_default; DB::statement("ALTER TABLE $table_name MODIFY COLUMN $col_name DECIMAL(22, 4) DEFAULT $default"); } } } /** * Reverse the migrations. * * @return void */ public function down() { // } }; PK �d�Zd��B B F migrations/2018_05_21_131607_invoice_layout_fields_for_sell_return.phpnu �[��� <?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::table('invoice_layouts', function (Blueprint $table) { $table->string('cn_heading')->after('design')->nullable()->comment('cn = credit note'); $table->string('cn_no_label')->after('cn_heading')->nullable(); $table->string('cn_amount_label')->after('cn_no_label')->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('invoice_layouts', function (Blueprint $table) { // }); } }; PK �d�Z;� � G migrations/2023_02_11_161510_add_event_column_to_activity_log_table.phpnu �[��� <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddEventColumnToActivityLogTable extends Migration { public function up() { Schema::connection(config('activitylog.database_connection'))->table(config('activitylog.table_name'), function (Blueprint $table) { $table->string('event')->nullable()->after('subject_type'); }); } public function down() { Schema::connection(config('activitylog.database_connection'))->table(config('activitylog.table_name'), function (Blueprint $table) { $table->dropColumn('event'); }); } } PK �d�Z[y�i B migrations/2021_02_11_172217_add_indexing_for_multiple_columns.phpnu �[��� <?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::table('accounts', function (Blueprint $table) { $table->index('business_id'); $table->index('account_type_id'); $table->index('created_by'); }); Schema::table('account_transactions', function (Blueprint $table) { $table->index('type'); $table->index('sub_type'); }); Schema::table('account_types', function (Blueprint $table) { $table->index('parent_account_type_id'); $table->index('business_id'); }); Schema::table('bookings', function (Blueprint $table) { $table->index('correspondent_id'); }); Schema::table('business_locations', function (Blueprint $table) { $table->index('sale_invoice_layout_id'); $table->index('selling_price_group_id'); $table->index('receipt_printer_type'); $table->index('printer_id'); }); Schema::table('cash_register_transactions', function (Blueprint $table) { $table->index('type'); $table->index('transaction_type'); }); Schema::table('categories', function (Blueprint $table) { $table->index('parent_id'); }); Schema::table('customer_groups', function (Blueprint $table) { $table->index('created_by'); }); Schema::table('discount_variations', function (Blueprint $table) { $table->index('discount_id'); $table->index('variation_id'); }); Schema::table('invoice_schemes', function (Blueprint $table) { $table->index('scheme_type'); }); Schema::table('media', function (Blueprint $table) { $table->index('business_id'); $table->index('uploaded_by'); }); Schema::table('products', function (Blueprint $table) { $table->index('type'); $table->index('tax_type'); $table->index('barcode_type'); }); Schema::table('product_racks', function (Blueprint $table) { $table->index('business_id'); $table->index('location_id'); $table->index('product_id'); }); Schema::table('reference_counts', function (Blueprint $table) { $table->index('business_id'); }); Schema::table('stock_adjustment_lines', function (Blueprint $table) { $table->index('lot_no_line_id'); }); Schema::table('transactions', function (Blueprint $table) { $table->index('res_table_id'); $table->index('res_waiter_id'); $table->index('res_order_status'); $table->index('payment_status'); $table->index('discount_type'); $table->index('commission_agent'); $table->index('transfer_parent_id'); $table->index('types_of_service_id'); $table->index('packing_charge_type'); $table->index('recur_parent_id'); $table->index('selling_price_group_id'); }); Schema::table('transaction_sell_lines', function (Blueprint $table) { $table->index('line_discount_type'); $table->index('discount_id'); $table->index('lot_no_line_id'); $table->index('sub_unit_id'); }); Schema::table('user_contact_access', function (Blueprint $table) { $table->index('user_id'); $table->index('contact_id'); }); Schema::table('warranties', function (Blueprint $table) { $table->index('business_id'); $table->index('duration_type'); }); } /** * Reverse the migrations. * * @return void */ public function down() { // } }; PK �d�Z��b b R migrations/2020_01_09_113252_add_cc_bcc_column_to_notification_templates_table.phpnu �[��� <?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::table('notification_templates', function (Blueprint $table) { $table->string('cc')->nullable()->after('subject'); $table->string('bcc')->nullable()->after('cc'); }); } /** * Reverse the migrations. * * @return void */ public function down() { } }; PK �d�ZN>xu u B migrations/2018_06_07_182258_add_image_field_to_products_table.phpnu �[��� <?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::table('products', function (Blueprint $table) { $table->string('image')->nullable()->after('weight'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('products', function (Blueprint $table) { // }); } }; PK �d�Z,�%�� � 6 migrations/2018_09_04_155900_create_accounts_table.phpnu �[��� <?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::dropIfExists('accounts'); Schema::create('accounts', function (Blueprint $table) { $table->increments('id'); $table->integer('business_id'); $table->string('name'); $table->string('account_number'); $table->enum('account_type', ['saving_current', 'capital'])->nullable(); $table->text('note')->nullable(); $table->integer('created_by'); $table->boolean('is_closed')->default(0); $table->softDeletes(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('accounts'); } }; PK �d�Z�·� � N migrations/2018_07_17_163920_add_theme_skin_color_column_to_business_table.phpnu �[��� <?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::table('business', function (Blueprint $table) { $table->char('theme_color', 20)->nullable()->after('ref_no_prefixes'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('business', function (Blueprint $table) { // }); } }; PK �d�Zw]H ? migrations/2019_12_05_183955_add_more_fields_to_users_table.phpnu �[��� <?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::table('users', function (Blueprint $table) { $table->string('gender')->nullable()->after('dob'); }); } /** * Reverse the migrations. * * @return void */ public function down() { } }; PK �d�ZvV�#� � U migrations/2020_07_23_104933_change_status_column_to_varchar_in_transaction_table.phpnu �[��� <?php use App\Transaction; use Illuminate\Database\Migrations\Migration; use Illuminate\Support\Facades\DB; return new class extends Migration { /** * Run the migrations. * * @return void */ public function up() { DB::statement('ALTER TABLE transactions MODIFY COLUMN `status` VARCHAR(191) NOT NULL;'); Transaction::where('type', 'sell_transfer') ->update(['status' => 'final']); Transaction::where('type', 'purchase_transfer') ->update(['status' => 'received']); } /** * Reverse the migrations. * * @return void */ public function down() { } }; PK �d�Z���m� � Q migrations/2018_11_28_170952_add_sub_unit_id_to_purchase_lines_and_sell_lines.phpnu �[��� <?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::table('purchase_lines', function (Blueprint $table) { $table->integer('sub_unit_id')->nullable()->after('lot_number'); }); Schema::table('transaction_sell_lines', function (Blueprint $table) { $table->integer('sub_unit_id')->nullable()->after('parent_sell_line_id'); }); } /** * Reverse the migrations. * * @return void */ public function down() { } }; PK �d�Z$�0$� � L migrations/2018_11_26_114135_add_is_suspend_column_to_transactions_table.phpnu �[��� <?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::table('transactions', function (Blueprint $table) { $table->boolean('is_suspend')->default(0)->after('is_direct_sale'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('transactions', function (Blueprint $table) { // }); } }; PK �d�Z�o� � e migrations/2018_07_26_170424_add_unit_price_before_discount_column_to_transaction_sell_line_table.phpnu �[��� <?php use App\TransactionSellLine; 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::table('transaction_sell_lines', function (Blueprint $table) { $table->decimal('unit_price_before_discount', 22, 4)->after('quantity')->default(0); }); //Set all unit_price_before_discount value same as unit_price value $sell_lines = TransactionSellLine::get(); foreach ($sell_lines as $sell_line) { $sell_line->unit_price_before_discount = $sell_line->unit_price; $sell_line->save(); } } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('transaction_sell_lines', function (Blueprint $table) { // }); } }; PK �d�ZA�G4 4 D migrations/2018_06_05_111905_modify_products_table_for_modifiers.phpnu �[��� <?php use Illuminate\Database\Migrations\Migration; use Illuminate\Support\Facades\DB; return new class extends Migration { /** * Run the migrations. * * @return void */ public function up() { DB::statement("ALTER TABLE products MODIFY COLUMN type ENUM('single','variable', 'modifier')"); DB::statement('ALTER TABLE products MODIFY COLUMN unit_id INT(11) UNSIGNED DEFAULT NULL'); } /** * Reverse the migrations. * * @return void */ public function down() { // } }; PK �d�Z�k` ` S migrations/2018_12_21_120659_add_recurring_invoice_fields_to_transactions_table.phpnu �[��� <?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::table('transactions', function (Blueprint $table) { $table->boolean('is_recurring')->default(0)->after('created_by'); $table->float('recur_interval', 22, 4)->nullable()->after('is_recurring'); $table->enum('recur_interval_type', ['days', 'months', 'years'])->nullable()->after('recur_interval'); $table->integer('recur_repetitions')->nullable()->after('recur_interval_type'); $table->dateTime('recur_stopped_on')->nullable()->after('recur_repetitions'); $table->integer('recur_parent_id')->nullable()->after('recur_stopped_on'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('transactions', function (Blueprint $table) { // }); } }; PK �d�Zh\�f� � ; migrations/2019_10_18_155633_create_account_types_table.phpnu �[��� <?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. * * @return void */ public function up() { Schema::create('account_types', function (Blueprint $table) { $table->increments('id'); $table->string('name'); $table->integer('parent_account_type_id')->nullable(); $table->integer('business_id'); $table->timestamps(); }); Schema::table('accounts', function (Blueprint $table) { $table->integer('account_type_id')->nullable()->after('account_number'); }); DB::statement('ALTER TABLE accounts DROP COLUMN account_type;'); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('account_types'); } }; PK �d�Z`�� ; migrations/2018_12_24_154933_create_notifications_table.phpnu �[��� <?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('notifications', function (Blueprint $table) { $table->uuid('id')->primary(); $table->string('type'); $table->morphs('notifiable'); $table->text('data'); $table->timestamp('read_at')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('notifications'); } }; PK �d�Z^Ta�* * L migrations/2020_10_23_170823_add_for_group_tax_column_to_tax_rates_table.phpnu �[��� <?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::table('tax_rates', function (Blueprint $table) { $table->boolean('for_tax_group')->default(0)->after('is_tax_group'); }); } /** * Reverse the migrations. * * @return void */ public function down() { } }; PK �d�Z�f8e� � >