From f4dcd3c9047ba01ca513376800fede4121d2a49e Mon Sep 17 00:00:00 2001 From: RaffiMohammed Date: Tue, 29 Oct 2024 16:04:43 +0530 Subject: [PATCH] seeder-correction --- database/seeders/v4_0_2_1/DatabaseSeeder.php | 480 ++++++++++++++++++ .../seeders/v4_0_2_2_1/DatabaseSeeder.php | 465 +---------------- database/seeders/v4_0_2_3/DatabaseSeeder.php | 29 -- 3 files changed, 487 insertions(+), 487 deletions(-) create mode 100644 database/seeders/v4_0_2_1/DatabaseSeeder.php delete mode 100644 database/seeders/v4_0_2_3/DatabaseSeeder.php diff --git a/database/seeders/v4_0_2_1/DatabaseSeeder.php b/database/seeders/v4_0_2_1/DatabaseSeeder.php new file mode 100644 index 0000000000..703281ffd5 --- /dev/null +++ b/database/seeders/v4_0_2_1/DatabaseSeeder.php @@ -0,0 +1,480 @@ +call([ReportColumnSeeder::class]); + $this->command->info('Report column Table Seeded!'); + + $this->call([ReportSettingSeeder::class]); + $this->command->info('Report column Table Seeded!'); + + $this->call([ + TemplateTableSeeder::class, + ]); + + \DB::statement('SET FOREIGN_KEY_CHECKS=1;'); + + } + +} + +class ReportColumnSeeder extends Seeder +{ + public function run() + { + + ReportColumn::create([ + 'id' => '1', + 'key' => 'checkbox', + 'label' => 'checkbox', + 'type' => 'users', + 'default' => '1' + ]); + ReportColumn::create([ + 'id' => '2', + 'key' => 'name', + 'label' => 'name', + 'type' => 'users', + 'default' => '1' + ]); + ReportColumn::create([ + 'id' => '3', + 'key' => 'email', + 'label' => 'email', + 'type' => 'users', + 'default' => '1' + ]); + ReportColumn::create([ + 'id' => '4', + 'key' => 'mobile', + 'label' => 'mobile', + 'type' => 'users', + 'default' => '1' + ]); + ReportColumn::create([ + 'id' => '5', + 'key' => 'country', + 'label' => 'country', + 'type' => 'users', + 'default' => '1' + ]); + ReportColumn::create([ + 'id' => '6', + 'key' => 'created_at', + 'label' => 'created_at', + 'type' => 'users', + 'default' => '1' + ]); + ReportColumn::create([ + 'id' => '7', + 'key' => 'active', + 'label' => 'active', + 'type' => 'users', + 'default' => '1' + ]); + ReportColumn::create([ + 'id' => '8', + 'key' => 'action', + 'label' => 'action', + 'type' => 'users', + 'default' => '1' + ]); + + ReportColumn::create([ + 'id' => '9', + 'key' => 'checkbox', + 'label' => 'checkbox', + 'type' => 'invoices', + 'default' => '1' + ]); + ReportColumn::create([ + 'id' => '10', + 'key' => 'user_id', + 'label' => 'user_id', + 'type' => 'invoices', + 'default' => '1' + ]); + ReportColumn::create([ + 'id' => '11', + 'key' => 'email', + 'label' => 'email', + 'type' => 'invoices', + 'default' => '0' + ]); + ReportColumn::create([ + 'id' => '12', + 'key' => 'mobile', + 'label' => 'mobile', + 'type' => 'invoices', + 'default' => '0' + ]); + ReportColumn::create([ + 'id' => '13', + 'key' => 'country', + 'label' => 'country', + 'type' => 'invoices', + 'default' => '0' + ]); + ReportColumn::create([ + 'id' => '14', + 'key' => 'number', + 'label' => 'number', + 'type' => 'invoices', + 'default' => '1' + ]); + ReportColumn::create([ + 'id' => '15', + 'key' => 'product', + 'label' => 'product', + 'type' => 'invoices', + 'default' => '0' + ]); + ReportColumn::create([ + 'id' => '16', + 'key' => 'date', + 'label' => 'date', + 'type' => 'invoices', + 'default' => '1' + ]); + ReportColumn::create([ + 'id' => '17', + 'key' => 'grand_total', + 'label' => 'grand_total', + 'type' => 'invoices', + 'default' => '1' + ]); + ReportColumn::create([ + 'id' => '18', + 'key' => 'status', + 'label' => 'status', + 'type' => 'invoices', + 'default' => '1' + ]); + ReportColumn::create([ + 'id' => '19', + 'key' => 'action', + 'label' => 'action', + 'type' => 'invoices', + 'default' => '1' + ]); + + ReportColumn::create([ + 'id' => '20', + 'key' => 'checkbox', + 'label' => 'checkbox', + 'type' => 'orders', + 'default' => '1' + ]); + ReportColumn::create([ + 'id' => '21', + 'key' => 'client', + 'label' => 'client', + 'type' => 'orders', + 'default' => '1' + ]); + ReportColumn::create([ + 'id' => '22', + 'key' => 'email', + 'label' => 'email', + 'type' => 'orders', + 'default' => '0' + ]); + ReportColumn::create([ + 'id' => '23', + 'key' => 'mobile', + 'label' => 'mobile', + 'type' => 'orders', + 'default' => '0' + ]); + ReportColumn::create([ + 'id' => '24', + 'key' => 'country', + 'label' => 'country', + 'type' => 'orders', + 'default' => '0' + ]); + ReportColumn::create([ + 'id' => '25', + 'key' => 'number', + 'label' => 'number', + 'type' => 'orders', + 'default' => '1' + ]); + ReportColumn::create([ + 'id' => '26', + 'key' => 'status', + 'label' => 'status', + 'type' => 'orders', + 'default' => '0' + ]); + ReportColumn::create([ + 'id' => '27', + 'key' => 'product_name', + 'label' => 'product_name', + 'type' => 'orders', + 'default' => '1' + ]); + ReportColumn::create([ + 'id' => '28', + 'key' => 'plan_name', + 'label' => 'plan_name', + 'type' => 'orders', + 'default' => '0' + ]); + ReportColumn::create([ + 'id' => '29', + 'key' => 'version', + 'label' => 'version', + 'type' => 'orders', + 'default' => '1' + ]); + ReportColumn::create([ + 'id' => '30', + 'key' => 'agents', + 'label' => 'agents', + 'type' => 'orders', + 'default' => '1' + ]); + ReportColumn::create([ + 'id' => '31', + 'key' => 'order_status', + 'label' => 'order_status', + 'type' => 'orders', + 'default' => '1' + ]); + ReportColumn::create([ + 'id' => '32', + 'key' => 'order_date', + 'label' => 'order_date', + 'type' => 'orders', + 'default' => '1' + ]); + ReportColumn::create([ + 'id' => '33', + 'key' => 'update_ends_at', + 'label' => 'update_ends_at', + 'type' => 'orders', + 'default' => '1' + ]); + ReportColumn::create([ + 'id' => '34', + 'key' => 'action', + 'label' => 'action', + 'type' => 'orders', + 'default' => '1' + ]); + + + ReportColumn::create([ + 'id' => '35', + 'key' => 'checkbox', + 'label' => 'checkbox', + 'type' => 'tenats', + 'default' => '1' + ]); + ReportColumn::create([ + 'id' => '36', + 'key' => 'Order', + 'label' => 'Order', + 'type' => 'tenats', + 'default' => '1' + ]); + ReportColumn::create([ + 'id' => '37', + 'key' => 'name', + 'label' => 'name', + 'type' => 'tenats', + 'default' => '0' + ]); + ReportColumn::create([ + 'id' => '38', + 'key' => 'email', + 'label' => 'email', + 'type' => 'tenats', + 'default' => '0' + ]); + ReportColumn::create([ + 'id' => '39', + 'key' => 'mobile', + 'label' => 'mobile', + 'type' => 'tenats', + 'default' => '0' + ]); + ReportColumn::create([ + 'id' => '40', + 'key' => 'country', + 'label' => 'country', + 'type' => 'tenats', + 'default' => '0' + ]); + ReportColumn::create([ + 'id' => '41', + 'key' => 'Expiry day', + 'label' => 'Expiry day', + 'type' => 'tenats', + 'default' => '0' + ]); + ReportColumn::create([ + 'id' => '42', + 'key' => 'Deletion day', + 'label' => 'Deletion day', + 'type' => 'tenats', + 'default' => '1' + ]); + ReportColumn::create([ + 'id' => '43', + 'key' => 'plan', + 'label' => 'plan', + 'type' => 'tenats', + 'default' => '0' + ]); + ReportColumn::create([ + 'id' => '44', + 'key' => 'tenants', + 'label' => 'tenants', + 'type' => 'tenats', + 'default' => '1' + ]); + ReportColumn::create([ + 'id' => '45', + 'key' => 'domain', + 'label' => 'domain', + 'type' => 'tenats', + 'default' => '1' + ]); + ReportColumn::create([ + 'id' => '46', + 'key' => 'db_name', + 'label' => 'db_name', + 'type' => 'tenats', + 'default' => '1' + ]); + ReportColumn::create([ + 'id' => '47', + 'key' => 'db_username', + 'label' => 'db_username', + 'type' => 'tenats', + 'default' => '1' + ]); + ReportColumn::create([ + 'id' => '48', + 'key' => 'action', + 'label' => 'action', + 'type' => 'tenats', + 'default' => '1' + ]); + } +} +class ReportSettingSeeder extends Seeder +{ + public function run() + { + ReportSetting::create([ + 'id' => '1', + 'records' => '3000' + ]); + } +} + + + + + +class TemplateTableSeeder extends Seeder +{ + public function run() + { + + Template::where('id',23)->update(['data' => ' + + + + + + + + + + + + + + + + + +
  +

{{logo}}

+
 
  + + + + + + + + + + + + + + + + + + +
 Dear {{name}},

+

Renew your subscription to continue using our services.

+ +
 
  +

Your subscription with {{company_title}} is set to expire on {{date}}.

+

To ensure uninterrupted service, please complete your payment now. With Auto-renewal enabled, all future payments will be automatic and hassle-free. 

+

Thank you for choosing Ladybird Web Solutions! 

+ + + + + + + + + + + + + + + + +
ProductOrder NoTotal
{{product}}{{number}}{{total}}
+

Click the button below to make a payment.

+
 
  Make Payment

+

+ This link will expire on {{expiry_date}} +

+
 
+
 
 {{contact}} 
+

 

']); + } +} + + + diff --git a/database/seeders/v4_0_2_2_1/DatabaseSeeder.php b/database/seeders/v4_0_2_2_1/DatabaseSeeder.php index ac0bb94a10..551e243211 100644 --- a/database/seeders/v4_0_2_2_1/DatabaseSeeder.php +++ b/database/seeders/v4_0_2_2_1/DatabaseSeeder.php @@ -1,10 +1,9 @@ call([ReportColumnSeeder::class]); - $this->command->info('Report column Table Seeded!'); - - $this->call([ReportSettingSeeder::class]); - $this->command->info('Report column Table Seeded!'); - - $this->call([ - TemplateTableSeeder::class, - ]); - - \DB::statement('SET FOREIGN_KEY_CHECKS=1;'); - + $this->movePreReleaseData(); } -} - -class ReportColumnSeeder extends Seeder -{ - public function run() - { - - ReportColumn::create([ - 'id' => '1', - 'key' => 'checkbox', - 'label' => 'checkbox', - 'type' => 'users', - 'default' => '1' - ]); - ReportColumn::create([ - 'id' => '2', - 'key' => 'name', - 'label' => 'name', - 'type' => 'users', - 'default' => '1' - ]); - ReportColumn::create([ - 'id' => '3', - 'key' => 'email', - 'label' => 'email', - 'type' => 'users', - 'default' => '1' - ]); - ReportColumn::create([ - 'id' => '4', - 'key' => 'mobile', - 'label' => 'mobile', - 'type' => 'users', - 'default' => '1' - ]); - ReportColumn::create([ - 'id' => '5', - 'key' => 'country', - 'label' => 'country', - 'type' => 'users', - 'default' => '1' - ]); - ReportColumn::create([ - 'id' => '6', - 'key' => 'created_at', - 'label' => 'created_at', - 'type' => 'users', - 'default' => '1' - ]); - ReportColumn::create([ - 'id' => '7', - 'key' => 'active', - 'label' => 'active', - 'type' => 'users', - 'default' => '1' - ]); - ReportColumn::create([ - 'id' => '8', - 'key' => 'action', - 'label' => 'action', - 'type' => 'users', - 'default' => '1' - ]); - - ReportColumn::create([ - 'id' => '9', - 'key' => 'checkbox', - 'label' => 'checkbox', - 'type' => 'invoices', - 'default' => '1' - ]); - ReportColumn::create([ - 'id' => '10', - 'key' => 'user_id', - 'label' => 'user_id', - 'type' => 'invoices', - 'default' => '1' - ]); - ReportColumn::create([ - 'id' => '11', - 'key' => 'email', - 'label' => 'email', - 'type' => 'invoices', - 'default' => '0' - ]); - ReportColumn::create([ - 'id' => '12', - 'key' => 'mobile', - 'label' => 'mobile', - 'type' => 'invoices', - 'default' => '0' - ]); - ReportColumn::create([ - 'id' => '13', - 'key' => 'country', - 'label' => 'country', - 'type' => 'invoices', - 'default' => '0' - ]); - ReportColumn::create([ - 'id' => '14', - 'key' => 'number', - 'label' => 'number', - 'type' => 'invoices', - 'default' => '1' - ]); - ReportColumn::create([ - 'id' => '15', - 'key' => 'product', - 'label' => 'product', - 'type' => 'invoices', - 'default' => '0' - ]); - ReportColumn::create([ - 'id' => '16', - 'key' => 'date', - 'label' => 'date', - 'type' => 'invoices', - 'default' => '1' - ]); - ReportColumn::create([ - 'id' => '17', - 'key' => 'grand_total', - 'label' => 'grand_total', - 'type' => 'invoices', - 'default' => '1' - ]); - ReportColumn::create([ - 'id' => '18', - 'key' => 'status', - 'label' => 'status', - 'type' => 'invoices', - 'default' => '1' - ]); - ReportColumn::create([ - 'id' => '19', - 'key' => 'action', - 'label' => 'action', - 'type' => 'invoices', - 'default' => '1' - ]); - - ReportColumn::create([ - 'id' => '20', - 'key' => 'checkbox', - 'label' => 'checkbox', - 'type' => 'orders', - 'default' => '1' - ]); - ReportColumn::create([ - 'id' => '21', - 'key' => 'client', - 'label' => 'client', - 'type' => 'orders', - 'default' => '1' - ]); - ReportColumn::create([ - 'id' => '22', - 'key' => 'email', - 'label' => 'email', - 'type' => 'orders', - 'default' => '0' - ]); - ReportColumn::create([ - 'id' => '23', - 'key' => 'mobile', - 'label' => 'mobile', - 'type' => 'orders', - 'default' => '0' - ]); - ReportColumn::create([ - 'id' => '24', - 'key' => 'country', - 'label' => 'country', - 'type' => 'orders', - 'default' => '0' - ]); - ReportColumn::create([ - 'id' => '25', - 'key' => 'number', - 'label' => 'number', - 'type' => 'orders', - 'default' => '1' - ]); - ReportColumn::create([ - 'id' => '26', - 'key' => 'status', - 'label' => 'status', - 'type' => 'orders', - 'default' => '0' - ]); - ReportColumn::create([ - 'id' => '27', - 'key' => 'product_name', - 'label' => 'product_name', - 'type' => 'orders', - 'default' => '1' - ]); - ReportColumn::create([ - 'id' => '28', - 'key' => 'plan_name', - 'label' => 'plan_name', - 'type' => 'orders', - 'default' => '0' - ]); - ReportColumn::create([ - 'id' => '29', - 'key' => 'version', - 'label' => 'version', - 'type' => 'orders', - 'default' => '1' - ]); - ReportColumn::create([ - 'id' => '30', - 'key' => 'agents', - 'label' => 'agents', - 'type' => 'orders', - 'default' => '1' - ]); - ReportColumn::create([ - 'id' => '31', - 'key' => 'order_status', - 'label' => 'order_status', - 'type' => 'orders', - 'default' => '1' - ]); - ReportColumn::create([ - 'id' => '32', - 'key' => 'order_date', - 'label' => 'order_date', - 'type' => 'orders', - 'default' => '1' - ]); - ReportColumn::create([ - 'id' => '33', - 'key' => 'update_ends_at', - 'label' => 'update_ends_at', - 'type' => 'orders', - 'default' => '1' - ]); - ReportColumn::create([ - 'id' => '34', - 'key' => 'action', - 'label' => 'action', - 'type' => 'orders', - 'default' => '1' - ]); - - - ReportColumn::create([ - 'id' => '35', - 'key' => 'checkbox', - 'label' => 'checkbox', - 'type' => 'tenats', - 'default' => '1' - ]); - ReportColumn::create([ - 'id' => '36', - 'key' => 'Order', - 'label' => 'Order', - 'type' => 'tenats', - 'default' => '1' - ]); - ReportColumn::create([ - 'id' => '37', - 'key' => 'name', - 'label' => 'name', - 'type' => 'tenats', - 'default' => '0' - ]); - ReportColumn::create([ - 'id' => '38', - 'key' => 'email', - 'label' => 'email', - 'type' => 'tenats', - 'default' => '0' - ]); - ReportColumn::create([ - 'id' => '39', - 'key' => 'mobile', - 'label' => 'mobile', - 'type' => 'tenats', - 'default' => '0' - ]); - ReportColumn::create([ - 'id' => '40', - 'key' => 'country', - 'label' => 'country', - 'type' => 'tenats', - 'default' => '0' - ]); - ReportColumn::create([ - 'id' => '41', - 'key' => 'Expiry day', - 'label' => 'Expiry day', - 'type' => 'tenats', - 'default' => '0' - ]); - ReportColumn::create([ - 'id' => '42', - 'key' => 'Deletion day', - 'label' => 'Deletion day', - 'type' => 'tenats', - 'default' => '1' - ]); - ReportColumn::create([ - 'id' => '43', - 'key' => 'plan', - 'label' => 'plan', - 'type' => 'tenats', - 'default' => '0' - ]); - ReportColumn::create([ - 'id' => '44', - 'key' => 'tenants', - 'label' => 'tenants', - 'type' => 'tenats', - 'default' => '1' - ]); - ReportColumn::create([ - 'id' => '45', - 'key' => 'domain', - 'label' => 'domain', - 'type' => 'tenats', - 'default' => '1' - ]); - ReportColumn::create([ - 'id' => '46', - 'key' => 'db_name', - 'label' => 'db_name', - 'type' => 'tenats', - 'default' => '1' - ]); - ReportColumn::create([ - 'id' => '47', - 'key' => 'db_username', - 'label' => 'db_username', - 'type' => 'tenats', - 'default' => '1' - ]); - ReportColumn::create([ - 'id' => '48', - 'key' => 'action', - 'label' => 'action', - 'type' => 'tenats', - 'default' => '1' - ]); - } -} -class ReportSettingSeeder extends Seeder -{ - public function run() + private function movePreReleaseData() { - ReportSetting::create([ - 'id' => '1', - 'records' => '3000' - ]); + ProductUpload::where('is_pre_release', 1)->each(function ($product) { + $product->update(['release_type' => 'pre_release']); + }); } } - - -class TemplateTableSeeder extends Seeder -{ - public function run() - { - - Template::where('id',23)->update(['data' => ' - - - - - - - - - - - - - - - - - -
  -

{{logo}}

-
 
  - - - - - - - - - - - - - - - - - - -
 Dear {{name}},

-

Renew your subscription to continue using our services.

- -
 
  -

Your subscription with {{company_title}} is set to expire on {{date}}.

-

To ensure uninterrupted service, please complete your payment now. With Auto-renewal enabled, all future payments will be automatic and hassle-free. 

-

Thank you for choosing Ladybird Web Solutions! 

- - - - - - - - - - - - - - - - -
ProductOrder NoTotal
{{product}}{{number}}{{total}}
-

Click the button below to make a payment.

-
 
  Make Payment

-

- This link will expire on {{expiry_date}} -

-
 
-
 
 {{contact}} 
-

 

']); - } -} - - - diff --git a/database/seeders/v4_0_2_3/DatabaseSeeder.php b/database/seeders/v4_0_2_3/DatabaseSeeder.php deleted file mode 100644 index 778b882d81..0000000000 --- a/database/seeders/v4_0_2_3/DatabaseSeeder.php +++ /dev/null @@ -1,29 +0,0 @@ -movePreReleaseData(); - } - - private function movePreReleaseData() - { - ProductUpload::where('is_pre_release', 1)->each(function ($product) { - $product->update(['release_type' => 'pre_release']); - }); - } -} - - -