多🌹444收拾收拾计算机视觉手机手机手机手机4大尺寸惆怅长岑长 ??????????????????????????С??????????????P??????????????????????????????????????????????????????^?????????? ????j?????????? ? PNG ?%k25u25%fgd5n!? PNG ?%k25u25%fgd5n!? PNG ?%k25u25%fgd5n!? PNG ?%k25u25%fgd5n!2024_12_20_104536_add_status_to_photo_studios_table.php000064400000001264152665565410016362 0ustar00string('status')->nullable(); $table->string('request_id')->nullable(); $table->text('photo')->nullable()->change(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('photo_studios', function (Blueprint $table) { // }); } }; 2024_12_17_113420_remove_deprecated_runway_models_from_db.php000064400000000543152665565410017505 0ustar00id(); $table->string('title')->nullable(); $table->string('role')->nullable(); $table->string('model')->nullable(); $table->string('first_message')->nullable(); $table->text('instructions')->nullable(); $table->string('image')->nullable(); $table->string('color')->nullable(); $table->string('width')->nullable(); $table->string('height')->nullable(); $table->timestamps(); }); } public function down(): void { Schema::dropIfExists('chatbot'); } }; 2023_06_23_141415_create_webhookhistory_table.php000064400000002356152665565410015152 0ustar00id(); $table->string('gatewaycode')->nullable(); $table->string('webhook_id')->nullable(); $table->string('create_time')->nullable(); $table->string('resource_type')->nullable(); $table->string('event_type')->nullable(); $table->string('summary')->nullable(); $table->string('resource_id')->nullable(); $table->string('resource_state')->nullable(); $table->string('parent_payment')->nullable(); $table->string('amount_total')->nullable(); $table->string('amount_currency')->nullable(); $table->text('incoming_json')->nullable(); $table->string('status')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('webhookhistory'); } }; 2023_03_01_134013_create_user_orders_table.php000064400000001724152665565410014411 0ustar00id(); $table->string('order_id')->nullable(); $table->unsignedBigInteger('plan_id')->nullable(); $table->foreign('plan_id')->references('id')->on('plans')->nullOnDelete(); $table->string('payment_type')->nullable(); $table->double('price')->nullable(); $table->string('status')->default('Waiting'); $table->string('country')->default('United States of America'); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('user_orders'); } }; 2024_02_21_100405_add_theme_column_to_settings_table.php000064400000001161152665565410016436 0ustar00string('theme')->default('default')->after('id'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('settings_two', function (Blueprint $table) { $table->dropColumn('theme'); }); } }; 2024_02_21_180426_add_status_to_chatbot_table.php000064400000001126152665565410015102 0ustar00string('status') ->nullable() ->default('not-trained') ->after('height'); }); } public function down(): void { Schema::table('chatbot', function (Blueprint $table) { $table->dropColumn('status'); }); } }; 2024_01_25_120049_update_helps_with_column_in_openai_chat_category_table.php000064400000001137152665565410022543 0ustar00text('helps_with')->nullable()->change(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('openai_chat_category', function (Blueprint $table) { // }); } }; 2023_04_24_144953_create_activity_table.php000064400000001417152665565410013734 0ustar00id(); $table->unsignedBigInteger('user_id')->nullable(); $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); $table->text('activity')->nullable(); $table->text('url')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('activity'); } }; 2023_09_19_151726_create_coupons_table.php000064400000001474152665565410013576 0ustar00id(); $table->string('name'); $table->string('code'); $table->decimal('discount', 5, 2); $table->integer('limit')->nullable(); $table->unsignedBigInteger('created_by'); $table->foreign('created_by')->references('id')->on('users'); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('coupons'); } }; 2024_07_19_184746_add_cols_to_frontend_sections_statuses_titles_table.php000064400000001224152665565410022164 0ustar00text('marquee_items')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('frontend_sections_statuses_titles', function (Blueprint $table) { $table->dropColumn('marquee_items'); }); } }; 2023_05_10_120716_add_filters_to_openai_table.php000064400000001122152665565410015046 0ustar00text('filters')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('openai', function (Blueprint $table) { $table->dropColumn('filters'); }); } }; 2023_06_01_124212_create_frontend_footer_settings_table.php000064400000003667152665565410017205 0ustar00id(); $table->string('header_title')->default('Limited Offer'); $table->string('header_text')->default('Sign up and receive 20% bonus discount on checkout.'); $table->string('hero_subtitle')->default('Unleash the Power of AI'); $table->string('hero_title')->default('Ultimate AI'); $table->string('hero_description')->default('All-in-one platform to generate AI content and start making money in minutes.'); $table->string('hero_scroll_text')->default('Discover MagicAI'); $table->string('hero_button')->default('Start Making Money'); $table->string('hero_button_url')->nullable('https://codecanyon.net/item/magicai-openai-content-text-image-chat-code-generator-as-saas/45408109'); $table->string('footer_header')->default('Start your free trial.'); $table->string('footer_text_small')->default('Pay once, own forever.'); $table->string('footer_text')->default('Unlock your business potential by letting the AI work and generate money for you.'); $table->string('footer_button_text')->default('Join our community'); $table->string('footer_button_url')->default('https://codecanyon.net/item/magicai-openai-content-text-image-chat-code-generator-as-saas/45408109'); $table->string('footer_copyright')->default('All images are for demo purposes.'); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('frontend_footer_settings'); } }; 2024_06_03_145735_create_gateway_taxes_table.php000064400000001152152665565410014740 0ustar00id(); $table->integer('gateway_id')->nullable(); $table->string('country_code')->nullable(); $table->decimal('tax', 8, 2)->nullable(); $table->timestamps(); }); } public function down(): void { Schema::dropIfExists('gateway_taxes'); } }; 2019_12_14_000001_create_personal_access_tokens_table.php000064400000001530152665565410016575 0ustar00id(); $table->morphs('tokenable'); $table->string('name'); $table->string('token', 64)->unique(); $table->text('abilities')->nullable(); $table->timestamp('last_used_at')->nullable(); $table->timestamp('expires_at')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('personal_access_tokens'); } }; 2024_04_18_121537_add_defi_setting_to_users_table.php000064400000001031152665565410015741 0ustar00text('defi_setting')->after('remember_token')->nullable(); }); } public function down(): void { Schema::table('users', function (Blueprint $table) { $table->dropColumn('defi_setting'); }); } }; 2024_03_14_061720_add_user_id_to_openai_filters_table.php000064400000001033152665565410016563 0ustar00bigInteger('user_id')->nullable()->after('id'); }); } public function down(): void { Schema::table('openai_filters', function (Blueprint $table) { $table->dropColumn('user_id'); }); } }; 2023_05_01_205543_add_frontend_fields_to_settings_table.php000064400000002722152665565410017141 0ustar00boolean('frontend_pricing_section')->default(1); $table->boolean('frontend_custom_templates_section')->default(1); $table->boolean('frontend_business_partners_section')->default(1); $table->string('frontend_additional_url')->nullable(); $table->string('frontend_custom_js')->nullable(); $table->string('frontend_custom_css')->nullable(); $table->string('frontend_footer_facebook')->nullable(); $table->string('frontend_footer_twitter')->nullable(); $table->string('frontend_footer_instagram')->nullable(); }); } public function down(): void { Schema::table('settings', function (Blueprint $table) { $table->dropColumn([ 'frontend_pricing_section', 'frontend_custom_templates_section', 'frontend_business_partners_section', 'frontend_additional_url', 'frontend_custom_js', 'frontend_custom_css', 'frontend_footer_facebook', 'frontend_footer_twitter', 'frontend_footer_instagram', ]); }); } }; 2024_02_21_163100_add_chatbot_interests_to_chatbot_table.php000064400000001045152665565410017271 0ustar00text('chatbot_interests')->nullable()->after('instructions'); }); } public function down(): void { Schema::table('chatbot', function (Blueprint $table) { $table->dropColumn('chatbot_interests'); }); } }; 2024_03_05_085748_add_version_to_extensions_table.php000064400000001151152665565410016033 0ustar00string('version')->nullable()->after('id'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('extensions', function (Blueprint $table) { $table->dropColumn('version'); }); } }; 2024_08_14_050339_add_request_id_to_user_openai_table.php000064400000001100152665565410016607 0ustar00string('request_id')->after('id')->nullable(); $table->string('status')->nullable()->default('COMPLETED'); }); } public function down(): void { Schema::table('user_openai', function (Blueprint $table) { // }); } }; 2023_07_11_200235_add_license_type_to_settings_two.php000064400000001274152665565410016176 0ustar00text('liquid_license_type')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { if (Schema::hasTable('settings_two')) { Schema::table('settings_two', function (Blueprint $table) { $table->dropColumn('liquid_license_type'); }); } } }; 2023_12_21_080109_add_type_column_to_rate_limits_table.php000064400000001105152665565410016777 0ustar00string('type')->default('image'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('rate_limits', function (Blueprint $table) { // }); } }; 2025_05_21_154920_add_price_tax_included_colum_to_plans_table.php000064400000001211152665565410020273 0ustar00boolean('price_tax_included')->default(false)->after('price')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('plans', function (Blueprint $table) { $table->dropColumn('price_tax_included'); }); } }; 2024_03_08_082441_create_user_integrations_table.php000064400000001161152665565410015633 0ustar00id(); $table->integer('integration_id')->nullable(); $table->integer('user_id')->nullable(); $table->json('credentials')->nullable(); $table->timestamps(); }); } public function down(): void { Schema::dropIfExists('user_integrations'); } }; 2025_04_23_164215_create_dashboard_widgets_table.php000064400000001341152665565410015543 0ustar00id(); $table->enum('name', DashboardWidget::toArray()); $table->boolean('enabled')->default(true); $table->integer('order'); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('dashboard_widgets'); } }; 2025_08_18_125426_add_duration_column_to_coupons_table.php000064400000001171152665565410017037 0ustar00string('duration')->nullable()->default('once')->after('limit'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('coupons', function (Blueprint $table) { $table->dropColumn('duration'); }); } }; 2024_05_15_100541_create_users_activity_table.php000064400000001361152665565410015136 0ustar00id(); $table->string('email')->nullable(); $table->string('type')->nullable(); $table->string('ip')->nullable(); $table->string('connection')->nullable(); $table->timestamp('created_at'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('users_activity'); } }; 2024_05_16_092520_create_menus_table.php000064400000002233152665565410013217 0ustar00id(); $table->unsignedInteger('parent_id')->nullable(); $table->string('key')->unique(); $table->string('route')->nullable(); $table->string('route_slug')->nullable(); $table->string('label')->nullable(); $table->string('icon')->nullable(); $table->text('svg')->nullable(); $table->integer('order')->default(0); $table->boolean('is_active')->default(true); $table->longText('params')->nullable(); $table->string('type')->nullable(); $table->string('extension')->nullable(); $table->boolean('letter_icon')->default(false)->nullable(); $table->string('letter_icon_bg')->nullable(); $table->timestamps(); }); } public function down(): void { Schema::dropIfExists('menus'); } }; 2024_01_18_001457_add_licensed_to_extensions.php000064400000001264152665565410014755 0ustar00boolean('licensed')->default(false); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('extensions', function (Blueprint $table) { if (Schema::hasColumn('extensions', 'licensed')) { $table->dropColumn('licensed'); } }); } }; 2024_07_01_103139_add_otp_to_settings_table.php000064400000001153152665565410014574 0ustar00boolean('login_with_otp')->default(false); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('settings', function (Blueprint $table) { $table->dropColumn('login_with_otp'); }); } }; 2024_09_02_120410_create_share_links_table.php000064400000001333152665565410014357 0ustar00id(); $table->string('url'); $table->string('category'); $table->integer('chat'); $table->integer('message'); $table->bigInteger('time'); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('share_links'); } }; 2024_09_24_221029_rename_ai_model_id_column_in_ai_chat_model_plans_table.php000064400000001740152665565410022414 0ustar00unsignedBigInteger('ai_model_id')->change(); $table->renameColumn('ai_model_id', 'entity_id'); }); } public function down(): void { Schema::table('ai_chat_model_plans', static function (Blueprint $table) { if (Schema::hasColumn('ai_chat_model_plans', 'entity_id')) { $table->dropForeign(['entity_id']); } }); Schema::table('ai_chat_model_plans', static function (Blueprint $table) { if (Schema::hasColumn('ai_chat_model_plans', 'entity_id')) { $table->renameColumn('entity_id', 'ai_model_id'); } }); } }; 2025_10_02_215339_make_name_and_surname_nullable_in_users_table.php000064400000001354152665565410020623 0ustar00string('name')->nullable()->change(); $table->string('surname')->nullable()->change(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('users', function (Blueprint $table) { $table->string('name')->nullable(false)->change(); $table->string('surname')->nullable(false)->change(); }); } }; 2024_06_18_090439_add_icon_column_to_frontend_generators_table.php000064400000001146152665565410020530 0ustar00text('icon')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('frontend_generators', function (Blueprint $table) { $table->dropColumn('icon'); }); } }; 2024_01_22_134905_add_columns_to_subscriptions_yokassa_table.php000064400000001605152665565410020257 0ustar00string('tax_rate')->nullable(); $table->string('tax_value')->nullable(); $table->string('coupon')->nullable(); $table->string('total_amount')->nullable(); $table->boolean('auto_renewal')->default(0); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('subscriptions_yokassa', function (Blueprint $table) { $table->dropColumn(['tax_rate', 'tax_value', 'coupon', 'total_amount', 'auto_renewal']); }); } }; 2014_10_12_000000_create_users_table.php000064400000003426152665565410013203 0ustar00id(); $table->string('name'); $table->string('surname'); $table->string('email')->unique(); $table->string('phone')->nullable(); $table->string('type')->default('user'); $table->string('password'); $table->string('avatar')->default('assets/img/auth/default-avatar.png'); $table->string('company_name')->nullable(); $table->string('company_website')->nullable(); $table->string('country')->nullable(); $table->text('address')->nullable(); $table->string('postal')->nullable(); $table->boolean('status')->default('1'); $table->integer('remaining_words')->default(0); $table->integer('remaining_images')->default(0); $table->date('last_seen')->nullable(); $table->string('github_id')->nullable(); $table->string('github_token')->nullable(); $table->string('google_id')->nullable(); $table->string('google_token')->nullable(); $table->string('facebook_id')->nullable(); $table->string('facebook_token')->nullable(); $table->string('twitter_id')->nullable(); $table->string('twitter_token')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('users'); } }; 2024_11_04_101015_update_permission_table.php000064400000000660152665565410014261 0ustar00where('type', 'admin') ->update(['type' => 'super_admin']); } /** * Reverse the migrations. */ public function down(): void { // } }; 2024_06_18_082526_add_some_fields_to_howitworks_table.php000064400000001574152665565410016667 0ustar00string('bg_color')->nullable(); $table->string('bg_image')->nullable(); $table->string('text_color')->nullable(); $table->string('image')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('howitworks', function (Blueprint $table) { $table->dropColumn('bg_color'); $table->dropColumn('bg_image'); $table->dropColumn('text_color'); $table->dropColumn('image'); }); } }; 2024_02_01_130945_add_user_count_to_settings_table.php000064400000001633152665565410016163 0ustar00integer('user_count')->default(0); }); // Count existing users $userCount = DB::table('users')->count(); // Set the initial value in settings table DB::table('settings')->updateOrInsert( [], [ 'user_count' => $userCount, ] ); } /** * Reverse the migrations. */ public function down(): void { Schema::table('settings', function (Blueprint $table) { $table->dropColumn('user_count'); }); } }; 2024_02_20_101928_add_open_ai_items_to_plans_table.php000064400000001002152665565410016053 0ustar00json('open_ai_items')->nullable(); }); } public function down(): void { Schema::table('plans', function (Blueprint $table) { $table->dropColumn('open_ai_items'); }); } }; 2024_10_25_095152_add_logo_to_settings_table.php000064400000001152152665565410014736 0ustar00text('x_logo')->nullable(); $table->text('xx_logo')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('settings', function (Blueprint $table) { // }); } }; 2023_04_24_115420_create_cache_table.php000064400000001521152665565410013122 0ustar00string('key')->primary(); $table->mediumText('value'); $table->integer('expiration'); }); Schema::create('cache_locks', function (Blueprint $table) { $table->string('key')->primary(); $table->string('owner'); $table->integer('expiration'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('cache'); Schema::dropIfExists('cache_locks'); } }; 2024_02_29_074747_chatbot_timestamp.php000064400000001203152665565410013115 0ustar00boolean('chatbot_show_timestamp')->default(false); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('settings_two', function (Blueprint $table) { $table->dropColumn('chatbot_show_timestamp'); }); } }; 2023_06_14_104251_add_token_field_to_users_table.php000064400000001154152665565410015555 0ustar00string('github_refresh_token')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('users', function (Blueprint $table) { $table->dropColumn('github_refresh_token'); }); } }; 2023_05_10_120704_create_openai_filters_table.php000064400000001057152665565410015063 0ustar00id(); $table->string('name')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('openai_filters'); } }; 2023_06_19_140133_add_login_without_confirmation_to_settings_table.php000064400000001177152665565410021445 0ustar00boolean('login_without_confirmation')->default(1); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('settings', function (Blueprint $table) { $table->dropColumn('login_without_confirmation'); }); } }; 2024_02_09_064724_add_ai_advanced_editor_to_settings_table.php000064400000001237152665565410017572 0ustar00boolean('feature_ai_advanced_editor')->after('team_functionality')->default(true); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('settings', function (Blueprint $table) { $table->dropColumn('feature_ai_advanced_editor'); }); } }; 2023_08_30_162502_create_ads_table.php000064400000001223152665565410012631 0ustar00id(); $table->string('type'); $table->longText('code'); $table->boolean('status')->default(false); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('ads'); } }; 2023_06_20_125836_add_header_buttons_to_frontend_footer_settings_table.php000064400000001161152665565410022263 0ustar00string('sign_in')->default('Sign In'); $table->string('join_hub')->default('Join Hub'); }); } public function down(): void { Schema::table('frontend_footer_settings', function (Blueprint $table) { $table->dropColumn(['sign_in', 'join_hub']); }); } }; 2024_09_24_221030_make_ai_chat_model_plans_entity_id_foreign_key.php000064400000001624152665565410020765 0ustar00unsignedBigInteger('entity_id')->change(); if (! Schema::hasIndex('ai_chat_model_plans', 'ai_chat_model_plans_entity_id_foreign')) { $table->foreign('entity_id')->references('id')->on('entities')->onDelete('cascade'); } }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('ai_chat_model_plans', static function (Blueprint $table) { $table->dropForeign(['entity_id']); $table->dropColumn('entity_id'); }); } }; 2024_02_21_064451_update_apple_token_column_from_user_table.php000064400000001330152665565410020036 0ustar00text('apple_token')->change(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('users', function (Blueprint $table) { // Convert apple_token column from text to String $table->string('apple_token')->change(); }); } }; 2024_01_11_091958_create_table_revenuecatproducts.php000064400000002215152665565410016022 0ustar00id(); $table->unsignedBigInteger('plan_id')->nullable(); $table->unsignedBigInteger('gatewayproduct_id')->nullable(); $table->string('entitlement_id')->nullable(); $table->string('package_id')->nullable(); $table->string('google_id')->nullable(); $table->string('apple_id')->nullable(); $table->string('amazon_id')->nullable(); $table->timestamps(); $table->foreign('plan_id')->references('id')->on('plans')->onDelete('cascade'); $table->foreign('gatewayproduct_id')->references('id')->on('gatewayproducts')->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('revenuecat_products'); } }; 2024_02_26_013354_add_ai_video_to_settings_two.php000064400000001163152665565410015275 0ustar00boolean('feature_ai_video')->default(1); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('settings_two', function (Blueprint $table) { $table->dropColumn('feature_ai_video'); }); } }; 2023_06_02_124117_create_frontend_sections_statuses_titles_table.php000064400000005366152665565410021140 0ustar00id(); $table->boolean('features_active')->default(1); $table->string('features_title')->default('The future of AI.')->nullable(); $table->text('features_description')->nullable(); $table->boolean('generators_active')->default(1); $table->boolean('who_is_for_active')->default(1); $table->boolean('custom_templates_active')->default(1); $table->string('custom_templates_subtitle_one')->default('Custom')->nullable(); $table->string('custom_templates_subtitle_two')->default('Prompts')->nullable(); $table->string('custom_templates_title')->default('Custom Templates.')->nullable(); $table->text('custom_templates_description')->nullable(); $table->boolean('tools_active')->default(1); $table->string('tools_title')->default('Magic Tools.')->nullable(); $table->text('tools_description')->nullable(); $table->boolean('how_it_works_active')->default(1); $table->string('how_it_works_title')->default('So, how does it work?')->nullable(); $table->boolean('testimonials_active')->default(1); $table->string('testimonials_title')->default('Trusted by millions.')->nullable(); $table->string('testimonials_subtitle_one')->default('Testimonials'); $table->string('testimonials_subtitle_two')->default('Trustpilot')->nullable(); $table->boolean('pricing_active')->default(1); $table->string('pricing_title')->default('Flexible Pricing.')->nullable(); $table->text('pricing_description')->nullable(); $table->string('pricing_save_percent')->default('Save 30%')->nullable(); $table->boolean('faq_active')->default(1); $table->string('faq_title')->default('Have a question?')->nullable(); $table->string('faq_subtitle')->default('Our support team will get assistance from AI-powered suggestions, making it quicker than ever to handle support requests.')->nullable(); $table->string('faq_text_one')->default('FAQ')->nullable(); $table->string('faq_text_two')->default('Help Center')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('frontend_sections_statuses_titles'); } }; 2024_02_15_132142_add_payload_to_user_orders_table.php000064400000001002152665565410016104 0ustar00json('payload')->nullable(); }); } public function down(): void { Schema::table('user_orders', function (Blueprint $table) { $table->dropColumn('payload'); }); } }; 2024_01_29_143656_create_teams_table.php000064400000001343152665565410013211 0ustar00id(); $table->foreignId('user_id')->nullable()->constrained('users')->nullOnDelete(); $table->string('name'); $table->integer('allow_seats')->default(0); $table->integer('used_image_credit')->default(0); $table->integer('word_credit')->default(0); $table->timestamps(); }); } public function down(): void { Schema::dropIfExists('teams'); } }; 2024_05_01_082729_add_gemini_api_keys_colmn_to_users_table.php000064400000001161152665565410017627 0ustar00text('gemini_api_keys') ->after('api_keys') ->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('users', function (Blueprint $table) { // }); } }; 2024_02_06_095920_create_payment_proofs_table.php000064400000001773152665565410015150 0ustar00id(); $table->unsignedBigInteger('user_id'); $table->string('order_id'); $table->unsignedBigInteger('plan_id'); $table->decimal('total_amount', 15, 2)->nullable(); // Adjust precision and scale as needed $table->string('proof_image'); $table->timestamps(); $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); $table->foreign('plan_id')->references('id')->on('plans')->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('payment_proofs'); } }; 2023_05_29_165555_create_frontend_tools_table.php000064400000001266152665565410015150 0ustar00id(); $table->string('title')->nullable(); $table->text('description')->nullable(); $table->text('image')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('frontend_tools'); } }; 2023_12_13_124801_add_image_field_to_chat_messages.php000064400000001166152665565410016017 0ustar00text('images')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('user_openai_chat_messages', function (Blueprint $table) { $table->dropColumn('images'); }); } }; 2023_09_26_134837_create_privacy_terms_table.php000064400000001214152665565410014771 0ustar00id(); $table->string('type'); $table->string('lang'); $table->text('content'); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('privacy_terms'); } }; 2024_02_19_074856_add_payload_to_table_user_openai.php000064400000001021152665565410016107 0ustar00json('payload')->nullable()->default(null); }); } public function down(): void { Schema::table('user_openai', function (Blueprint $table) { $table->dropColumn('payload'); }); } }; 2025_06_16_135944_add_plan_entity_credits_to_teams_table.php000064400000001275152665565410017332 0ustar00json('entity_credits')->nullable()->after('id'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('teams', function (Blueprint $table) { if (Schema::hasColumn('teams', 'entity_credits')) { $table->dropColumn('entity_credits'); } }); } }; 2023_07_07_103442_create_blogs_table.php000064400000001750152665565410013176 0ustar00id(); $table->string('title'); $table->text('content'); $table->string('feature_image')->nullable(); $table->string('slug')->unique(); $table->string('seo_title')->nullable(); $table->text('seo_description')->nullable(); $table->text('category')->nullable(); $table->text('tag')->nullable(); $table->boolean('status')->default(1); $table->integer('user_id'); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('blogs'); } }; 2024_06_07_064433_add_state_and_city_columns_to_users_table.php000064400000001312152665565410020032 0ustar00string('state')->nullable()->after('address'); $table->string('city')->nullable()->after('address'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('users', function (Blueprint $table) { $table->dropColumn('state'); $table->dropColumn('city'); }); } }; 2023_05_03_103134_add_color_to_openai_table.php000064400000001120152665565410014507 0ustar00string('color')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('openai', function (Blueprint $table) { $table->dropColumn('color'); }); } }; 2023_05_29_122817_create_faq_table.php000064400000001236152665565410012647 0ustar00id(); $table->text('question')->nullable(); $table->text('answer')->nullable(); $table->string('image')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('faq'); } }; 2023_04_28_110404_create_currencies_table.php000064400000001473152665565410014230 0ustar00id(); $table->string('country')->nullable(); $table->string('currency')->nullable(); $table->string('code')->nullable(); $table->string('symbol')->nullable(); $table->string('thousand_separator')->nullable(); $table->string('decimal_separator')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('currencies'); } }; 2024_05_22_154827_change_integer_to_float_in_users.php000064400000001434152665565410016146 0ustar00decimal('remaining_images', 15, 2)->nullable()->change(); $table->decimal('remaining_words', 15, 2)->nullable()->change(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('users', function (Blueprint $table) { $table->integer('remaining_images')->nullable()->change(); $table->integer('remaining_words')->nullable()->change(); }); } }; 2023_11_17_051523_add_dalle_setting_to_settings_two.php000064400000001361152665565410016333 0ustar00string('dalle')->nullable()->default(EntityEnum::DALL_E_3->value); }); } /** * Reverse the migrations. */ public function down(): void { if (Schema::hasTable('settings_two')) { Schema::table('settings_two', function (Blueprint $table) { $table->dropColumn('dalle'); }); } } }; 2025_07_29_102938_remove_gemini_deprected_models2.php000064400000002030152665565410015676 0ustar00 $newDefault, ])->save(); } foreach ($modelsToBeRemoved as $model) { EntityRemover::removeEntity($model); } } catch (\Throwable $exception) { } } /** * Reverse the migrations. */ public function down(): void { // } }; 2024_03_19_142411_add_instructions_to_openai_chat_category_table.php000064400000001064152665565410021047 0ustar00text('instructions')->nullable()->after('description'); }); } public function down(): void { Schema::table('openai_chat_category', function (Blueprint $table) { $table->dropColumn('instructions'); }); } }; 2023_03_01_113559_create_jobs_table.php000064400000001456152665565410013030 0ustar00bigIncrements('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. */ public function down(): void { Schema::dropIfExists('jobs'); } }; 2024_07_09_045618_create_ai_chat_model_plans_table.php000064400000001003152665565410016041 0ustar00id(); $table->integer('plan_id'); $table->integer('ai_model_id'); }); } public function down(): void { Schema::dropIfExists('ai_chat_model_plans'); } }; 2024_09_24_213999_remove_deprecated_stable_diff_models_from_db.php000064400000001113152665565410020446 0ustar00id(); $table->string('key'); $table->string('status')->default(StatusEnum::ENABLED->value); $table->timestamps(); }); } public function down(): void { Schema::dropIfExists('engines'); } }; 2025_09_16_051839_add_enabled_sound_ext_chatbot_customers_table.php000064400000001062152665565410020663 0ustar00string('google2fa_secret')->nullable()->after('twitter_token'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('users', function (Blueprint $table) { $table->dropColumn('google2fa_secret'); }); } }; 2024_04_09_191525_add_affiliate_status_to_users_table.php000064400000001120152665565410016627 0ustar00tinyInteger('affiliate_status')->default(1)->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('users', function (Blueprint $table) { // }); } }; 2025_08_27_094648_add_is_empty_colmn_to_user_openai_chat_table.php000064400000001572152665565410020520 0ustar00boolean('is_empty')->default(1)->index(); }); try { \App\Models\UserOpenaiChat::query()->each(function ($chat) { $chat->is_empty = $chat->messagesWithoutInitial()->count() === 0; $chat->save(); }); } catch (\Throwable $th) { } } /** * Reverse the migrations. */ public function down(): void { Schema::table('user_openai_chat', function (Blueprint $table) { $table->dropColumn('is_empty'); }); } }; 2025_03_04_215021_add_show_for_all_column_to_prompt_library_table.php000064400000001163152665565410021225 0ustar00boolean('show_for_all')->default(false); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('prompt_library', function (Blueprint $table) { $table->dropColumn('show_for_all'); }); } }; 2023_06_22_124915_add_free_plan_to_settings_table.php000064400000001145152665565410015734 0ustar00string('free_plan', 100)->default('0,0'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('settings', function (Blueprint $table) { $table->dropColumn('free_plan'); }); } }; 2024_02_23_061429_add_chatbot_id_to_user_openai_chat_table.php000064400000001204152665565410017543 0ustar00bigInteger('chatbot_id')->nullable()->after('user_id'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('user_openai_chat', function (Blueprint $table) { $table->dropColumn('chatbot_id'); }); } }; 2024_06_13_162318_add_hero_image_column_to_frontend_settings_table.php000064400000001352152665565410021354 0ustar00string('hero_image') ->after('hero_button_url') ->default('/themes/dark/assets/landing-page/banner-img.jpg'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('frontend_footer_settings', function (Blueprint $table) { $table->dropColumn('hero_image'); }); } }; 2024_01_30_130737_add_team_function_add_settings_to_table.php000064400000001031152665565410017430 0ustar00boolean('team_functionality')->default(false); }); } public function down(): void { Schema::table('settings', function (Blueprint $table) { $table->dropColumn('team_functionality'); }); } }; 2023_10_03_080002_add_unsplash_api_key_to_settings_two.php000064400000001266152665565410017043 0ustar00text('unsplash_api_key')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { if (Schema::hasTable('settings_two')) { Schema::table('settings_two', function (Blueprint $table) { $table->dropColumn('unsplash_api_key'); }); } } }; 2024_05_21_091041_create_ai_models_table.php000064400000001310152665565410014010 0ustar00id(); $table->string('key'); $table->string('title'); $table->string('ai_engine')->default(\App\Domains\Engine\Enums\EngineEnum::OPEN_AI->value); $table->boolean('is_active')->default(false); $table->timestamps(); }); } public function down(): void { Schema::dropIfExists('ai_models'); } }; 2024_06_14_145824_create_account_deletion_reqs_table.php000064400000001175152665565410016452 0ustar00id(); $table->foreignId('user_id')->constrained()->onDelete('cascade'); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('account_deletion_reqs'); } }; 2024_01_24_105005_feature_ai_rss_option.php000064400000001156152665565410013750 0ustar00tinyInteger('feature_ai_rss')->default(true); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('settings', function (Blueprint $table) { $table->dropColumn('feature_ai_rss'); }); } }; 2019_05_03_000001_create_customer_columns.php000064400000001606152665565410014304 0ustar00string('stripe_id')->nullable()->index(); $table->string('pm_type')->nullable(); $table->string('pm_last_four', 4)->nullable(); $table->timestamp('trial_ends_at')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('users', function (Blueprint $table) { $table->dropColumn([ 'stripe_id', 'pm_type', 'pm_last_four', 'trial_ends_at', ]); }); } }; 2024_07_04_120705_create_domains_table.php000064400000001377152665565410013526 0ustar00id(); $table->uuid()->unique(); $table->string('domain'); $table->uuid('app_key'); $table->foreignId('chatbot_id')->index()->constrained('chatbot')->onUpdate('NO ACTION')->cascadeOnDelete(); $table->timestamps(); $table->unique(['chatbot_id', 'domain']); }); } public function down(): void { Schema::dropIfExists('domains'); } }; 2024_07_23_231136_create_comparison_section_items_table.php000064400000001306152665565410017165 0ustar00id(); $table->string('label'); $table->boolean('others')->default(false); $table->boolean('ours')->default(false); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('comparison_section_items'); } }; 2023_06_09_102154_create_pages_table.php000064400000001244152665565410013165 0ustar00id(); $table->string('title'); $table->text('content'); $table->string('slug'); $table->boolean('status'); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('pages'); } }; 2023_05_24_134923_add_collapsed_logo_path_to_settings_table.php000064400000001252152665565410020003 0ustar00string('logo_collapsed')->default('magicAI-logo-Collapsed.png'); $table->string('logo_collapsed_path')->default('assets/img/logo/magicAI-logo-Collapsed.png'); }); } public function down(): void { Schema::table('settings', function (Blueprint $table) { $table->dropColumn(['logo_collapsed', 'logo_collapsed_path']); }); } }; 2024_01_17_075234_add_image_url_to_extensions.php000064400000001262152665565410015134 0ustar00string('image_url')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('extensions', function (Blueprint $table) { if (Schema::hasColumn('extensions', 'image_url')) { $table->dropColumn('image_url'); } }); } }; 2024_06_24_141627_create_introductions_table.php000064400000001215152665565410014776 0ustar00id(); $table->string('key'); $table->string('intro'); $table->integer('order'); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('introductions'); } }; 2024_08_12_225618_add_thread_id_to_user_openai_chat_table.php000064400000001154152665565410017400 0ustar00string('thread_id')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('user_openai_chat', function (Blueprint $table) { $table->dropColumn('thread_id'); }); } }; 2023_12_28_143354_add_ai_chat_image_field_to_settings_table.php000064400000001174152665565410017701 0ustar00tinyInteger('feature_ai_chat_image')->default(true); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('settings', function (Blueprint $table) { $table->dropColumn('feature_ai_chat_image'); }); } }; 2024_06_26_123911_add_tour_seen_to_settings_table.php000064400000001140152665565410015777 0ustar00boolean('tour_seen')->default(true); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('settings', function (Blueprint $table) { $table->dropColumn('tour_seen'); }); } }; 2025_03_13_140539_add_payment_mail_templates_to_email_templates_table.php000064400000001366152665565410022047 0ustar00text('words')->nullable()->change(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('testimonials', function (Blueprint $table) { $table->string('words')->nullable()->change(); }); } }; 2024_06_13_132553_create_social_media_accounts_table.php000064400000001520152665565410016375 0ustar00id(); $table->string('title'); $table->string('subtitle')->nullable(); $table->string('key')->unique(); $table->string('link')->nullable(); $table->longText('icon')->nullable(); $table->boolean('is_active')->default(true); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('social_media_accounts'); } }; 2023_12_13_071818_add_allowed_images_count_to_settings_two.php000064400000001176152665565410017713 0ustar00boolean('daily_limit_enabled')->default(false); $table->integer('allowed_images_count')->default(2); }); } public function down(): void { Schema::table('settings_two', function (Blueprint $table) { $table->dropColumn(['daily_limit_enabled', 'allowed_images_count']); }); } }; 2023_12_28_021338_add_new_fields_to_subscriptions_table.php000064400000001573152665565410017172 0ustar00string('tax_rate')->nullable(); $table->string('tax_value')->nullable(); $table->string('coupon')->nullable(); $table->string('total_amount')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('subscriptions', function (Blueprint $table) { $table->dropColumn([ 'tax_rate', 'tax_value', 'coupon', 'total_amount', ]); }); } }; 2025_09_09_085800_add_support_multi_model_selection_colum_to_plans_table.php000064400000001173152665565410022642 0ustar00boolean('multi_model_support')->default(false)->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('plans', function (Blueprint $table) { $table->dropColumn('multi_model_support'); }); } }; 2024_01_30_081601_chatbot_chat_data.php000064400000001167152665565410013005 0ustar00tinyInteger('is_chatbot')->default(false); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('user_openai_chat', function (Blueprint $table) { $table->dropColumn('is_chatbot'); }); } }; 2025_04_08_100750_create_user_usage_credits_table.php000064400000001437152665565410015750 0ustar00id(); $table->foreignId('user_id')->constrained()->onDelete('cascade'); $table->string('model_key'); $table->integer('credit'); $table->decimal('unit_price', 8, 2); $table->decimal('total', 10, 2); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('user_credits'); } }; 2023_05_31_151447_create_clients_table.php000064400000001310152665565410013524 0ustar00id(); $table->string('avatar')->default('assets/img/auth/default-avatar.png'); $table->string('alt')->nullable(); $table->string('title')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('clients'); } }; 2024_01_25_113135_fine_tune_list_data.php000064400000001226152665565410013367 0ustar00json('fine_tune_list')->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('settings_two', function (Blueprint $table) { $table->dropColumn('fine_tune_list'); }); } }; 2025_07_10_110144_add_user_id_to_exported_videos.php000064400000001211152665565410015606 0ustar00foreignIdFor(User::class)->nullable()->constrained()->cascadeOnDelete(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('exported_videos', function (Blueprint $table) { // }); } }; 2024_01_22_074920_add_prize_to_table.php000064400000001247152665565410013211 0ustar00integer('price')->default(0); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('extensions', function (Blueprint $table) { if (Schema::hasColumn('extensions', 'price')) { $table->dropColumn('price'); } }); } }; 2024_01_30_064148_add_is_team_plan_and_plan_allow_seat_to_plans_table.php000064400000001176152665565410021757 0ustar00boolean('is_team_plan')->default(false)->after('type'); $table->integer('plan_allow_seat')->nullable()->after('is_team_plan'); }); } public function down(): void { Schema::table('plans', function (Blueprint $table) { $table->dropColumn(['is_team_plan', 'plan_allow_seat']); }); } }; 2024_02_28_084232_add_target_audience_column_to_companies_table.php000064400000001176152665565410020623 0ustar00text('target_audience')->nullable()->after('description'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('companies', function (Blueprint $table) { $table->dropColumn('target_audience'); }); } }; 2024_11_04_100122_create_permission_tables.php000064400000015160152665565410014424 0ustar00engine('InnoDB'); $table->bigIncrements('id'); // permission id $table->string('name'); // For MyISAM use string('name', 225); // (or 166 for InnoDB with Redundant/Compact row format) $table->string('guard_name'); // For MyISAM use string('guard_name', 25); $table->timestamps(); $table->unique(['name', 'guard_name']); }); Schema::create($tableNames['roles'], function (Blueprint $table) use ($teams, $columnNames, $permissionTesting) { // $table->engine('InnoDB'); $table->bigIncrements('id'); // role id if ($teams || $permissionTesting) { // 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 MyISAM use string('name', 225); // (or 166 for InnoDB with Redundant/Compact row format) $table->string('guard_name'); // For MyISAM use string('guard_name', 25); $table->timestamps(); if ($teams || $permissionTesting) { $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, $pivotPermission, $teams) { $table->unsignedBigInteger($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($pivotPermission) ->references('id') // permission 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'], $pivotPermission, $columnNames['model_morph_key'], 'model_type'], 'model_has_permissions_permission_model_type_primary'); } else { $table->primary([$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, $pivotRole, $teams) { $table->unsignedBigInteger($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($pivotRole) ->references('id') // role 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'], $pivotRole, $columnNames['model_morph_key'], 'model_type'], 'model_has_roles_role_model_type_primary'); } else { $table->primary([$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, $pivotRole, $pivotPermission) { $table->unsignedBigInteger($pivotPermission); $table->unsignedBigInteger($pivotRole); $table->foreign($pivotPermission) ->references('id') // permission id ->on($tableNames['permissions']) ->onDelete('cascade'); $table->foreign($pivotRole) ->references('id') // role id ->on($tableNames['roles']) ->onDelete('cascade'); $table->primary([$pivotPermission, $pivotRole], 'role_has_permissions_permission_id_role_id_primary'); }); $permissionCacheStore = $config['cache']['store']; $permissionCacheKey = $config['cache']['key']; app('cache') ->store($permissionCacheStore != 'default' ? $permissionCacheStore : null) ->forget($permissionCacheKey); } /** * Reverse the migrations. */ public function down(): void { $config = App\SpatiePermissionConfig::config(); $tableNames = $config['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']); } }; 2023_09_11_130128_change_github_and_google_token_type.php000064400000001460152665565410016600 0ustar00text('facebook_token')->change(); $table->text('github_token')->change(); $table->text('google_token')->change(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('users', function (Blueprint $table) { $table->text('facebook_token')->change(); $table->text('github_token')->change(); $table->text('google_token')->change(); }); } }; 2024_07_25_081052_create_banner_bottom_texts_table.php000064400000001001152665565410016140 0ustar00id(); $table->string('text')->nullable(); $table->timestamps(); }); } public function down(): void { Schema::dropIfExists('banner_bottom_texts'); } }; 2024_06_26_074715_add_custom_menu_to_menus_table.php000064400000001245152665565410015636 0ustar00boolean('custom_menu')->default(false); } }); } public function down(): void { if (Schema::hasColumn('menus', 'custom_menu')) { Schema::table('menus', function (Blueprint $table) { $table->dropColumn('custom_menu'); }); } } }; 2024_03_28_002018_create_user_docs_favorite_table.php000064400000001521152665565410015746 0ustar00id(); $table->unsignedBigInteger('user_id')->nullable(); $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); $table->unsignedBigInteger('user_openai_id')->nullable(); $table->foreign('user_openai_id')->references('id')->on('user_openai')->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('user_docs_favorite'); } }; 2024_08_13_095658_remove_is_free_column_in_plans_table.php000064400000001045152665565410017015 0ustar00dropColumn('is_free'); }); } public function down(): void { Schema::table('plans', static function (Blueprint $table) { $table->boolean('is_free')->default(false); }); } }; 2023_07_03_082326_add_column_to_frontend_sections_statuses_titles_table.php000064400000001235152665565410022502 0ustar00boolean('preheader_active')->default(1); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('frontend_sections_statuses_titles', function (Blueprint $table) { $table->dropColumn('preheader_active'); }); } }; 2024_11_26_094758_add_heygen_secret_key_to_settings_table.php000064400000001104152665565410017504 0ustar00text('heygen_secret_key')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('settings', function (Blueprint $table) { // }); } }; 2023_05_15_145853_create_user_openai_chat_messages_table.php000064400000002263152665565410017300 0ustar00id(); $table->unsignedBigInteger('user_openai_chat_id')->nullable(); $table->foreign('user_openai_chat_id')->references('id')->on('user_openai_chat')->onDelete('cascade'); $table->unsignedBigInteger('user_id')->nullable(); $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); $table->text('input')->nullable(); $table->text('response')->nullable(); $table->text('output')->nullable(); $table->text('hash')->nullable(); $table->string('credits')->nullable(); $table->string('words')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('user_openai_chat_messages'); } }; 2023_06_21_135415_add_additional_option_to_settings_table.php000064400000001345152665565410017477 0ustar00boolean('feature_ai_voiceover')->default(true)->nullable(); $table->text('gcs_file')->nullable(); $table->text('gcs_name')->nullable(); }); } public function down(): void { Schema::table('settings', function (Blueprint $table) { $table->dropColumn([ 'feature_ai_voiceover', 'gcs_file', 'gcs_name', ]); }); } }; 2024_06_24_074201_add_footer_text_color_to_frontend_footer_settings_table.php000064400000001214152665565410023006 0ustar00string('footer_text_color')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('frontend_footer_settings', function (Blueprint $table) { $table->dropColumn('footer_text_color'); }); } }; 2023_12_18_142047_add_pdf_info_to_chat_messages.php000064400000001266152665565410015366 0ustar00text('pdfName')->nullable(); $table->text('pdfPath')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('user_openai_chat_messages', function (Blueprint $table) { $table->dropColumn(['pdfName', 'pdfPath']); }); } }; 2023_06_12_091546_add_gdpr_option_to_settings_table.php000064400000001344152665565410016330 0ustar00boolean('gdpr_status')->default(0); $table->string('gdpr_button')->default('Accept'); $table->string('gdpr_content')->nullable()->default('This website uses cookies to improve your web experience.'); }); } public function down(): void { Schema::table('settings', function (Blueprint $table) { $table->dropColumn(['gdpr_status', 'gdpr_button', 'gdpr_content']); }); } }; 2023_07_08_205833_create_settings_two_table.php000064400000001741152665565410014631 0ustar00id(); $table->string('stable_diffusion_api_key')->nullable(); $table->string('stable_diffusion_default_model')->nullable(); $table->boolean('google_recaptcha_status')->default(false); $table->string('google_recaptcha_site_key')->nullable(); $table->string('google_recaptcha_secret_key')->nullable(); $table->string('languages')->default('en')->nullable(); $table->string('languages_default')->default('en'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('settings_two'); } }; 2024_07_29_121039_create_pebblely_table.php000064400000001010152665565410013662 0ustar00id(); $table->integer('user_id'); $table->string('image'); $table->timestamps(); }); } public function down(): void { Schema::dropIfExists('pebblely'); } }; 2025_06_08_102625_create_exported_videos_table.php000064400000001757152665565410015306 0ustar00id(); $table->string('task_id')->unique()->index(); $table->string('status')->default(VideoStatusEnum::IN_PROGRESS->value); $table->text('video_url')->nullable(); $table->string('title')->nullable(); $table->string('used_ai_tool')->default('topview'); $table->text('cover_url')->nullable(); $table->integer('video_duration')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('exported_videos'); } }; 2024_06_25_131414_add_tour_seen_to_users_table.php000064400000001133152665565410015276 0ustar00boolean('tour_seen')->default(false); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('users', function (Blueprint $table) { $table->dropColumn('tour_seen'); }); } }; 2024_02_19_175115_add_user_id_to_elevenlab_voices_table.php000064400000001037152665565410017101 0ustar00bigInteger('user_id')->nullable()->after('id'); }); } public function down(): void { Schema::table('elevenlab_voices', function (Blueprint $table) { $table->dropColumn('user_id'); }); } }; 2024_08_06_050052_add_default_ai_model_to_plans_table.php000064400000000777152665565410016540 0ustar00string('default_ai_model')->default('gpt-3.5-turbo')->nullable(); }); } public function down(): void { Schema::table('plans', function (Blueprint $table) { // }); } }; 2023_12_22_085010_add_bot_output_image.php000064400000001202152665565410013535 0ustar00string('outputImage')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('user_openai_chat_messages', function (Blueprint $table) { $table->dropColumn('outputImage'); }); } }; 2024_07_05_112203_add_synthesia_secret_key_to_settings_table.php000064400000001107152665565410020211 0ustar00text('synthesia_secret_key')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('settings', function (Blueprint $table) { // }); } }; 2023_05_04_190611_add_version_to_settings_table.php000064400000001150152665565410015455 0ustar00double('script_version')->default('9'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('settings', function (Blueprint $table) { $table->dropColumn('script_version'); }); } }; 2023_06_26_140101_create_bad_words_table.php000064400000001157152665565410014026 0ustar00id(); $table->unsignedBigInteger('user_id'); $table->string('words'); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('bad_words'); } }; 2024_07_25_084337_add_generator_text_to_frontend_sections_statuses_titles_table.php000064400000001236152665565410024251 0ustar00string('generators_subtitle')->nullable(); $table->string('generators_title')->nullable(); $table->string('generators_description')->nullable(); }); } public function down(): void { Schema::table('frontend_sections_statuses_titles', function (Blueprint $table) { // }); } }; 2023_06_06_094535_add_new_logo_options.php000064400000001633152665565410013604 0ustar00text('logo_sticky')->nullable(); $table->text('logo_sticky_path')->nullable(); $table->text('logo_sticky_2x')->nullable(); $table->text('logo_sticky_2x_path')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('settings', function (Blueprint $table) { $table->dropColumn([ 'logo_sticky', 'logo_sticky_path', 'logo_sticky_2x', 'logo_sticky_2x_path', ]); }); } }; 2024_02_15_085457_add_url_to_user_openai_chat.php000064400000001175152665565410015115 0ustar00string('website_url')->default('')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('user_openai_chat', function (Blueprint $table) { $table->dropColumn('website_url'); }); } }; 2023_12_21_080333_add_allowed_voice_count_to_settings_two.php000064400000001233152665565410017534 0ustar00boolean('daily_voice_limit_enabled')->default(false); $table->integer('allowed_voice_count')->default(1); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('settings_two', function (Blueprint $table) { // }); } }; 2024_02_23_111745_add_user_api_option_to_settings_table.php000064400000001111152665565410017164 0ustar00tinyInteger('user_api_option')->default(0); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('settings', function (Blueprint $table) { // }); } }; 2024_02_06_172558_add_system_to_email_templates_table.php000064400000001033152665565410016633 0ustar00boolean('system')->default(true)->after('id'); }); } public function down(): void { Schema::table('email_templates', function (Blueprint $table) { $table->dropColumn('system'); }); } }; 2024_11_28_061918_add_automate_tax_to_gateways_table.php000064400000001321152665565410016462 0ustar00boolean('automate_tax')->default(false)->after('tax'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('gateways', function (Blueprint $table) { $table->dropColumn('automate_tax'); }); } }; 2023_03_10_100433_create_openai_table.php000064400000001616152665565410013327 0ustar00id(); $table->string('title'); $table->text('description'); $table->string('slug')->nullable(); $table->boolean('active')->default(1); $table->text('questions')->nullable(); $table->text('image')->nullable(); $table->boolean('premium')->default(0); $table->string('type')->default('text'); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('openai'); } }; 2024_07_24_111812_create_features_marquees_table.php000064400000001062152665565410015604 0ustar00id(); $table->string('title')->nullable(); $table->string('position')->nullable(); $table->timestamps(); }); } public function down(): void { Schema::dropIfExists('features_marquees'); } }; 2018_08_08_100000_create_telescope_entries_table.php000064400000004376152665565410015604 0ustar00getConnection()); // if the APP_ENV is not local, then run the migration if (app()->environment() !== 'local') { $schema->create('telescope_entries', function (Blueprint $table) { $table->bigIncrements('sequence'); $table->uuid('uuid'); $table->uuid('batch_id'); $table->string('family_hash')->nullable(); $table->boolean('should_display_on_index')->default(true); $table->string('type', 20); $table->longText('content'); $table->dateTime('created_at')->nullable(); $table->unique('uuid'); $table->index('batch_id'); $table->index('family_hash'); $table->index('created_at'); $table->index(['type', 'should_display_on_index']); }); $schema->create('telescope_entries_tags', function (Blueprint $table) { $table->uuid('entry_uuid'); $table->string('tag'); $table->primary(['entry_uuid', 'tag']); $table->index('tag'); $table->foreign('entry_uuid') ->references('uuid') ->on('telescope_entries') ->onDelete('cascade'); }); $schema->create('telescope_monitoring', function (Blueprint $table) { $table->string('tag')->primary(); }); } } /** * Reverse the migrations. */ public function down(): void { $schema = Schema::connection($this->getConnection()); $schema->dropIfExists('telescope_entries_tags'); $schema->dropIfExists('telescope_entries'); $schema->dropIfExists('telescope_monitoring'); } }; 2023_05_03_103903_add_additional_fields_to_activity_table.php000064400000001630152665565410017422 0ustar00dropColumn('activity'); $table->string('activity_title')->nullable(); $table->string('activity_type')->nullable(); }); } public function down(): void { Schema::table('activity', function (Blueprint $table) { if (Schema::hasColumn('activity', 'activity_title')) { $table->dropColumn('activity_title'); } }); Schema::table('activity', function (Blueprint $table) { if (Schema::hasColumn('activity', 'activity_type')) { $table->dropColumn('activity_type'); } }); } }; 2025_04_08_110336_add_openai_vector_and_file_id_columns_to_user_openai_chat.php000064400000001346152665565410023173 0ustar00string('openai_vector_id')->nullable(); $table->string('openai_file_id')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('user_openai_chat', function (Blueprint $table) { $table->dropColumn('openai_vector_id'); $table->dropColumn('openai_file_id'); }); } }; 2023_06_14_113746_add_google_refresh_token_to_users_table.php000064400000001154152665565410017475 0ustar00string('google_refresh_token')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('users', function (Blueprint $table) { $table->dropColumn('google_refresh_token'); }); } }; 2023_12_19_085351_add_tax_to_gateways_table.php000064400000001134152665565410014562 0ustar00string('tax')->nullable()->default(0); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('gateways', function (Blueprint $table) { $table->dropColumn('tax'); }); } }; 2024_02_15_111859_add_coingate_subscriber_id_to_users_table.php000064400000001175152665565410017777 0ustar00string('coingate_subscriber_id')->nullable()->after('id'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('users', function (Blueprint $table) { $table->dropColumn('coingate_subscriber_id'); }); } }; 2024_07_01_103008_add_otp_to_users_table.php000064400000001112152665565410014063 0ustar00string('otp')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('users', function (Blueprint $table) { $table->dropColumn('otp'); }); } }; 2023_06_20_084825_add_old_product_id_to_oldgatewayproducts.php000064400000001172152665565410017713 0ustar00string('old_product_id')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('oldgatewayproducts', function (Blueprint $table) { $table->dropColumn('old_product_id'); }); } }; 2024_03_08_112315_add_face_price_to_extensions_table.php000064400000001166152665565410016414 0ustar00float('fake_price')->nullable()->after('price')->default(0); }); } public function down(): void { Schema::table('extensions', function (Blueprint $table) { if (Schema::hasColumn('extensions', 'fake_price')) { $table->dropColumn('fake_price'); } }); } }; 2023_06_06_100350_add_paid_with_to_subscriptions.php000064400000001155152665565410015637 0ustar00string('paid_with')->default('stripe'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('subscriptions', function (Blueprint $table) { $table->dropColumn('paid_with'); }); } }; 2024_01_30_134710_add_team_id_to_user_openai_table.php000064400000001157152665565410016044 0ustar00bigInteger('team_id')->nullable()->after('id'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('user_openai', function (Blueprint $table) { $table->dropColumn('team_id'); }); } }; 2024_01_15_152651_add_serperapi_colmn_to_settings_two_table.php000064400000001154152665565410020050 0ustar00text('serper_api_key')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('settings_two', function (Blueprint $table) { $table->dropColumn('serper_api_key'); }); } }; 2024_02_27_120732_add_is_custom_column_to_pages_table.php000064400000001127152665565410016615 0ustar00boolean('is_custom')->default(0); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('pages', function (Blueprint $table) { $table->dropColumn('is_custom'); }); } }; 2023_03_21_123416_add_additional_fields_to_user_support_table.php000064400000001170152665565410020336 0ustar00string('ticket_id'); $table->string('priority')->default('Low'); $table->string('category'); }); } public function down(): void { Schema::table('user_support', function (Blueprint $table) { $table->dropColumn(['ticket_id', 'priority', 'category']); }); } }; 2023_06_01_140509_create_frontend_future_table.php000064400000001270152665565410015274 0ustar00id(); $table->string('title')->nullable(); $table->text('description')->nullable(); $table->text('image')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('frontend_future'); } }; 2024_09_19_245426_add_entity_credits_to_users_table.php000064400000001177152665565410016353 0ustar00json('entity_credits')->nullable()->after('id'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('users', function (Blueprint $table) { // }); } }; 2024_01_30_134807_add_team_id_to_user_openai_chat_table.php000064400000001171152665565410017046 0ustar00bigInteger('team_id')->nullable()->after('id'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('user_openai_chat', function (Blueprint $table) { $table->dropColumn('team_id'); }); } }; 2024_07_25_114952_add_advanced_features_title_to_frontend_sections_statuses_titles_table.php000064400000001173152665565410026060 0ustar00string('advanced_features_section_title')->nullable(); $table->text('advanced_features_section_description')->nullable(); }); } public function down(): void { Schema::table('frontend_sections_statuses_titles', function (Blueprint $table) { // }); } }; 2023_12_07_093902_add_display_to_plans.php000064400000001201152665565410013546 0ustar00boolean('display_imag_count')->default(1); $table->boolean('display_word_count')->default(1); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('plans', function (Blueprint $table) { // }); } }; 2024_02_22_120600_create_chatbot_data_vectors_table.php000064400000001264152665565410016236 0ustar00id(); $table->bigInteger('chatbot_id')->nullable(); $table->bigInteger('chatbot_data_id')->nullable(); $table->longText('content')->nullable(); $table->json('embedding')->nullable(); $table->timestamps(); }); } public function down(): void { Schema::dropIfExists('chatbot_data_vectors'); } }; 2024_02_22_150925_add_chatbot_id_to_openai_chat_category_table.php000064400000001055152665565410020405 0ustar00bigInteger('chatbot_id')->nullable()->after('id'); }); } public function down(): void { Schema::table('openai_chat_category', function (Blueprint $table) { $table->dropColumn('chatbot_id'); }); } }; 2024_06_14_124938_add_plan_description_column_to_plans_table.php000064400000001130152665565410020171 0ustar00text('description')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('plans', function (Blueprint $table) { $table->dropColumn('description'); }); } }; 2023_06_22_115805_add_customcode_to_settings_table.php000064400000001625152665565410016147 0ustar00text('frontend_code_before_head')->nullable(); $table->text('frontend_code_before_body')->nullable(); $table->text('dashboard_code_before_head')->nullable(); $table->text('dashboard_code_before_body')->nullable(); }); } public function down(): void { Schema::table('settings', function (Blueprint $table) { $table->dropColumn([ 'frontend_code_before_head', 'frontend_code_before_body', 'dashboard_code_before_head', 'dashboard_code_before_body', ]); }); } }; 2024_02_08_192853_create_custom_biling_plans_table.php000064400000001417152665565410016136 0ustar00id(); $table->string('gateway')->nullable(); $table->string('plan_id')->nullable(); $table->string('main_plan_price_id')->nullable(); $table->string('custom_plan_price_id')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('custom_biling_plans'); } }; 2023_06_12_135232_add_menu_option_to_settings_table.php000064400000001140152665565410016321 0ustar00text('menu_options')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('settings', function (Blueprint $table) { $table->dropColumn('menu_options'); }); } }; 2024_07_24_115747_create_footer_items_table.php000064400000001115152665565410014575 0ustar00id(); $table->string('item')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('footer_items'); } }; 2024_01_18_001456_add_detail_to_extensions.php000064400000001247152665565410014431 0ustar00text('detail')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('extensions', function (Blueprint $table) { if (Schema::hasColumn('extensions', 'detail')) { $table->dropColumn('detail'); } }); } }; 2024_09_24_214000_update_plan_credits_temporary_migration.php000064400000021246152665565410017557 0ustar00shouldMigrate()) { $this->migrateCredits(); $this->migratePlans(); $this->migrateSlugs(); $this->dropRemainingCreditColumn(); } } private function shouldMigrate(): bool { return User::query()->exists(); } private function migrateCredits(): void { $defaultWordModel = $this->defaultWordModel(); $defaultImageModels = $this->defaultImageModels(); User::query() ->chunk(10, function ($users) use ($defaultWordModel, $defaultImageModels) { foreach ($users as $user) { $remainingWords = (int) $user->remaining_words; $remainingImages = (int) $user->remaining_images; if ($remainingWords === -1) { EntityStats::word()->forUser($user)->list()->each(function ($entity) { $entity->setUnlimited(); }); } else { $driver = Entity::driver($defaultWordModel)->forUser($user); $driver->setCredit($remainingWords); } if ($remainingImages === -1) { EntityStats::image()->forUser($user)->list()->each(function ($entity) { $entity->setUnlimited(); }); } elseif ($defaultImageModels) { $defaultImageModelCount = count($defaultImageModels); foreach ($defaultImageModels as $model) { $driver = Entity::driver($model)->forUser($user); $driver->setCredit(ceil($remainingImages / $defaultImageModelCount)); } } } }); if ($defaultWordModel === EntityEnum::GPT_4_O) { Setting::query() ->updateOrCreate([ 'openai_default_model' => EntityEnum::GPT_4_O, ]); } } private function migratePlans(): void { $plans = Plan::get(); foreach ($plans as $plan) { $this->updatePlan($plan); } } private function updatePlan($plan): void { if ($plan) { $allFeatures = array_merge($plan->plan_features, $plan->open_ai_items, $plan->plan_ai_tools); $updatedData = [ 'open_ai_items' => $this->getFreshJsonAiItems($allFeatures), 'plan_ai_tools' => $this->getFreshJsonAiTools($allFeatures), 'plan_features' => $this->getFreshJsonFeatures($allFeatures), 'plan_type' => strtolower($plan->plan_type), 'ai_models' => $this->convertPlanCredits($plan), ]; $plan->update($updatedData); } } private function getFreshJsonAiItems($allFeatures): ?array { $flattened = []; foreach (Plan::openAiGeneratorsValues() as $items) { foreach ($items as $item) { if (in_array($item['slug'], $allFeatures, true)) { $flattened[$item['slug']] = true; } else { $flattened[$item['slug']] = false; } } } return $flattened; } private function getFreshJsonAiTools($allFeatures): ?array { $features = array_column(MenuService::planAiToolsMenu(), 'key'); return array_combine($features, array_map(static fn ($feature) => in_array($feature, $allFeatures, true), $features)); } private function getFreshJsonFeatures(array $allFeatures): ?array { $features = array_column(MenuService::planFeatureMenu(), 'key'); return array_combine($features, array_map(static fn ($feature) => in_array($feature, $allFeatures, true), $features)); } private function convertPlanCredits($plan): ?array { $aiModels = EngineEnum::getNestedPlanLimits(); $defaultWordModel = $this->defaultWordModel(); $defaultImageModels = $this->defaultImageModels(); if ($plan->total_words === -1) { $aiModels[$defaultWordModel->engine()->slug()][$defaultWordModel->slug()]['isUnlimited'] = true; } else { $aiModels[$defaultWordModel->engine()->slug()][$defaultWordModel->slug()]['credit'] = $plan->total_words; } $defaultImageModelCount = count($defaultImageModels); $imageCreditPerModel = $defaultImageModelCount > 0 ? ceil($plan->total_images / $defaultImageModelCount) : 0; foreach ($defaultImageModels as $model) { if ($plan->total_images === -1) { $aiModels[$model->engine()->slug()][$model->slug()]['isUnlimited'] = true; } else { $aiModels[$model->engine()->slug()][$model->slug()]['credit'] = $imageCreditPerModel; } } try { return $aiModels; } catch (JsonException $e) { Log::error("Error encoding AI models for plan ID {$plan->id}: " . $e->getMessage()); return null; } } private function migrateSlugs(): void { SettingTwo::where('dalle', 'dalle3')->update(['dalle' => 'dall-e-3']); SettingTwo::where('dalle', 'dalle2')->update(['dalle' => 'dall-e-2']); } /** * not used for now * Convert a JSON array string to a JSON object string with keys set to true. */ private function convertArrayToJsonObject(?string $jsonArrayString): ?string { if (is_null($jsonArrayString)) { return null; } $array = json_decode($jsonArrayString, true, 512, JSON_THROW_ON_ERROR); if (is_array($array) && array_keys($array) !== range(0, count($array) - 1)) { return $jsonArrayString; } $assocArray = []; foreach ((array) $array as $item) { $assocArray[$item] = true; } return json_encode($assocArray, JSON_THROW_ON_ERROR); } public function down(): void { if ($this->shouldMigrate()) { Schema::table('users', static function (Blueprint $table) { $table->integer('remaining_images')->nullable(); $table->integer('remaining_words')->nullable(); }); } } public function dropRemainingCreditColumn(): void { Schema::table('users', static function (Blueprint $table) { if (Schema::hasColumn('users', 'remaining_words')) { $table->dropColumn(['remaining_words', 'remaining_images']); } }); } public function defaultImageModels(): array { $settingsTwo = SettingTwo::query()->first(); $models = []; $dalleModel = match ($settingsTwo?->dalle) { 'dalle3' => EntityEnum::DALL_E_3->slug(), 'dalle2' => EntityEnum::DALL_E_2->slug(), default => $settingsTwo?->dalle ?? EntityEnum::DALL_E_2->slug(), }; if (! setting('dalle_hidden') && $openAIModel = EntityEnum::fromSlug($dalleModel)) { $models['openai'] = $openAIModel; } $stableModel = $settingsTwo?->stablediffusion_default_model ?? $settingTwo?->stablediffusion_default_model ?? EntityEnum::STABLE_DIFFUSION_XL_1024_V_1_0->slug(); if (! setting('stable_hidden') && $stableModel = EntityEnum::fromSlug($stableModel)) { $models['stable'] = $stableModel; } $falModel = setting('fal_ai_default_model', 'flux-realism'); if ($falModel = EntityEnum::fromSlug($falModel)) { $models['fal'] = $falModel; } return $models; } /** @noinspection PhpDuplicateMatchArmBodyInspection */ public function defaultWordModel(): EntityEnum { $defaultEngine = setting('default_ai_engine'); return match ($defaultEngine) { 'openai' => EntityEnum::GPT_4_O, 'anthropic' => EntityEnum::fromSlug(setting('anthropic_default_model')), 'gemini' => EntityEnum::fromSlug(setting('gemini_default_model')), default => EntityEnum::GPT_4_O, }; } }; 2023_04_12_223330_add_affiliate_to_users_table.php000064400000002051152665565410015207 0ustar00string('affiliate_code')->nullable(); $table->string('affiliate_earnings')->default(0); $table->text('affiliate_bank_account')->nullable(); $table->unsignedBigInteger('affiliate_id')->nullable(); $table->foreign('affiliate_id')->references('id')->on('users')->onDelete('cascade'); }); } public function down(): void { Schema::table('users', function (Blueprint $table) { if (! isDBDriverSQLite()) { $table->dropForeign(['affiliate_id']); } $table->dropColumn([ 'affiliate_code', 'affiliate_bank_account', 'affiliate_earnings', 'affiliate_id', ]); }); } }; 2023_12_25_212630_add_bank_details_to_gateways_table.php000064400000001304152665565410016372 0ustar00text('bank_account_details')->nullable(); $table->text('bank_account_other')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('gateways', function (Blueprint $table) { $table->dropColumn(['bank_account_details', 'bank_account_other']); }); } }; 2023_04_01_235507_add_custom_template_fields_to_openai_table.php000064400000001321152665565410020136 0ustar00text('prompt')->nullable(); $table->boolean('custom_template')->default(0); $table->boolean('tone_of_voice')->default(0); }); } public function down(): void { Schema::table('openai', function (Blueprint $table) { $table->dropColumn([ 'prompt', 'custom_template', 'tone_of_voice', ]); }); } }; 2023_03_22_104952_add_openai_settings_to_settings_table.php000064400000002235152665565410017171 0ustar00string('openai_default_model')->default('gpt-3.5-turbo'); $table->string('openai_default_language')->default('en-US'); $table->string('openai_default_tone_of_voice')->default('professional'); $table->string('openai_default_creativity')->default('0.75'); $table->string('openai_max_input_length')->default('300'); $table->string('openai_max_output_length')->default('200'); }); } public function down(): void { Schema::table('settings', function (Blueprint $table) { $table->dropColumn([ 'openai_default_model', 'openai_default_language', 'openai_default_tone_of_voice', 'openai_default_creativity', 'openai_max_input_length', 'openai_max_output_length', ]); }); } }; 2024_02_15_100430_add_payload_to_gatewayproducts_table.php000064400000001035152665565410016776 0ustar00json('payload')->nullable()->after('price_id'); }); } public function down(): void { Schema::table('gatewayproducts', function (Blueprint $table) { $table->dropColumn('payload'); }); } }; 2023_07_13_133729_add_stream_server_option_to_settings_two_table.php000064400000001330152665565410021143 0ustar00string('openai_default_stream_server')->default('backend'); }); } /** * Reverse the migrations. */ public function down(): void { if (Schema::hasTable('settings_two')) { Schema::table('settings_two', function (Blueprint $table) { $table->dropColumn('openai_default_stream_server'); }); } } }; 2024_09_19_070942_add_bolt_menu_to_menus_table.php000064400000001440152665565410015264 0ustar00boolean('bolt_menu') ->default(false) ->nullable() ->after('extension'); $table->string('bolt_background')->nullable()->after('bolt_menu'); $table->string('bolt_foreground')->nullable()->after('bolt_background'); }); } public function down(): void { Schema::table('menus', function (Blueprint $table) { $table->dropColumn(['bolt_menu', 'bolt_background', 'bolt_foreground']); }); } }; 2024_09_30_113752_rename_ai_model_id_column_in_token_table.php000064400000003061152665565410017565 0ustar00dropForeign(['ai_model_id']); } }); Schema::table('tokens', static function (Blueprint $table) { if (Schema::hasColumn('tokens', 'ai_model_id')) { $table->renameColumn('ai_model_id', 'entity_id'); } }); Schema::table('tokens', static function (Blueprint $table) { $table->foreign('entity_id')->references('id')->on('entities')->onDelete('cascade'); }); } public function down(): void { Schema::table('tokens', static function (Blueprint $table) { if (Schema::hasColumn('tokens', 'entity_id')) { $table->dropForeign(['entity_id']); } }); Schema::table('tokens', static function (Blueprint $table) { if (Schema::hasColumn('tokens', 'entity_id')) { $table->renameColumn('entity_id', 'ai_model_id'); } }); Schema::table('tokens', static function (Blueprint $table) { $table->foreign('ai_model_id')->references('id')->on('entities')->onDelete('cascade'); }); } }; 2023_12_12_063333_add_feature_ai_vision_to_settings_table.php000064400000001164152665565410017465 0ustar00tinyInteger('feature_ai_vision')->default(true); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('settings', function (Blueprint $table) { $table->dropColumn('feature_ai_vision'); }); } }; 2019_08_19_000000_create_failed_jobs_table.php000064400000001400152665565410014314 0ustar00id(); $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'); } }; 2024_08_16_105255_rollback_permission_table.php000064400000001353152665565410014613 0ustar00where('type', 'super_admin') ->update(['type' => Roles::ADMIN->value]); Schema::dropIfExists('role_has_permissions'); Schema::dropIfExists('model_has_roles'); Schema::dropIfExists('model_has_permissions'); Schema::dropIfExists('roles'); Schema::dropIfExists('permissions'); } /** * Reverse the migrations. */ public function down(): void { // } }; 2024_08_12_141902_add_assistant_to_openai_chat_category_table.php000064400000001164152665565410020317 0ustar00string('assistant')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('openai_chat_category', function (Blueprint $table) { $table->dropColumn('assistant'); }); } }; 2024_01_29_081000_chatbot_settings.php000064400000002141152665565410012727 0ustar00string('chatbot_status')->nullable()->default('disabled'); $table->integer('chatbot_template')->nullable(); $table->string('chatbot_position')->nullable()->default('bottom-left'); $table->tinyInteger('chatbot_login_require')->default(true); $table->integer('chatbot_rate_limit')->nullable()->default(10); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('settings_two', function (Blueprint $table) { $table->dropColumn([ 'chatbot_status', 'chatbot_template', 'chatbot_position', 'chatbot_login_require', 'chatbot_rate_limit', ]); }); } }; 2024_12_19_180117_change_prompt_column_to_user_fall_table.php000064400000001043152665565410017505 0ustar00text('prompt')->nullable()->change(); }); } } /** * Reverse the migrations. */ public function down(): void {} }; 2023_09_13_075321_add_stablediffusion_default_model_to_settings_two_table.php000064400000002173152665565410022740 0ustar00string('stablediffusion_default_model')->default(EntityEnum::STABLE_DIFFUSION_XL_1024_V_1_0->slug())->change(); } else { $table->string('stablediffusion_default_model')->default(EntityEnum::STABLE_DIFFUSION_XL_1024_V_1_0->slug()); } }); } /** * Reverse the migrations. */ public function down(): void { if (Schema::hasTable('settings_two')) { Schema::table('settings_two', function (Blueprint $table) { $table->string('stablediffusion_default_model')->default(EntityEnum::STABLE_DIFFUSION_XL_1024_V_1_0->slug())->change(); }); } } }; 2024_08_09_103631_add_ai_models_to_plans_table.php000064400000000772152665565410015217 0ustar00json('ai_models')->nullable(); }); } public function down(): void { Schema::table('plans', function (Blueprint $table) { $table->dropColumn('ai_models'); }); } }; 2023_09_20_174744_create_coupon_users_table.php000064400000001503152665565410014622 0ustar00id(); $table->unsignedBigInteger('coupon_id'); $table->unsignedBigInteger('user_id'); $table->timestamps(); $table->foreign('coupon_id')->references('id')->on('coupons')->onDelete('cascade'); $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('coupon_users'); } }; 2023_11_30_084646_add_user_id_to_prompt_library.php000064400000001131152665565410015465 0ustar00integer('user_id'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('prompt_library', function (Blueprint $table) { $table->dropColumn('user_id'); }); } }; 2023_12_14_093837_create_pdf_data_table.php000064400000001206152665565410013640 0ustar00id(); $table->integer('chat_id'); $table->text('content'); $table->json('vector'); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('pdf_data'); } }; 2024_07_05_122831_add_is_selected_to_ai_models_table.php000064400000001171152665565410016355 0ustar00string('selected_title')->nullable(); $table->boolean('is_selected')->default(false); }); } public function down(): void { Schema::table('ai_models', function (Blueprint $table) { $table->dropColumn('is_selected'); $table->dropColumn('selected_title'); }); } }; 2023_11_28_130925_add_favorite_plan_to_openai_chat_category_table.php000064400000001152152665565410021137 0ustar00string('plan')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('openai_chat_category', function (Blueprint $table) { $table->dropColumn('plan'); }); } }; 2024_03_07_152339_create_intagrations_table.php000064400000001277152665565410014604 0ustar00id(); $table->string('app')->nullable(); $table->text('description')->nullable(); $table->string('image')->nullable(); $table->string('slug')->nullable(); $table->tinyInteger('status')->default(1); $table->timestamps(); }); } public function down(): void { Schema::dropIfExists('integrations'); } }; 2025_07_23_140424_add_specific_instructions_column_to_companies_table.php000064400000001212152665565410022075 0ustar00text('specific_instructions')->nullable()->after('brand_color'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('companies', function (Blueprint $table) { $table->dropColumn('specific_instructions'); }); } }; 2024_02_21_051626_add_free_open_ai_items_to_settings_table.php000064400000001022152665565410017601 0ustar00json('free_open_ai_items')->nullable(); }); } public function down(): void { Schema::table('settings', function (Blueprint $table) { $table->dropColumn('free_open_ai_items'); }); } }; 2024_04_06_014025_change_columns_in_privacy_terms_table.php000064400000001561152665565410017162 0ustar00string('type')->nullable()->change(); $table->string('lang')->nullable()->change(); $table->text('content')->nullable()->change(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('privacy_terms', function (Blueprint $table) { $table->string('type')->nullable(false)->change(); $table->string('lang')->nullable(false)->change(); $table->text('content')->nullable(false)->change(); }); } }; 2023_07_13_143413_add_blog_options_to_frontend_sections_statuses_titles.php000064400000003166152665565410022535 0ustar00boolean('blog_active')->default(0); $table->string('blog_title')->default('Latest News'); $table->string('blog_subtitle')->default('Stay up-to-date'); $table->integer('blog_posts_per_page')->default(3); $table->string('blog_button_text')->default('Show more'); $table->string('blog_a_title')->default('Blog Posts'); $table->string('blog_a_subtitle')->default('Latest News'); $table->string('blog_a_description')->default('Welcome to our cozy corner of the internet, where you will find a delightful collection of our heartfelt and thought-provoking blog posts.'); $table->integer('blog_a_posts_per_page')->default(6); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('frontend_sections_statuses_titles', function (Blueprint $table) { $table->dropColumn([ 'blog_active', 'blog_title', 'blog_subtitle', 'blog_posts_per_page', 'blog_button_text', 'blog_a_title', 'blog_a_subtitle', 'blog_a_description', 'blog_a_posts_per_page', ]); }); } }; 2024_04_02_063345_add_anthropic_api_keys_to_users_table.php000064400000001273152665565410017153 0ustar00string('anthropic_api_keys') ->after('api_keys') ->nullable() ->default(''); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('users', function (Blueprint $table) { $table->dropColumn('anthropic_api_keys'); }); } }; 2024_02_14_124404_add_titlebar_status_to_pages_table.php000064400000001147152665565410016442 0ustar00tinyInteger('titlebar_status')->default(1); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('pages', function (Blueprint $table) { $table->dropColumn('titlebar_status'); }); } }; 2023_06_15_110436_add_privacy_and_terms_column_to_settings_table.php000064400000001513152665565410021061 0ustar00boolean('privacy_enable')->default(0); $table->boolean('privacy_enable_login')->default(0); $table->text('privacy_content')->nullable(); $table->text('terms_content')->nullable(); }); } public function down(): void { Schema::table('settings', function (Blueprint $table) { $table->dropColumn([ 'privacy_enable', 'privacy_enable_login', 'privacy_content', 'terms_content', ]); }); } }; 2024_12_10_080148_delete_menu_icon_one_time_migration.php000064400000002037152665565410016621 0ustar00appVersion() == 7.3) { Menu::query() ->where('parent_id', null) ->whereHas('children') ->get()->map(function ($item) { $item->children() ->where('parent_id', $item['id']) ->where('custom_menu', false) ->update([ 'icon' => null, ]); }); } } } /** * Reverse the migrations. */ public function down(): void { // } }; 2014_01_01_000001_convert_db_tables_engines_from_myisam_to_innodb.php000064400000001537152665565410021174 0ustar00convertMyISAMToInnoDB(); } } private function convertMyISAMToInnoDB(): void { DB::statement('SET FOREIGN_KEY_CHECKS=0'); $tables = DB::select("SHOW TABLE STATUS WHERE Engine = 'MyISAM'"); foreach ($tables as $table) { try { DB::statement("ALTER TABLE `{$table->Name}` ENGINE=InnoDB;"); } catch (Exception $e) { // ignore } } DB::statement('SET FOREIGN_KEY_CHECKS=1'); } /** * Reverse the migrations. */ public function down(): void {} }; 2023_04_13_180614_add_affiliate_to_user_orders_table.php000064400000001164152665565410016416 0ustar00double('affiliate_earnings')->default(0); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('user_orders', function (Blueprint $table) { $table->dropColumn('affiliate_earnings'); }); } }; 2023_08_14_073857_add_storage_to_user_openai_table.php000064400000001137152665565410016132 0ustar00string('storage')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('user_openai', function (Blueprint $table) { $table->dropColumn('storage'); }); } }; 2024_07_09_150801_add_dash_notify_seen_to_users_table.php000064400000001151152665565410016620 0ustar00boolean('dash_notify_seen')->default(false); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('users', function (Blueprint $table) { $table->dropColumn('dash_notify_seen'); }); } }; 2023_09_28_173820_add_hero_button_type_column_to_frontend_footer_settings.php000064400000001337152665565410023070 0ustar00integer('hero_button_type')->default(1)->after('hero_button_url'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('frontend_footer_settings', function (Blueprint $table) { $table->dropColumn('hero_button_type'); }); } }; 2023_05_26_134701_add_stripe_status_for_now_to_settings_table.php000064400000001175152665565410020443 0ustar00string('stripe_status_for_now')->default('disabled'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('settings', function (Blueprint $table) { $table->dropColumn('stripe_status_for_now'); }); } }; 2025_03_13_140538_add_slug_column_to_email_templates_table.php000064400000001140152665565410017626 0ustar00string('slug')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('email_templates', function (Blueprint $table) { $table->dropColumn('slug'); }); } }; 2024_06_04_032206_add_country_tax_enabled_to_gateways_table.php000064400000001165152665565410020010 0ustar00boolean('country_tax_enabled')->default(false); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('gateways', function (Blueprint $table) { $table->dropColumn('country_tax_enabled'); }); } }; 2024_03_14_062605_add_user_id_to_openai_table.php000064400000001013152665565410015034 0ustar00bigInteger('user_id')->nullable()->after('id'); }); } public function down(): void { Schema::table('openai', function (Blueprint $table) { $table->dropColumn('user_id'); }); } }; 2023_06_05_131107_add_settings_columns_to_settings_table.php000064400000002225152665565410017371 0ustar00boolean('feature_ai_writer')->default(true); $table->boolean('feature_ai_image')->default(true); $table->boolean('feature_ai_chat')->default(true); $table->boolean('feature_ai_code')->default(true); $table->boolean('feature_ai_speech_to_text')->default(true); $table->boolean('feature_affilates')->default(true); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('settings', function (Blueprint $table) { $table->dropColumn([ 'feature_ai_writer', 'feature_ai_image', 'feature_ai_chat', 'feature_ai_code', 'feature_ai_speech_to_text', 'feature_affilates', ]); }); } }; 2024_01_23_052857_add_ai_rewriter_to_table.php000064400000001170152665565410014375 0ustar00tinyInteger('feature_ai_rewriter')->default(true); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('settings', function (Blueprint $table) { $table->dropColumn('feature_ai_rewriter'); }); } }; 2024_07_25_120715_add_description_to_howitworks_table.php000064400000001102152665565410016674 0ustar00text('description')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('howitworks', function (Blueprint $table) { // }); } }; 2024_09_24_220949_rename_ai_engine_column_in_entities_table.php000064400000000774152665565410020004 0ustar00renameColumn('ai_engine', 'engine'); }); } public function down(): void { Schema::table('entities', static function ($table) { $table->renameColumn('engine', 'ai_engine'); }); } }; 2025_03_18_053123_create_content_boxes_table.php000064400000003645152665565410014747 0ustar00id(); $table->string('emoji')->nullable(); $table->string('title')->nullable(); $table->text('description')->nullable(); $table->string('background')->nullable(); $table->string('foreground')->nullable(); $table->timestamps(); }); $items = [ [ 'emoji' => '😎', 'title' => 'Partner', 'description' => 'Invite your colleagues and collaborators to join a team and maximize the benefits of AI.', 'background' => '#615C5A', 'foreground' => '#fff', ], [ 'emoji' => '🚀', 'title' => 'Collaborate', 'description' => 'Invite your colleagues and collaborators to join a team and maximize the benefits of AI.', 'background' => '#EB6434', 'foreground' => '#fff', ], [ 'emoji' => '👥', 'title' => 'Invite', 'description' => 'Invite your colleagues and collaborators to join a team and maximize the benefits of AI.', 'background' => '#3B4F99', 'foreground' => '#fff', ], ]; foreach ($items as $item) { ContentBox::query()->create($item); } } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('frontend_content_boxes'); } }; 2024_02_22_065844_create_chatbot_data_table.php000064400000001372152665565410014513 0ustar00id(); $table->bigInteger('chatbot_id')->nullable(); $table->longText('content')->nullable(); $table->string('type')->nullable(); $table->string('type_value')->nullable(); $table->string('path')->nullable(); $table->string('status')->nullable(); $table->timestamps(); }); } public function down(): void { Schema::dropIfExists('chatbot_data'); } }; 2024_03_29_212039_delete_column_from_extensions_table.php000064400000002541152665565410016671 0ustar00 'extensions', 'review' => 'extensions', 'description' => 'extensions', 'category' => 'extensions', 'badge' => 'extensions', 'zip_url' => 'extensions', 'price_id' => 'extensions', 'image_url' => 'extensions', 'detail' => 'extensions', 'licensed' => 'extensions', 'theme_type' => 'extensions', 'price' => 'extensions', 'fake_price' => 'extensions', ])->filter(function ($value, $key) { return Schema::hasColumn($value, $key); })->keys()->all(); if ($columnsToDrop !== []) { $table->dropColumn($columnsToDrop); } }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('extensions', function (Blueprint $table) { // }); } }; 2023_06_06_133614_add_new_field_for_chat.php000064400000001200152665565410013777 0ustar00text('chat_completions')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('openai_chat_category', function (Blueprint $table) { $table->dropColumn('chat_completions'); }); } }; 2023_11_28_160244_add_category_to_openai_chat_category_table.php000064400000001162152665565410020121 0ustar00string('category')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('openai_chat_category', function (Blueprint $table) { $table->dropColumn('category'); }); } }; 2023_06_22_133908_add_webhooks_to_gateways.php000064400000001136152665565410014441 0ustar00string('webhook_id')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('gateways', function (Blueprint $table) { $table->dropColumn('webhook_id'); }); } }; 2023_11_29_122715_create_rate_limits_table.php000064400000001270152665565410014404 0ustar00id(); $table->string('ip_address'); $table->integer('attempts')->default(0); $table->timestamp('last_attempt_at')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('rate_limits'); } }; 2023_12_14_075424_change_content_column_in_pages_table.php000064400000001324152665565410016745 0ustar00longText('content')->change(); }); } } /** * Reverse the migrations. */ public function down(): void { if (Schema::hasTable('pages')) { Schema::table('pages', function (Blueprint $table) { $table->text('content')->change(); }); } } }; 2025_03_10_221327_remove_cost_per_token_column_from_tokens_table.php000064400000001155152665565410021115 0ustar00dropColumn('cost_per_token'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('tokens', function (Blueprint $table) { $table->decimal('cost_per_token', 15, 2)->default(1.00); }); } }; 2024_03_04_070314_create_usage_table.php000064400000010274152665565410013170 0ustar00id(); $table->unsignedInteger('total_user_count')->default(0); $table->unsignedInteger('this_week_user_count')->default(0); $table->unsignedInteger('last_week_user_count')->default(0); $table->unsignedInteger('total_word_count')->default(0); $table->unsignedInteger('this_week_word_count')->default(0); $table->unsignedInteger('last_week_word_count')->default(0); $table->unsignedInteger('total_image_count')->default(0); $table->unsignedInteger('this_week_image_count')->default(0); $table->unsignedInteger('last_week_image_count')->default(0); $table->unsignedInteger('total_sales')->default(0); $table->unsignedInteger('this_week_sales')->default(0); $table->unsignedInteger('last_week_sales')->default(0); $table->timestamps(); }); // Count existing users $totaluserCount = DB::table('users')->count(); $totalWordCount = DB::table('user_openai')->where('credits', '!=', 1)->sum('credits'); $totalImageCount = DB::table('user_openai')->where('credits', '=', 1)->sum('credits'); $totalSalesCount = DB::table('user_orders')->sum('price'); // Count users created this week $thisWeekUserCount = DB::table('users')->whereBetween('created_at', [Carbon::now()->startOfWeek(), Carbon::now()->endOfWeek()])->count(); $thisWeekWordCount = DB::table('user_openai')->where('credits', '!=', 1)->whereBetween('created_at', [Carbon::now()->startOfWeek(), Carbon::now()->endOfWeek()])->sum('credits'); $thisWeekImageCount = DB::table('user_openai')->where('credits', '=', 1)->whereBetween('created_at', [Carbon::now()->startOfWeek(), Carbon::now()->endOfWeek()])->sum('credits'); $thisWeekSales = DB::table('user_orders')->whereBetween('created_at', [Carbon::now()->startOfWeek(), Carbon::now()->endOfWeek()])->sum('price'); // Count users created last week $lastWeekUserCount = DB::table('users')->whereBetween('created_at', [Carbon::now()->startOfWeek()->subWeek(), Carbon::now()->endOfWeek()->subWeek()])->count(); $lastWeekWordCount = DB::table('user_openai')->where('credits', '!=', 1)->whereBetween('created_at', [Carbon::now()->startOfWeek()->subWeek(), Carbon::now()->endOfWeek()->subWeek()])->sum('credits'); $lastWeekImageCount = DB::table('user_openai')->where('credits', '=', 1)->whereBetween('created_at', [Carbon::now()->startOfWeek()->subWeek(), Carbon::now()->endOfWeek()->subWeek()])->sum('credits'); $lastWeekSales = DB::table('user_orders')->whereBetween('created_at', [Carbon::now()->startOfWeek()->subWeek(), Carbon::now()->endOfWeek()->subWeek()])->sum('price'); // Set the initial value in settings table DB::table('usage')->updateOrInsert( [], [ 'total_user_count' => $totaluserCount, 'this_week_user_count' => $thisWeekUserCount, 'last_week_user_count' => $lastWeekUserCount, 'total_word_count' => $totalWordCount, 'this_week_word_count' => $thisWeekWordCount, 'last_week_word_count' => $lastWeekWordCount, 'total_image_count' => $totalImageCount, 'this_week_image_count' => $thisWeekImageCount, 'last_week_image_count' => $lastWeekImageCount, 'total_sales' => $totalSalesCount, 'this_week_sales' => $thisWeekSales, 'last_week_sales' => $lastWeekSales, 'created_at' => now(), 'updated_at' => now(), ] ); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('usage'); } }; 2025_08_22_090439_add_access_type_column_to_openai_table.php000064400000002371152665565410017304 0ustar00string('access_type', 20)->default(\App\Enums\AccessType::REGULAR->value)->index(); }); try { \App\Models\OpenAIGenerator::query()->each(function ($generator) { $generator->access_type = $generator->premium ? \App\Enums\AccessType::PREMIUM->value : \App\Enums\AccessType::REGULAR->value; $generator->save(); }); \App\Models\OpenaiGeneratorChatCategory::query()->each(function ($generator) { if (! $generator->plan) { $generator->plan = \App\Enums\AccessType::REGULAR->value; $generator->save(); } }); } catch (\Throwable $th) { } } /** * Reverse the migrations. */ public function down(): void { Schema::table('openai', function (Blueprint $table) { $table->dropColumn('access_type'); }); } }; 2025_06_26_050421_add_is_demo_to_user_openai_table.php000064400000001174152665565410016067 0ustar00boolean('is_demo')->default(false)->after('id')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('user_openai', function (Blueprint $table) { $table->dropColumn('is_demo'); }); } }; 2024_02_23_111834_add_api_keys_to_users_table.php000064400000001065152665565410015101 0ustar00text('api_keys')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('users', function (Blueprint $table) { // }); } }; 2024_01_23_143224_feature_ai_youtube_option.php000064400000001166152665565410014642 0ustar00tinyInteger('feature_ai_youtube')->default(true); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('settings', function (Blueprint $table) { $table->dropColumn('feature_ai_youtube'); }); } }; 2023_05_31_090418_create_customsettings_table.php000064400000003433152665565410015166 0ustar00id(); $table->string('key'); // Unique key value of setting e.g. : howitworks_link $table->string('title')->nullable(); // Short description to remember where/what for it is used $table->string('value_str')->nullable(); // String value $table->text('value_text')->nullable(); // Text value $table->longText('value_longtext')->nullable(); // Long Text value $table->text('value_html')->nullable(); // HTML value (Cleans/Sanitizes in Model) $table->integer('value_int')->default(0); // Integer value $table->bigInteger('value_bigint')->nullable(); // Big integer value $table->unsignedBigInteger('value_ubigint')->nullable(); // Unsigned big integer value $table->double('value_double')->default(0); // Double value $table->boolean('value_bool')->default(false); // Boolean value $table->date('value_date')->nullable(); // Date value $table->timestamp('value_timestamp')->nullable(); // Timestamp value $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('customsettings'); } }; 2024_02_26_184945_create_companies_table.php000064400000002117152665565410014062 0ustar00id(); $table->string('name')->nullable(); $table->text('industry')->nullable(); $table->text('description')->nullable(); $table->string('website')->nullable(); $table->string('tagline')->nullable(); $table->string('logo')->nullable(); $table->string('brand_color')->nullable(); $table->unsignedBigInteger('user_id')->nullable(); // Add a nullable foreign key to link to the User model $table->foreign('user_id')->references('id')->on('users')->onDelete('set null'); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('companies'); } }; 2024_08_06_115604_update_admin_to_super_admin_in_users_table.php000064400000001103152665565410020172 0ustar00where('type', Roles::ADMIN->value) ->update(['type' => 'super_admin']); } /** * Reverse the migrations. */ public function down(): void { DB::table('users') ->where('type', 'super_admin') ->update(['type' => Roles::ADMIN->value]); } }; 2024_11_25_101434_create_health_check_result_history_items_table.php000064400000002176152665565410021050 0ustar00id(); $table->string('check_name'); $table->string('check_label'); $table->string('status'); $table->text('notification_message'); $table->string('short_summary')->nullable(); $table->json('meta'); $table->timestamp('ended_at'); $table->char('batch', 36); $table->index('created_at'); $table->index('batch'); $table->timestamps(); }); } } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('health_check_result_history_items'); } }; 2023_05_25_182410_add_email_confirmation_to_users_table.php000064400000001273152665565410017137 0ustar00text('email_confirmation_code')->nullable(); $table->boolean('email_confirmed')->default(0); $table->text('password_reset_code')->nullable(); }); } public function down(): void { Schema::table('users', function (Blueprint $table) { $table->dropColumn(['email_confirmation_code', 'email_confirmed', 'password_reset_code']); }); } }; 2023_11_27_052529_create_prompt_library_table.php000064400000001152152665565410015137 0ustar00id(); $table->string('title'); $table->text('prompt'); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('prompt_library'); } }; 2025_05_21_151911_add_engine_and_model_columns_to_user_openai_table.php000064400000001162152665565410021454 0ustar00string('engine')->nullable(); $table->string('model')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('user_openai', function (Blueprint $table) { // }); } }; 2024_09_19_211829_make_sure_to_remove_deprecated_entities_before_migration.php000064400000002112152665565410023117 0ustar00checkSD(); } private function checkSD(): void { $settingTwo = SettingTwo::query()->first(); if ($settingTwo) { $deprecatedEntities = ['stable-diffusion-xl-beta-v2-2-2', 'stable-diffusion-xl-1024-v0-9', 'stable-diffusion-512-v2-1']; $stableDiffusionDefaultModel = $settingTwo->stablediffusion_default_model; if (in_array($stableDiffusionDefaultModel, $deprecatedEntities, true)) { $settingTwo->update(['stablediffusion_default_model' => 'stable-diffusion-xl-1024-v1-0']); } } } /** * Reverse the migrations. */ public function down(): void { Schema::table('remove_deprecated_entities_before_migration', function (Blueprint $table) { // }); } }; 2025_05_05_102938_remove_gemini_deprected_models.php000064400000002004152665565410015605 0ustar00 $newDefault, ])->save(); } } catch (\Throwable $exception) { } } /** * Reverse the migrations. */ public function down(): void { // } }; 2023_06_07_124125_create_gatewayproducts_table.php000064400000001547152665565410015321 0ustar00id(); $table->integer('plan_id')->default(0); $table->string('plan_name')->nullable(); $table->string('gateway_code')->nullable(); $table->string('gateway_title')->nullable(); $table->string('product_id')->nullable(); $table->string('price_id')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('gatewayproducts'); } }; 2023_11_29_060800_create_favourite_list_table.php000064400000001225152665565410015123 0ustar00id(); $table->integer('user_id'); $table->string('type'); $table->integer('item_id'); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('favourite_list'); } }; 2024_01_16_063552_add_realtime_colmn_to_user_openai_chat_messages_table.php000064400000001175152665565410022333 0ustar00boolean('realtime')->default(0); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('user_openai_chat_messages', function (Blueprint $table) { $table->dropColumn('realtime'); }); } }; 2024_03_28_134851_add_to_token_to_users_table.php000064400000001102152665565410015121 0ustar00rememberToken(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('users', function (Blueprint $table) { $table->dropRememberToken(); }); } }; 2023_06_15_104503_create_oldgatewayproducts_table.php000064400000001651152665565410016011 0ustar00id(); $table->integer('plan_id')->default(0); $table->string('plan_name')->nullable(); $table->string('gateway_code')->nullable(); $table->string('product_id')->nullable(); $table->string('old_price_id')->nullable(); $table->string('new_price_id')->nullable(); $table->string('status')->nullable('check'); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('oldgatewayproducts'); } }; 2024_12_16_080709_add_hidden_to_plans_table.php000064400000001335152665565410014515 0ustar00string('hidden_url')->nullable(); $table->boolean('hidden')->default(false); $table->integer('max_subscribe')->nullable(); $table->date('last_date')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('plans', function (Blueprint $table) { // }); } }; 2024_02_19_172005_add_voice_clone_settings_table.php000064400000001225152665565410015557 0ustar00boolean('feature_ai_voice_clone')->default(false)->after('feature_ai_code'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('settings', function (Blueprint $table) { $table->dropColumn('feature_ai_voice_clone'); }); } }; 2024_03_12_143138_add_auth_view_options_column_to_settings_table.php000064400000001152152665565410021115 0ustar00text('auth_view_options')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('settings', function (Blueprint $table) { $table->dropColumn('auth_view_options'); }); } }; 2024_09_24_213419_rename_ai_models_to_entities_table.php000064400000000532152665565410016443 0ustar00unsignedBigInteger('team_id')->nullable()->after('id'); $table->unsignedBigInteger('team_manager_id')->nullable()->after('team_id'); }); } public function down(): void { Schema::table('users', function (Blueprint $table) { $table->dropColumn(['team_id', 'team_manager_id']); }); } }; 2023_07_11_200310_add_liquid_license_domain_key_to_settings_two.php000064400000001310152665565410020664 0ustar00text('liquid_license_domain_key')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { if (Schema::hasTable('settings_two')) { Schema::table('settings_two', function (Blueprint $table) { $table->dropColumn('liquid_license_domain_key'); }); } } }; 2025_05_02_120212_change_name_in_dashboard_widgets.php000064400000001135152665565410016030 0ustar00where('name', 'api-cost-distrubition') ->update(['name' => 'api-cost-distribution']); } /** * Reverse the migrations. */ public function down(): void { Schema::table('dashboard_widgets', function (Blueprint $table) { // }); } }; 2023_06_23_091003_create_email_templates_table.php000064400000001224152665565410015225 0ustar00id(); $table->string('title'); $table->string('subject'); $table->text('content'); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('email_templates'); } }; 2023_08_22_143604_add_iyzico_id_column_to_users.php000064400000001130152665565410015462 0ustar00string('iyzico_id')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('users', function (Blueprint $table) { $table->dropColumn(['iyzico_id']); }); } }; 2023_09_20_140329_add_feature_ai_article_wizard_to_settings_table.php000064400000001204152665565410021162 0ustar00tinyInteger('feature_ai_article_wizard')->default(true); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('settings', function (Blueprint $table) { $table->dropColumn('feature_ai_article_wizard'); }); } }; 2023_12_15_003956_update_users_change_avatar_length.php000064400000001276152665565410016314 0ustar00string('avatar', 1055)->default('assets/img/auth/default-avatar.png')->change(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('users', function (Blueprint $table) { $table->string('avatar', 1055)->default('assets/img/auth/default-avatar.png')->change(); }); } }; 2025_06_25_062502_create_recent_search_keys_table.php000064400000001277152665565410015736 0ustar00id(); $table->string('keyword')->index(); $table->foreignIdFor(User::class)->constrained()->cascadeOnDelete(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('recent_search_keys'); } }; 2023_07_21_121324_options_to_settingstwo_table.php000064400000001336152665565410015407 0ustar00string('stablediffusion_default_language')->default('en-US'); }); } /** * Reverse the migrations. */ public function down(): void { if (Schema::hasTable('settings_two')) { Schema::table('settings_two', function (Blueprint $table) { $table->dropColumn('stablediffusion_default_language'); }); } } }; 2023_04_13_175939_add_affiliate_to_settings_table.php000064400000001232152665565410015734 0ustar00string('affiliate_minimum_withdrawal')->default(10); $table->string('affiliate_commission_percentage')->default(10); }); } public function down(): void { Schema::table('settings', function (Blueprint $table) { $table->dropColumn(['affiliate_minimum_withdrawal', 'affiliate_commission_percentage']); }); } }; 2023_06_02_124908_create_frontend_generators_table.php000064400000002003152665565410016134 0ustar00id(); $table->string('menu_title')->nullable(); $table->string('subtitle_one')->nullable(); $table->string('subtitle_two')->nullable(); $table->string('title')->nullable(); $table->text('text')->nullable(); $table->string('image')->nullable(); $table->string('image_title')->nullable(); $table->string('image_subtitle')->nullable(); $table->string('color')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('frontend_generators'); } }; 2024_01_04_073526_add_mobile_payment_active_column_to_settings_table.php000064400000001165152665565410021714 0ustar00boolean('mobile_payment_active')->default(0); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('settings', function (Blueprint $table) { $table->dropColumn('mobile_payment_active'); }); } }; 2019_05_03_000002_create_subscriptions_table.php000064400000002174152665565410014763 0ustar00id(); $table->foreignId('user_id'); $table->unsignedBigInteger('plan_id')->nullable(); $table->foreign('plan_id')->references('id')->on('plans')->nullOnDelete(); $table->string('name'); $table->string('stripe_id')->unique(); $table->string('stripe_status'); $table->string('stripe_price')->nullable(); $table->integer('quantity')->nullable(); $table->timestamp('trial_ends_at')->nullable(); $table->timestamp('ends_at')->nullable(); $table->timestamps(); $table->index(['user_id', 'stripe_status']); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('subscriptions'); } }; 2023_11_17_155940_add_folder_id_to_user_openai.php000064400000001425152665565410015235 0ustar00unsignedBigInteger('folder_id')->nullable(); $table->foreign('folder_id')->references('id')->on('folders')->onDelete('cascade'); }); } public function down(): void { Schema::table('user_openai', function (Blueprint $table) { if (! isDBDriverSQLite()) { $table->dropForeign(['folder_id']); } $table->dropColumn('folder_id'); }); } }; 2024_12_16_074143_add_column_to_scheduled_posts_table.php000064400000001554152665565410016630 0ustar00text('content')->nullable()->after('prompt'); $table->text('media')->nullable()->after('content'); $table->boolean('auto_generate')->default(false)->nullable()->after('media'); }); } } public function down(): void { if (Schema::hasTable('scheduled_posts')) { Schema::table('scheduled_posts', function (Blueprint $table) { $table->dropColumn(['content', 'media', 'auto_generate']); }); } } }; 2024_01_29_150757_chatbot_message_data.php000064400000001211152665565410013521 0ustar00tinyInteger('is_chatbot')->default(false); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('user_openai_chat_messages', function (Blueprint $table) { $table->dropColumn('is_chatbot'); }); } }; 2024_05_21_091043_create_tokens_table.php000064400000001320152665565410013362 0ustar00id(); $table->string('type')->default(\App\Enums\AITokenType::WORD->value); $table->foreignId('ai_model_id')->constrained('ai_models', 'id')->cascadeOnDelete(); $table->decimal('cost_per_token', 15, 2)->default(1.00); $table->timestamps(); }); } public function down(): void { Schema::dropIfExists('tokens'); } }; 2023_03_20_134019_add_type_to_user_orders_table.php000064400000001145152665565410015445 0ustar00string('type')->default('subscription'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('user_orders', function (Blueprint $table) { $table->dropColumn('type'); }); } }; 2023_05_30_110811_create_howitworks_table.php000064400000001174152665565410014300 0ustar00id(); $table->integer('order')->default(0); $table->string('title')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('howitworks'); } }; 2025_03_24_112325_add_is_pinned_to_user_openai_chat_table.php000064400000001161152665565410017410 0ustar00boolean('is_pinned')->default(false); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('user_openai_chat', function (Blueprint $table) { $table->dropColumn('is_pinned'); }); } }; 2024_12_17_081626_add_index_to_user_openai.php000064400000001321152665565410014411 0ustar00id(); $table->unsignedBigInteger('user_id')->nullable(); $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); $table->string('subject'); $table->string('status')->default('Waiting for answer'); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('user_support'); } }; 2024_07_19_212020_create_advanced_features_sectoion_table.php000064400000001253152665565410017431 0ustar00id(); $table->string('title'); $table->text('description'); $table->string('image'); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('advanced_features_sectoion'); } }; 2023_05_31_153647_add_new_logo_type_options.php000064400000005031152665565410014636 0ustar00string('logo_dark')->default('magicAI-logo-dark.svg'); $table->text('logo_dashboard')->nullable(); $table->text('logo_dashboard_dark')->nullable(); $table->string('logo_collapsed_dark')->default('magicAI-logo-collapsed-dark.svg'); $table->text('logo_2x')->nullable(); $table->text('logo_dark_2x')->nullable(); $table->text('logo_dashboard_2x')->nullable(); $table->text('logo_dashboard_dark_2x')->nullable(); $table->text('logo_collapsed_2x')->nullable(); $table->text('logo_collapsed_dark_2x')->nullable(); $table->string('logo_dark_path')->default('assets/img/logo/magicAI-logo-dark.svg'); $table->text('logo_dashboard_path')->nullable(); $table->text('logo_dashboard_dark_path')->nullable(); $table->string('logo_collapsed_dark_path')->default('assets/img/logo/magicAI-logo-collapsed-dark.svg'); $table->text('logo_2x_path')->nullable(); $table->text('logo_dark_2x_path')->nullable(); $table->text('logo_dashboard_2x_path')->nullable(); $table->text('logo_dashboard_dark_2x_path')->nullable(); $table->text('logo_collapsed_2x_path')->nullable(); $table->text('logo_collapsed_dark_2x_path')->nullable(); }); } public function down(): void { Schema::table('settings', function (Blueprint $table) { $table->dropColumn([ 'logo_dark', 'logo_dashboard', 'logo_dashboard_dark', 'logo_collapsed_dark', 'logo_2x', 'logo_dark_2x', 'logo_dashboard_2x', 'logo_dashboard_dark_2x', 'logo_collapsed_2x', 'logo_collapsed_dark_2x', 'logo_dark_path', 'logo_dashboard_path', 'logo_dashboard_dark_path', 'logo_collapsed_dark_path', 'logo_2x_path', 'logo_dark_2x_path', 'logo_dashboard_2x_path', 'logo_dashboard_dark_2x_path', 'logo_collapsed_2x_path', 'logo_collapsed_dark_2x_path', ]); }); } }; 2023_11_17_155039_create_folders_table.php000064400000001315152665565410013530 0ustar00id(); $table->string('name'); $table->unsignedBigInteger('created_by'); $table->timestamps(); $table->foreign('created_by')->references('id')->on('users')->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('folders'); } }; 2023_12_18_145013_add_ai_pdf_to_chat_to_settings_table.php000064400000001156152665565410016720 0ustar00tinyInteger('feature_ai_pdf')->default(true); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('settings', function (Blueprint $table) { $table->dropColumn('feature_ai_pdf'); }); } }; 2023_04_13_175439_create_user_affiliates_table.php000064400000001436152665565410015247 0ustar00id(); $table->unsignedBigInteger('user_id')->nullable(); $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); $table->double('amount'); $table->string('status')->default('Waiting'); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('user_affiliates'); } }; 2024_06_18_080246_add_some_fields_to_frontend_tools_table.php000064400000002104152665565410017471 0ustar00string('buy_link')->default('Start Making Money'); $table->string('buy_link_url')->default('https://codecanyon.net/item/magicai-openai-content-text-image-chat-code-generator-as-saas/45408109'); $table->string('learn_more_link')->default('Discover MagicAI'); $table->string('learn_more_link_url')->default('#templates'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('frontend_tools', function (Blueprint $table) { $table->dropColumn('buy_link'); $table->dropColumn('buy_link_url'); $table->dropColumn('learn_more_link'); $table->dropColumn('learn_more_link_url'); }); } }; 2023_06_01_145426_create_gateways_table.php000064400000003235152665565410013715 0ustar00id(); $table->string('code')->nullable(); $table->string('title')->nullable(); $table->integer('is_active')->default(0); $table->string('mode')->nullable(); $table->string('sandbox_client_id')->nullable(); $table->string('sandbox_client_secret')->nullable(); $table->string('sandbox_app_id')->nullable(); $table->string('live_client_id')->nullable(); $table->string('live_client_secret')->nullable(); $table->string('live_app_id')->nullable(); $table->string('payment_action')->nullable(); // PAYPAL: Can only be 'Sale', 'Authorization' or 'Order' $table->string('currency')->nullable(); $table->string('currency_locale')->nullable(); $table->string('notify_url')->nullable(); $table->string('base_url')->nullable(); $table->string('sandbox_url')->nullable(); $table->string('locale')->nullable(); $table->string('validate_ssl')->nullable(); $table->string('webhook_secret')->nullable(); $table->string('logger')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('gateways'); } }; 2023_03_14_073839_create_user_openai_table.php000064400000002164152665565410014413 0ustar00id(); $table->unsignedBigInteger('user_id')->nullable(); $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); $table->unsignedBigInteger('openai_id')->nullable(); $table->foreign('openai_id')->references('id')->on('openai')->nullOnDelete(); $table->text('input')->nullable(); $table->text('response')->nullable(); $table->text('output')->nullable(); $table->text('hash')->nullable(); $table->string('credits')->nullable(); $table->string('words')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('user_openai'); } }; 2024_10_22_154324_remove_plan_total_words_and_images_columns.php000064400000001536152665565410020234 0ustar00dropColumn(['total_words', 'total_images', 'display_imag_count', 'display_word_count']); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('plans', static function (Blueprint $table) { $table->integer('total_words')->default(0); $table->integer('total_images')->default(0); $table->boolean('display_imag_count')->default(1); $table->boolean('display_word_count')->default(1); }); } }; 2023_05_15_140015_create_user_openai_chat_table.php000064400000002053152665565410015367 0ustar00id(); $table->unsignedBigInteger('user_id')->nullable(); $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); $table->unsignedBigInteger('openai_chat_category_id')->nullable(); $table->foreign('openai_chat_category_id')->references('id')->on('openai_chat_category')->onDelete('cascade'); $table->string('title')->nullable(); $table->string('total_credits')->nullable(); $table->string('total_words')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('user_openai_chat'); } }; 2024_05_08_163635_create_photo_studios_table.php000064400000001222152665565410014777 0ustar00id(); $table->bigInteger('user_id')->nullable(); $table->string('photo')->nullable(); $table->text('payload')->nullable(); $table->integer('credits')->default(0); $table->timestamps(); }); } public function down(): void { Schema::dropIfExists('photo_studios'); } }; 2023_07_19_105519_add_package_column_to_openai_table.php000064400000001122152665565410016365 0ustar00text('package')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('openai', function (Blueprint $table) { $table->dropColumn('package'); }); } }; 2025_03_18_053809_create_curtains_table.php000064400000010204152665565410013725 0ustar00id(); $table->string('title')->nullable(); $table->string('title_icon')->nullable(); $table->json('sliders')->nullable(); $table->timestamps(); }); $items = [ [ 'title' => 'Sarah J.', 'title_icon' => '', 'sliders' => [ [ 'title' => 'Sarah J.', 'description' => 'Translates Podcasts into different languages.', 'bg_color' => '', 'bg_image' => '', 'bg_video' => '/themes/social-media-front/assets/landing-page/demo-vid-1.webm', 'title_color' => '', 'description_color' => '', ], [ 'title' => 'Sarah J.', 'description' => '', 'bg_color' => '', 'bg_image' => '', 'bg_video' => '/themes/social-media-front/assets/landing-page/demo-vid-1.webm', 'title_color' => '', 'description_color' => '', ], [ 'title' => 'Sarah J.', 'description' => '', 'bg_color' => '', 'bg_image' => '', 'bg_video' => '/themes/social-media-front/assets/landing-page/demo-vid-1.webm', 'title_color' => '', 'description_color' => '', ], ], ], [ 'title' => 'Jason R.', 'title_icon' => '', 'sliders' => [ [ 'title' => 'Jason R.', 'description' => '', 'bg_color' => '#aea397', 'bg_image' => '', 'bg_video' => '/themes/social-media-front/assets/landing-page/demo-vid-1.webm', 'title_color' => '', 'description_color' => '', ], [ 'title' => 'Jason R.', 'description' => '', 'bg_color' => '#aea397', 'bg_image' => '/themes/social-media-front/assets/landing-page/banner-img.jpg', 'bg_video' => '', 'title_color' => '', 'description_color' => '', ], ], ], [ 'title' => 'Mary J.', 'title_icon' => '', 'sliders' => [ [ 'title' => 'Mary J.', 'description' => '', 'bg_color' => '#496e8f', 'bg_image' => '', 'bg_video' => '/themes/social-media-front/assets/landing-page/demo-vid-1.webm', 'title_color' => '', 'description_color' => '', ], ], ], ]; foreach ($items as $item) { \App\Models\Frontend\Curtain::create($item); } } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('frontend_curtains'); } }; 2024_02_27_134353_add_tone_of_voice_to_companies_table.php000064400000001146152665565410016735 0ustar00string('tone_of_voice')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('companies', function (Blueprint $table) { $table->dropColumn('tone_of_voice'); }); } }; 2025_06_20_214812_add_2checkout_customer_reference_colmn_to_users_table.php000064400000001536152665565410022320 0ustar00string('two_checkout_customer_reference')->nullable()->after('stripe_id'); } }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('users', function (Blueprint $table) { if (Schema::hasColumn('users', 'two_checkout_customer_reference')) { $table->dropColumn('two_checkout_customer_reference'); } }); } }; 2023_12_28_040900_add_new_fields_to_user_orders_table.php000064400000001244152665565410016606 0ustar00string('tax_rate')->nullable(); $table->string('tax_value')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('user_orders', function (Blueprint $table) { $table->dropColumn(['tax_rate', 'tax_value']); }); } }; 2024_02_26_185155_create_products_table.php000064400000002046152665565410013742 0ustar00id(); $table->string('name')->nullable(); $table->integer('type')->nullable(); $table->text('key_features')->nullable(); $table->unsignedBigInteger('user_id')->nullable(); // Add a nullable foreign key to link to the User model $table->foreign('user_id')->references('id')->on('users')->onDelete('set null'); $table->unsignedBigInteger('company_id')->nullable(); $table->foreign('company_id')->references('id')->on('companies')->onDelete('set null'); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('products'); } }; 2023_05_29_130259_create_testimonials_table.php000064400000001415152665565410014611 0ustar00id(); $table->string('avatar')->default('assets/img/auth/default-avatar.png'); $table->string('full_name')->nullable(); $table->string('job_title')->nullable(); $table->string('words')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('testimonials'); } }; 2024_05_22_154814_change_integer_to_float_in_team_members.php000064400000001452152665565410017441 0ustar00decimal('remaining_images', 15, 2)->nullable()->change(); $table->decimal('remaining_words', 15, 2)->nullable()->change(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('team_members', function (Blueprint $table) { $table->integer('remaining_images')->nullable()->change(); $table->integer('remaining_words')->nullable()->change(); }); } }; 2024_06_25_112300_create_notifications_table.php000064400000001326152665565410014731 0ustar00uuid('id')->primary(); $table->string('type'); $table->morphs('notifiable'); $table->text('data'); $table->timestamp('read_at')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('notifications'); } }; 2019_05_02_122941_create_plans_table.php000064400000002606152665565410013211 0ustar00id(); $table->boolean('active')->default(1); $table->string('name')->nullable(); $table->double('price')->default(0); $table->string('currency')->default('USD'); $table->string('frequency')->default('monthly'); $table->boolean('is_featured')->default(0); $table->boolean('is_free')->default(0); $table->string('stripe_product_id')->nullable(); $table->string('total_words')->nullable(); $table->string('total_images')->nullable(); $table->string('ai_name')->nullable(); $table->bigInteger('max_tokens')->nullable(); $table->boolean('can_create_ai_images')->nullable(); $table->string('plan_type')->default('all'); $table->text('features')->nullable(); $table->string('type')->default('subscription'); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('plans'); } }; 2023_06_08_122900_add_hero_title_text_rotator_to_frontend_footer_settings_table.php000064400000001300152665565410024217 0ustar00string('hero_title_text_rotator')->nullable()->default('Generator,Chatbot,Assistant'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('frontend_footer_settings', function (Blueprint $table) { $table->dropColumn('hero_title_text_rotator'); }); } }; 2023_07_18_222043_add_image_storage_field_to_settings_two_table.php000064400000001277152665565410020646 0ustar00string('ai_image_storage')->default('public'); }); } /** * Reverse the migrations. */ public function down(): void { if (Schema::hasTable('settings_two')) { Schema::table('settings_two', function (Blueprint $table) { $table->dropColumn('ai_image_storage'); }); } } }; 2024_02_16_163955_create_elevenlab_voices_table.php000064400000001211152665565410015400 0ustar00id(); $table->string('name'); $table->string('voice_id')->nullable(); $table->string('path')->nullable(); $table->boolean('status')->default(true); $table->timestamps(); }); } public function down(): void { Schema::dropIfExists('elevenlab_voices'); } }; 2023_07_24_103747_create_subscriptions_yokassa_table.php000064400000002171152665565410016536 0ustar00id(); $table->foreignId('user_id'); $table->unsignedBigInteger('plan_id')->nullable(); $table->foreign('plan_id')->references('id')->on('plans')->nullOnDelete(); $table->string('name'); $table->string('payment_method_id')->nullabe(); $table->string('subscription_status')->nullabe(); $table->timestamp('trial_ends_at')->nullable(); $table->timestamp('ends_at')->nullable(); $table->timestamp('next_pay_at')->nullable(); $table->timestamps(); $table->index(['user_id', 'subscription_status']); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('subscriptions_yokassa'); } }; 2025_08_13_102938_remove_openai_deprected_models.php000064400000002043152665565410015615 0ustar00openai_default_model; if (in_array($default, $modelsToBeRemoved, true)) { $newDefault = 'gpt-4o'; $settings->update(['openai_default_model' => $newDefault]); Setting::forgetCache(); } foreach ($modelsToBeRemoved as $model) { EntityRemover::removeEntity($model); } } catch (\Throwable $exception) { } } /** * Reverse the migrations. */ public function down(): void { // } }; 2014_10_12_100000_create_password_reset_tokens_table.php000064400000001201152665565410016457 0ustar00string('email')->primary(); $table->string('token'); $table->timestamp('created_at')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('password_reset_tokens'); } }; 2024_01_02_071044_add_auto_renewal_colmn_to_plans_table.php000064400000001155152665565410017120 0ustar00boolean('auto_renewal')->default(0); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('subscriptions', function (Blueprint $table) { $table->dropColumn('auto_renewal'); }); } }; 2025_03_17_111036_add_social_theme_frontend_setting_migration.php000064400000036260152665565410020350 0ustar00string('no_credit_cart_required', 500)->default('No credit cart required.')->nullable(); } if (! Schema::hasColumn('frontend_footer_settings', 'faster_content_creation')) { $table->string('faster_content_creation', 500)->default('10xFaster Content Creation')->nullable(); } if (! Schema::hasColumn('frontend_footer_settings', 'over_5000_businesses')) { $table->string('over_5000_businesses', 500)->default('over 5000+ businesses trust us to boost their social media precense')->nullable(); } if (! Schema::hasColumn('frontend_footer_settings', 'join_the_ranks')) { $table->longText('join_the_ranks')->nullable(); } }); if (Schema::hasColumn('frontend_footer_settings', 'join_the_ranks')) { $find = \App\Models\Frontend\FrontendSetting::query()->first(); if ($find) { $find->join_the_ranks = 'Join the ranks of renowned influencers and top-tier social media agencies.'; $find->save(); } } } /** * Reverse the migrations. */ public function down(): void { // } }; 2024_02_14_085457_add_razorpay_id_column_to_users_table.php000064400000001204152665565410017203 0ustar00string('razorpay_id')->nullable()->index(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('users', function (Blueprint $table) { $table->dropColumn([ 'razorpay_id', ]); }); } }; 2024_06_27_135525_add_recaptcha_to_settings_table.php000064400000001410152665565410015733 0ustar00boolean('recaptcha_login')->default(false); $table->boolean('recaptcha_register')->default(false); $table->string('recaptcha_sitekey')->nullable(); $table->string('recaptcha_secretkey')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('settings', function (Blueprint $table) { // }); } }; 2025_10_13_212019_add_affiliate_status_column_to_plans_table.php000064400000001150152665565410020144 0ustar00boolean('affiliate_status')->default(true); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('plans', function (Blueprint $table) { $table->dropColumn('affiliate_status'); }); } }; 2024_10_14_082619_add_aimlapi_key_to_settings_table.php000064400000001166152665565410016271 0ustar00text('aimlapi_key')->nullable(); $table->text('ai_music_model')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('settings', function (Blueprint $table) { // }); } }; 2025_05_06_102938_2remove_gemini_deprected_models.php000064400000001547152665565410015703 0ustar00where('migration', '2025_05_05_102938_remove_gemini_deprected_models') ->delete(); $modelsToBeRemoved = [ 'gemini-pro-vision', 'gemini-pro', 'gemini-1.5-pro-latest', 'gemini-1__5-pro-latest', ]; $default = setting('gemini_default_model'); if (in_array($default, $modelsToBeRemoved, true)) { $newDefault = 'gemini-1.5-flash'; setting([ 'gemini_default_model' => $newDefault, ])->save(); } } /** * Reverse the migrations. */ public function down(): void { // } }; 2024_08_12_050354_create_user_credits_table.php000064400000001053152665565410014560 0ustar00id(); $table->bigInteger('user_id')->nullable(); $table->json('credits')->nullable(); $table->timestamps(); }); } public function down(): void { Schema::dropIfExists('user_credits'); } }; 2023_06_09_091144_add_keywords_columns_to_settings_table.php000064400000001161152665565410017410 0ustar00text('meta_keywords')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('settings', function (Blueprint $table) { $table->dropColumn('meta_keywords'); }); } }; 2024_01_17_072456_create_extensions_table.php000064400000001746152665565410014302 0ustar00id(); $table->string('slug')->nullable(); $table->string('name')->nullable(); $table->float('review')->nullable(); $table->text('description')->nullable(); $table->string('category')->nullable(); $table->string('badge')->nullable(); $table->string('zip_url')->nullable(); $table->string('price_id')->nullable(); $table->boolean('installed')->default(false); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('extensions'); } }; 2024_05_03_094207_add_show_page_on_footer_to_pages_table.php000064400000001102152665565410017256 0ustar00tinyInteger('show_on_footer')->default(0); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('pages', function (Blueprint $table) { // }); } }; 2024_02_28_130323_add_user_id_to_chatbot_table.php000064400000002075152665565410015213 0ustar00bigInteger('user_id')->nullable()->after('id'); }); Schema::table('chatbot', function (Blueprint $table) { $table->bigInteger('user_id')->nullable()->after('id'); }); Schema::table('openai_chat_category', function (Blueprint $table) { $table->bigInteger('user_id')->nullable()->after('id'); }); } public function down(): void { Schema::table('chat_category', function (Blueprint $table) { $table->dropColumn('user_id'); }); Schema::table('chatbot', function (Blueprint $table) { $table->dropColumn('user_id'); }); Schema::table('openai_chat_category', function (Blueprint $table) { $table->dropColumn('user_id'); }); } }; 2024_01_29_143721_create_team_members_table.php000064400000002223152665565410014527 0ustar00id(); $table->foreignId('team_id')->constrained('teams')->cascadeOnDelete(); $table->foreignId('user_id')->nullable()->constrained('users')->nullOnDelete(); $table->string('role')->default('member'); $table->string('email')->nullable(); $table->string('status')->default('waiting')->nullable(); $table->boolean('allow_unlimited_credits')->default(true); $table->integer('remaining_images')->nullable(); $table->integer('remaining_words')->nullable(); $table->integer('used_image_credit')->default(0); $table->integer('used_word_credit')->default(0); $table->timestamp('joined_at')->nullable(); $table->timestamps(); }); } public function down(): void { Schema::dropIfExists('team_members'); } }; 2023_08_31_135312_change_facebook_token_type.php000064400000001140152665565410014705 0ustar00text('facebook_token')->change(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('users', function (Blueprint $table) { $table->text('facebook_token')->change(); }); } }; 2025_04_10_113919_create_referers_table.php000064400000001246152665565410013710 0ustar00id(); $table->string('session_id'); $table->string('referer'); $table->string('domain', 128)->index(); $table->timestamp('created_at'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('referers'); } }; 2025_02_26_082114_add_xai_api_keys_to_users_table.php000064400000001132152665565410015737 0ustar00text('xai_api_keys')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('users', function (Blueprint $table) { $table->dropColumn('xai_api_keys'); }); } }; 2024_09_25_125009_update_sd_values_in_app_settings_table.php000064400000000727152665565410017353 0ustar00where('key', 'default_aw_image_engine') ->where('value', 'sd') ->update(['value' => EngineEnum::STABLE_DIFFUSION->value]); } public function down(): void {} }; 2023_06_02_124736_create_frontend_who_is_for_table.php000064400000001215152665565410016124 0ustar00id(); $table->string('title')->nullable(); $table->string('color')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('frontend_who_is_for'); } }; 2023_03_22_101116_add_paths_to_settings_table.php000064400000001155152665565410015102 0ustar00string('logo_path')->default('assets/img/logo/magicAI-logo.svg'); $table->string('favicon_path')->nullable(); }); } public function down(): void { Schema::table('settings', function (Blueprint $table) { $table->dropColumn(['logo_path', 'favicon_path']); }); } }; 2024_01_29_110158_add_apple_columns_to_user_table.php000064400000001461152665565410015756 0ustar00string('apple_id')->nullable(); $table->string('apple_token')->nullable(); $table->string('apple_refresh_token')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('users', function (Blueprint $table) { $table->dropColumn([ 'apple_id', 'apple_token', 'apple_refresh_token', ]); }); } }; 2023_11_28_141010_create_chat_category_table.php000064400000001103152665565410014663 0ustar00id(); $table->string('name'); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('chat_category'); } }; 2024_09_12_185443_add_default_mrrobot_words_to_settings.php000064400000001326152665565410017247 0ustar00text('mrrobot_name')->nullable(); $table->text('mrrobot_search_words')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('settings', function (Blueprint $table) { $table->dropColumn('mrrobot_name'); $table->dropColumn('mrrobot_search_words'); }); } }; 2024_01_06_123827_add_revenuecat_id_column_to_users.php000064400000001140152665565410016317 0ustar00string('revenuecat_id')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('users', function (Blueprint $table) { $table->dropColumn(['revenuecat_id']); }); } }; 2025_01_24_145331_add_reset_credits_on_renewal_column_to_plans_table.php000064400000001171152665565410021674 0ustar00boolean('reset_credits_on_renewal')->default(false); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('plans', function (Blueprint $table) { $table->dropColumn('reset_credits_on_renewal'); }); } }; 2023_09_19_064148_create_article_wizard_table.php000064400000002754152665565410015116 0ustar00id(); $table->unsignedBigInteger('user_id')->nullable(); $table->text('keywords'); $table->text('extra_keywords'); $table->text('topic_keywords'); $table->text('title'); $table->text('extra_titles'); $table->text('topic_title'); $table->string('language')->default(''); $table->string('tone')->default(''); $table->string('image_style')->default(''); $table->integer('image_count')->default(0); $table->text('outline'); $table->text('extra_outlines'); $table->text('topic_outline'); $table->integer('current_step')->default(0); $table->text('result'); $table->text('image'); $table->text('extra_images'); $table->text('topic_image'); $table->integer('generated_count')->default(0); $table->float('creativity')->default(0.5); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('article_wizard'); } }; 2024_03_19_151400_add_first_message_to_openai_chat_category_table.php000064400000001221152665565410021127 0ustar00text('first_message')->nullable()->after('instructions'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('openai_chat_category', function (Blueprint $table) { $table->dropColumn('first_message'); }); } }; 2025_03_18_050755_create_channel_settings_table.php000064400000005654152665565410015437 0ustar00id(); $table->string('title'); $table->string('key'); $table->text('description')->nullable(); $table->string('image')->nullable(); $table->string('logo')->nullable(); $table->timestamps(); }); $data = [ [ 'key' => 'facebook', 'title' => 'Facebook', 'description' => "Our AI tool helps you craft compelling content that resonates with your audience Whether it's a status update, promotional post, or a simple interaction.", 'logo' => 'assets/landing-page/logo-fb.png', 'image' => '/themes/social-media-front/assets/landing-page/card-fb.jpg', ], [ 'key' => 'x', 'title' => 'Twitter / X', 'description' => "Create impactful X posts with our AI tool in seconds! Whether it's a quick update, an engaging tweet, or a conversation starter, generate posts that drive conversations and keep your followers engaged on X.", 'logo' => 'assets/landing-page/logo-x.png', 'image' => '/themes/social-media-front/assets/landing-page/card-x.jpg', ], [ 'key' => 'instagram', 'title' => 'Instagram', 'description' => "Design eye-catching Instagram posts in no time with our AI-powered generator. From beautiful visuals to captivating captions, create Instagram content that stands out and grabs your followers' attention.", 'logo' => 'assets/landing-page/logo-ig.png', 'image' => '/themes/social-media-front/assets/landing-page/card-ig.jpg', ], [ 'key' => 'linkedin', 'title' => 'LinkedIn', 'description' => 'Build your professional presence with polished LinkedIn posts. Our AI helps you write insightful articles, thought-provoking updates, and attention-grabbing headlines that engage with your network.', 'logo' => 'assets/landing-page/logo-in.png', 'image' => '/themes/social-media-front/assets/landing-page/card-in.jpg', ], ]; foreach ($data as $item) { ChannelSetting::query()->create($item); } } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('frontend_channel_settings'); } }; 2023_08_11_125732_create_paystack_payment_infos_table.php000064400000002467152665565410016652 0ustar00id(); $table->unsignedBigInteger('user_id')->nullable(); $table->string('email')->nullable(); $table->string('reference')->nullable(); $table->string('trans')->nullable(); $table->string('status')->nullable(); $table->string('message')->nullable(); $table->string('transaction')->nullable(); $table->string('trxref')->nullable(); $table->string('amount')->nullable(); $table->string('currency')->nullable(); $table->string('plan_code')->nullable(); $table->string('customer_code')->nullable(); $table->string('other')->nullable(); $table->timestamps(); $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('paystack_payment_infos'); } }; 2023_07_01_080909_create_advertis_table.php000064400000001317152665565410013716 0ustar00id(); $table->string('key'); $table->string('title'); $table->longText('tracking_code')->nullable(); $table->boolean('status')->default(false); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('advertis'); } }; 2025_04_25_094959_add_last_activity_at_to_users_table.php000064400000000770152665565410016671 0ustar00timestamp('last_activity_at')->nullable()->useCurrent()->index(); }); } /** * Reverse the migrations. */ public function down(): void {} }; 2024_12_10_071444_add_user_api_to_plans_table.php000064400000001131152665565410015051 0ustar00boolean('user_api')->default(false); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('plans', function (Blueprint $table) { $table->dropColumn('user_api'); }); } }; 2019_05_03_000003_create_subscription_items_table.php000064400000001537152665565410016004 0ustar00id(); $table->foreignId('subscription_id'); $table->string('stripe_id')->unique(); $table->string('stripe_product'); $table->string('stripe_price'); $table->integer('quantity')->nullable(); $table->timestamps(); $table->unique(['subscription_id', 'stripe_price']); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('subscription_items'); } }; 2025_05_02_115019_fix_typo_in_dashboard_widgets.php000064400000001102152665565410015447 0ustar00string('name', 255)->change()->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('dashboard_widgets', function (Blueprint $table) {}); } }; 2024_03_25_085453_add_theme_columns_to_extension_table.php000064400000001506152665565410017024 0ustar00boolean('is_theme')->default(false)->after('licensed'); $table->enum('theme_type', ['All', 'Frontend', 'Dashboard'])->default('All')->after('is_theme'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('extensions', function (Blueprint $table) { if (Schema::hasColumn('extensions', 'theme_type')) { $table->dropColumn(['is_theme', 'theme_type']); } }); } }; 2023_03_20_115202_add_user_id_to_user_orders_table.php000064400000001324152665565410016106 0ustar00unsignedBigInteger('user_id')->nullable(); $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); }); } public function down(): void { Schema::table('user_orders', function (Blueprint $table) { if (! isDBDriverSQLite()) { $table->dropForeign(['user_id']); } $table->dropColumn('user_id'); }); } }; 2024_11_18_102726_change_amount_col_in_user_affiliates_table.php000064400000001202152665565410020117 0ustar00double('amount')->default(0)->change(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('user_affiliates', static function (Blueprint $table) { $table->double('amount')->change(); }); } }; 2024_06_18_062706_add_tool_subtitle_to_frontend_sections_statuses_titles_table.php000064400000004562152665565410024111 0ustar00string('tools_subtitle')->default('Unleash the Power of AI')->after('tools_title'); $table->string('custom_templates_learn_more_link')->default('Discover MagicAI')->after('custom_templates_title'); $table->string('custom_templates_learn_more_link_url')->default('#templates')->after('custom_templates_title'); $table->string('features_subtitle')->default('Unleash the Power of AI')->after('features_title'); $table->string('how_it_works_subtitle')->default('Unleash the Power of AI')->after('how_it_works_title'); $table->string('how_it_works_description')->default('To create content quickly and effectively, here are the steps you can follow:')->after('how_it_works_title'); $table->string('how_it_works_link')->default('#')->after('how_it_works_title'); $table->string('how_it_works_link_label')->default('Learn More')->after('how_it_works_title'); $table->string('pricing_subtitle')->default('Unleash the Power of AI')->after('pricing_title'); $table->string('testimonials_description')->default('Content and kickstart your earnings in minutes kickstart your earnings in minutes')->after('testimonials_title'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('frontend_sections_statuses_titles', function (Blueprint $table) { $table->dropColumn('tools_subtitle'); $table->dropColumn('custom_templates_learn_more_link'); $table->dropColumn('custom_templates_learn_more_link_url'); $table->dropColumn('features_subtitle'); $table->dropColumn('how_it_works_subtitle'); $table->dropColumn('how_it_works_description'); $table->dropColumn('how_it_works_link'); $table->dropColumn('how_it_works_link_label'); $table->dropColumn('pricing_subtitle'); $table->dropColumn('testimonials_description'); }); } }; 2024_01_16_053948_add_tts_settings_to_settings_two_table.php000064400000001731152665565410017433 0ustar00string('elevenlabs_api_key')->nullable(); $table->boolean('feature_tts_google')->default(false); $table->boolean('feature_tts_openai')->default(true); $table->boolean('feature_tts_elevenlabs')->default(false); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('settings_two', function (Blueprint $table) { $table->dropColumn([ 'elevenlabs_api_key', 'feature_tts_google', 'feature_tts_openai', 'feature_tts_elevenlabs', ]); }); } }; 2024_09_24_095546_update_ai_models_table.php000064400000001552152665565410014064 0ustar00dropColumn('is_active'); }); Schema::table('ai_models', static function (Blueprint $table) { $table->string('status')->default(StatusEnum::ENABLED->value); }); } public function down(): void { Schema::table('ai_models', static function (Blueprint $table) { $table->dropColumn('status'); }); Schema::table('ai_models', static function (Blueprint $table) { $table->boolean('is_active')->default(false); }); } }; 2025_08_13_160030_add_effort_col_to_entities_table.php000064400000001126152665565410016076 0ustar00string('effort')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('entities', function (Blueprint $table) { $table->dropColumn('effort'); }); } }; 2023_09_29_075552_add_floating_button_to_frontend_footer_settings.php000064400000001660152665565410021323 0ustar00string('floating_button_small_text')->nullable(); $table->string('floating_button_bold_text')->nullable(); $table->string('floating_button_link')->nullable(); $table->boolean('floating_button_active')->default(false); }); } public function down(): void { Schema::table('frontend_footer_settings', function (Blueprint $table) { $table->dropColumn([ 'floating_button_small_text', 'floating_button_bold_text', 'floating_button_link', 'floating_button_active', ]); }); } }; 2023_03_01_113611_create_settings_table.php000064400000007551152665565410013722 0ustar00id(); // INVOICE $table->string('invoice_currency')->nullable(); $table->string('invoice_name')->nullable(); $table->string('invoice_website')->nullable(); $table->string('invoice_address')->nullable(); $table->string('invoice_city')->nullable(); $table->string('invoice_state')->nullable(); $table->string('invoice_postal')->nullable(); $table->string('invoice_country')->nullable(); $table->string('invoice_phone')->nullable(); $table->string('invoice_vat')->nullable(); // PAYMENT $table->string('default_currency')->default('2'); $table->string('tax_rate')->nullable(); $table->string('stripe_active')->default(0); $table->string('stripe_key')->nullable(); $table->string('stripe_secret')->nullable(); $table->string('stripe_base_url')->default('https://api.stripe.com'); $table->string('bank_transfer_active')->default(0); $table->string('bank_transfer_instructions')->nullable(); $table->string('bank_transfer_informations')->nullable(); // GLOBAL SETTINGS $table->string('site_name')->default('MagicAI'); $table->string('site_url')->default('https://liquid-themes.com'); $table->string('site_email')->nullable(); $table->string('google_analytics_active')->default(0); $table->text('google_analytics_code')->nullable(); $table->string('logo')->default('magicAI-logo.svg'); $table->string('favicon')->nullable(); $table->text('meta_title')->nullable(); $table->text('meta_description')->nullable(); // SOCIAL LOGIN $table->boolean('facebook_active')->default(0); $table->text('facebook_api_key')->nullable(); $table->text('facebook_api_secret')->nullable(); $table->text('facebook_redirect_url')->nullable(); $table->boolean('github_active')->default(0); $table->text('github_api_key')->nullable(); $table->text('github_api_secret')->nullable(); $table->text('github_redirect_url')->nullable(); $table->boolean('google_active')->default(0); $table->text('google_api_key')->nullable(); $table->text('google_api_secret')->nullable(); $table->text('google_redirect_url')->nullable(); $table->boolean('twitter_active')->default(0); $table->text('twitter_api_key')->nullable(); $table->text('twitter_api_secret')->nullable(); $table->text('twitter_redirect_url')->nullable(); // REGISTER $table->boolean('register_active')->default(1); $table->string('default_country')->default('United States'); // SMTP $table->string('smtp_host')->nullable(); $table->string('smtp_port')->nullable(); $table->string('smtp_username')->nullable(); $table->string('smtp_password')->nullable(); $table->string('smtp_email')->nullable(); $table->string('smtp_sender_name')->nullable(); $table->string('smtp_encryption')->default('TLS'); // OPENAI $table->text('openai_api_secret')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('settings'); } }; 2024_10_17_124512_remove_free_plan_column_from_settings_table.php000064400000001163152665565410020370 0ustar00dropColumn('free_plan'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('settings', static function (Blueprint $table) { $table->string('free_plan', 100)->default('0,0'); }); } }; 2024_01_30_084904_chatbot_history.php000064400000001411152665565410012577 0ustar00id(); $table->integer('user_id')->nullable(); $table->string('ip')->nullable(); $table->integer('user_openai_chat_id')->nullable(); $table->integer('openai_chat_category_id')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('chatbot_history'); } }; 2023_05_03_105011_create_user_favorites_table.php000064400000001472152665565410015115 0ustar00id(); $table->unsignedBigInteger('user_id')->nullable(); $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); $table->unsignedBigInteger('openai_id')->nullable(); $table->foreign('openai_id')->references('id')->on('openai')->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('user_favorites'); } }; 2017_08_24_000000_create_app_settings_table.php000064400000000777152665565410014565 0ustar00increments('id'); $table->string('key')->index(); $table->text('value'); }); } public function down(): void { Schema::drop('app_settings'); } } 2023_03_01_134254_create_user_support_messages_table.php000064400000001562152665565410016525 0ustar00id(); $table->unsignedBigInteger('user_support_id')->nullable(); $table->foreign('user_support_id')->references('id')->on('user_support')->onDelete('cascade'); $table->string('sender')->default('user'); $table->text('message'); $table->text('attachment')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('user_support_messages'); } }; 2025_01_08_132515_add_parent_id_to_introduction_table.php000064400000001201152665565410016614 0ustar00integer('parent_id')->nullable(); $table->text('intro')->nullable()->change(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('introduction', function (Blueprint $table) { // }); } }; 2023_06_14_114054_add_trial_days_field_to_plans_table.php000064400000001131152665565410016541 0ustar00integer('trial_days')->default(0); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('plans', function (Blueprint $table) { $table->dropColumn('trial_days'); }); } }; 2024_07_31_051243_add_plan_columns_to_plans_table.php000064400000001064152665565410015743 0ustar00json('plan_ai_tools'); $table->json('plan_features'); }); } public function down(): void { Schema::table('plans', function (Blueprint $table) { $table->dropColumn(['plan_ai_tools', 'plan_features']); }); } }; 2023_03_30_000547_add_workbook_items_to_user_openai_table.php000064400000001072152665565410017475 0ustar00string('title')->nullable(); $table->string('slug')->nullable(); }); } public function down(): void { Schema::table('user_openai', function (Blueprint $table) { $table->dropColumn(['title', 'slug']); }); } }; 2024_07_25_131428_add_pebblely_key_to_settings_table.php000064400000001077152665565410016455 0ustar00text('pebblely_key')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('settings', function (Blueprint $table) { // }); } }; 2025_01_02_123507_add_file_to_introductions_table.php000064400000001257152665565410015757 0ustar00text('title')->nullable(); $table->string('file_path')->nullable(); $table->string('file_url')->nullable(); $table->string('file_type')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('introductions'); } }; 2025_08_05_151726_add_is_offer_column_to_coupons_table.php000064400000001400152665565410016777 0ustar00boolean('is_offer')->default(false)->after('discount'); $table->boolean('is_offer_fixed_price')->default(false)->after('is_offer'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('coupons', function (Blueprint $table) { $table->dropColumn('is_offer'); $table->dropColumn('is_offer_fixed_price'); }); } }; 2024_07_18_121143_add_stablediffusion_bedrock_model_to_settings_two_table.php000064400000001173152665565410022722 0ustar00string('stablediffusion_bedrock_model')->default('stability.stable-diffusion-xl-v1'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('settings_two', function (Blueprint $table) { // }); } }; 2024_02_27_080913_add_reference_url_to_user_openai_chat.php000064400000001270152665565410017122 0ustar00string('reference_url')->default(''); $table->string('doc_name')->default(''); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('user_openai_chat', function (Blueprint $table) { $table->dropColumn(['reference_url', 'doc_name']); }); } }; 2023_05_15_133018_create_openai_chat_category_table.php000064400000002057152665565410016237 0ustar00id(); $table->string('name')->nullable(); $table->string('short_name')->nullable(); $table->string('slug')->nullable(); $table->text('description')->nullable(); $table->string('role')->nullable(); $table->string('human_name')->nullable(); $table->string('helps_with')->nullable(); $table->string('prompt_prefix')->nullable(); $table->string('image')->nullable(); $table->string('color')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('openai_chat_category'); } }; 2024_07_25_100909_add_plan_footer_text_to_frontend_sections_statuses_titles.php000064400000001165152665565410023417 0ustar00text('plan_footer_text')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('frontend_sections_statuses_titles', function (Blueprint $table) { // }); } }; 2024_12_03_145649_add_status_to_introductions_table.php000064400000001144152665565410016373 0ustar00boolean('status')->default(true); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('introductions', function (Blueprint $table) { $table->dropColumn('status'); }); } }; 2024_01_30_135358_add_team_id_to_user_folders_table.php000064400000001015152665565410016231 0ustar00bigInteger('team_id')->nullable()->after('id'); }); } public function down(): void { Schema::table('folders', function (Blueprint $table) { $table->dropColumn('team_id'); }); } };