PATH:
home
/
lab2454c
/
costbloc.com
/
database
/
migrations
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateSubscriptionInvoicesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('subscription_invoices', function (Blueprint $table) { $table->bigInteger('id', true); $table->date('invoice_date')->nullable()->index(); $table->date('due_date')->nullable(); $table->string('object_type', 45)->nullable()->index(); $table->bigInteger('object_id')->nullable()->index(); $table->string('description')->nullable(); $table->string('transaction_reference', 100)->nullable(); $table->string('billing_name', 100)->nullable(); $table->string('billing_email', 100)->nullable(); $table->string('billing_address', 100)->nullable(); $table->string('billing_address_2', 100)->nullable(); $table->string('billing_city', 100)->nullable(); $table->string('billing_zip', 45)->nullable(); $table->string('billing_state', 100)->nullable(); $table->string('billing_country', 45)->nullable(); $table->string('billing_phone', 45)->nullable(); $table->decimal('billed_amount', 16, 8)->nullable(); $table->decimal('received_amount', 16, 8)->nullable(); $table->decimal('discount_amount', 16, 8)->nullable(); $table->decimal('tax_amount', 16, 8)->nullable(); $table->decimal('balance_amount', 16, 8)->nullable()->comment('Balance has to be zero after payment. (Received + discount) - Billied'); $table->string('currency', 45)->default('USD'); $table->bigInteger('vendor_id')->nullable()->index(); $table->bigInteger('user_id')->nullable()->index(); $table->text('notes')->nullable(); $table->integer('is_resolved')->nullable()->default(0)->index(); $table->string('status', 20)->nullable()->default('Draft')->index(); $table->string('charged_customer_name', 100)->nullable(); $table->decimal('charged_amount', 16, 8)->nullable(); $table->string('charged_billing_method', 20)->nullable(); $table->string('charged_email', 100)->nullable(); $table->string('charged_card', 40)->nullable(); $table->dateTime('charged_at')->nullable(); $table->timestamp('created_at')->useCurrent(); $table->timestamp('updated_at')->useCurrentOnUpdate()->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('subscription_invoices'); } }
[+]
..
[-] 2021_10_10_065928_add_foreign_keys_to_favourites_table.php
[edit]
[-] 2021_10_10_065927_create_vendor_users_table.php
[edit]
[-] 2021_10_10_065927_create_flash_sales_table.php
[edit]
[-] 2022_01_18_072726_create_brand_stats_table.php
[edit]
[-] 2022_02_15_0000042_add_foreign_keys_to_user_withdrawal_settings_table.php
[edit]
[-] 2021_10_10_065928_add_foreign_keys_to_attributes_table.php
[edit]
[-] 2021_10_10_065928_add_foreign_keys_to_subscription_invoice_items_table.php
[edit]
[-] 2021_10_10_065928_add_foreign_keys_to_reviews_table.php
[edit]
[-] 2022_09_05_073603_add_foreign_keys_to_orders_meta_table.php
[edit]
[-] 2016_06_01_000005_create_oauth_personal_access_clients_table.php
[edit]
[-] 2021_10_10_065927_create_languages_table.php
[edit]
[-] 2022_01_31_093341_create_order_status_roles_table.php
[edit]
[-] 2021_10_10_065928_create_addresses_table.php
[edit]
[-] 2021_10_10_065927_create_categories_table.php
[edit]
[-] 2021_10_10_065927_create_reviews_table.php
[edit]
[-] 2021_10_10_065927_create_email_templates_table.php
[edit]
[-] 2021_11_25_072726_category_trigger.php
[edit]
[-] 2022_02_15_0000041_create_user_withdrawal_settings_table.php
[edit]
[-] 2021_10_10_065928_add_foreign_keys_to_product_tags_table.php
[edit]
[-] 2022_02_15_0000043_create_transactions_table.php
[edit]
[-] 2016_06_01_000001_create_oauth_auth_codes_table.php
[edit]
[-] 2022_05_18_094636_create_metas.php
[edit]
[-] 2022_05_18_092820_create_user_searches_table.php
[edit]
[-] 2021_10_10_065927_create_products_table.php
[edit]
[-] 2021_10_10_065928_add_foreign_keys_to_products_table.php
[edit]
[-] 2021_10_10_065927_create_category_attributes_table.php
[edit]
[-] 2021_10_10_065927_create_product_tags_table.php
[edit]
[-] 2021_10_10_065928_add_foreign_keys_to_product_cross_sales_table.php
[edit]
[-] 2021_10_10_065927_create_preferences_table.php
[edit]
[-] 2022_05_18_074840_create_users_meta.php
[edit]
[-] 2021_10_10_065927_create_role_users_table.php
[edit]
[-] 2021_10_10_065927_create_subscription_invoices_table.php
[edit]
[-] 2021_10_10_065927_create_vendors_table.php
[edit]
[-] 2021_10_10_065927_create_currencies_table.php
[edit]
[-] 2021_10_10_065927_create_email_configurations_table.php
[edit]
[-] 2016_06_01_000004_create_oauth_clients_table.php
[edit]
[-] 2021_12_16_111713_add_foreign_keys_to_order_details_table.php
[edit]
[-] 2022_02_13_0000035_create_wallets_table.php
[edit]
[-] 2021_10_10_065927_create_product_relates_table.php
[edit]
[-] 2022_02_15_0000044_add_foreign_keys_to_transactions_table.php
[edit]
[-] 2022_01_18_072726_create_category_stats_table.php
[edit]
[-] 2021_10_10_065928_add_foreign_keys_to_product_relates_table.php
[edit]
[-] 2022_06_01_052414_add_foreign_keys_to_order_note_histories_table.php
[edit]
[-] 2021_10_10_065927_create_attribute_groups_table.php
[edit]
[-] 2021_10_10_065928_add_foreign_keys_to_attribute_values_table.php
[edit]
[-] 2021_10_10_065927_create_users_table.php
[edit]
[-] 2021_10_10_065929_add_foreign_keys_to_addresses_table.php
[edit]
[-] 2021_10_10_065927_create_locations_table.php
[edit]
[-] 2021_11_25_072702_tag_trigger.php
[edit]
[-] 2021_10_10_065927_create_product_categories_table.php
[edit]
[-] 2021_10_10_065928_add_foreign_keys_to_categories_table.php
[edit]
[-] 2021_10_10_065927_create_tags_table.php
[edit]
[-] 2021_10_10_065927_create_product_cross_sales_table.php
[edit]
[-] 2021_10_10_065928_add_foreign_keys_to_permission_roles_table.php
[edit]
[-] 2021_10_10_065928_add_foreign_keys_to_role_users_table.php
[edit]
[-] 2021_10_10_065928_add_foreign_keys_to_product_categories_table.php
[edit]
[-] 2022_06_07_050839_create_products_meta_table.php
[edit]
[-] 2021_10_10_065927_create_translations_table.php
[edit]
[-] 2021_10_10_065927_create_brands_table.php
[edit]
[-] 2016_06_01_000003_create_oauth_refresh_tokens_table.php
[edit]
[-] 2022_10_30_062626_create_activity_log_table.php
[edit]
[-] 2021_10_10_065928_add_foreign_keys_to_vendor_users_table.php
[edit]
[-] 2021_10_10_065927_create_backups_table.php
[edit]
[-] 2021_10_10_065927_create_subscription_invoice_items_table.php
[edit]
[-] 2021_10_10_065928_add_foreign_keys_to_email_templates_table.php
[edit]
[-] 2021_10_10_065927_create_password_resets_table.php
[edit]
[-] 2022_01_31_093342_add_foreign_keys_to_order_status_roles_table.php
[edit]
[-] 2022_04_06_104629_add_foreign_keys_to_seos_table.php
[edit]
[-] 2022_01_18_072726_product_trigger.php
[edit]
[-] 2021_12_16_111710_create_orders_table.php
[edit]
[-] 2021_11_25_072727_product_category_trigger.php
[edit]
[-] 2021_10_10_065927_create_failed_jobs_table.php
[edit]
[-] 2021_10_10_065927_create_favourites_table.php
[edit]
[-] 2021_10_10_065928_add_foreign_keys_to_wishlists_table.php
[edit]
[-] 2022_01_31_093451_add_foreign_keys_to_order_status_histories_table.php
[edit]
[-] 2016_06_01_000002_create_oauth_access_tokens_table.php
[edit]
[-] 2022_02_13_0000037_add_foreign_keys_to_wallets_table.php
[edit]
[-] 2021_12_16_111712_create_order_details_table.php
[edit]
[-] 2021_10_10_065927_create_wishlists_table.php
[edit]
[-] 2021_10_10_065927_create_countries_table.php
[edit]
[-] 2022_08_22_073603_add_foreign_keys_to_products_meta_table.php
[edit]
[-] 2021_10_10_065927_create_permissions_table.php
[edit]
[-] 2022_09_04_050839_create_orders_meta_table.php
[edit]
[-] 2021_10_10_065928_add_foreign_keys_to_category_attributes_table.php
[edit]
[-] 2022_06_01_052314_create_order_note_histories_table.php
[edit]
[-] 2021_12_16_111707_create_order_statuses_table.php
[edit]
[-] 2021_10_10_065928_add_foreign_keys_to_brands_table.php
[edit]
[-] 2022_02_15_0000040_create_withdrawal_methods_table.php
[edit]
[-] 2021_10_10_065928_add_foreign_keys_to_flash_sales_table.php
[edit]
[-] 2021_10_10_065928_add_foreign_keys_to_attribute_groups_table.php
[edit]
[-] 2021_10_10_065928_add_foreign_keys_to_roles_table.php
[edit]
[-] 2021_10_10_065928_add_foreign_keys_to_tags_table.php
[edit]
[-] 2021_10_10_065927_create_attributes_table.php
[edit]
[-] 2022_01_31_093450_create_order_status_histories_table.php
[edit]
[-] 2021_10_10_065928_add_foreign_keys_to_product_upsales_table.php
[edit]
[-] 2022_05_18_092821_add_foreign_keys_to_user_searches_table.php
[edit]
[-] 2022_04_06_104628_create_seos_table.php
[edit]
[-] 2022_01_18_072726_create_product_stats_table.php
[edit]
[-] 2021_12_16_111711_add_foreign_keys_to_orders_table.php
[edit]
[-] 2021_10_10_065927_create_permission_roles_table.php
[edit]
[-] 2021_10_10_065927_create_product_upsales_table.php
[edit]
[-] 2022_05_18_092750_create_searches_table.php
[edit]
[-] 2021_10_10_065927_create_subscription_quotes_table.php
[edit]
[-] 2021_10_10_065927_create_attribute_values_table.php
[edit]
[-] 2022_10_03_060019_create_vendors_meta_table.php
[edit]
[-] 2021_10_10_065927_create_roles_table.php
[edit]