-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Remove broken seeders * Move initial data to migrations * Remove unneeded seeders * Remove empty `DatabaseSeeder` * Fix lint * Move `UsageTypeSeeder` * Move `ProtectPagesSeeder` * Clarify migrations * Convert `MpmPluginsSeeder` to migrations * Fix description length * Populate `updated_at` on ... updates * Add missing `down()` methods for random migrations * Add `down()` methods for mpmlugins migrations * Fix lint
- Loading branch information
Showing
56 changed files
with
981 additions
and
1,102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...ager/database/migrations/2022_09_20_0000000_add_bulk_registration_to_mpm_plugin_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
use App\Models\MpmPlugin; | ||
use Carbon\Carbon; | ||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Support\Facades\DB; | ||
|
||
return new class() extends Migration { | ||
public function up() | ||
{ | ||
DB::table('mpm_plugins')->insert([ | ||
[ | ||
'id' => MpmPlugin::BULK_REGISTRATION, | ||
'name' => 'BulkRegistration', | ||
'description' => substr('This plugin provides bulk registration of the company\'s existing records. NOTE: Please do not use this plugin to register your Spark & Stemaco meter records. These records will be synchronized automatically once you configure your credential settings for these plugins.', 0, 191), | ||
'tail_tag' => null, | ||
'installation_command' => 'bulk-registration:install', | ||
'created_at' => Carbon::now(), | ||
'updated_at' => Carbon::now(), | ||
], | ||
]); | ||
} | ||
|
||
public function down() | ||
{ | ||
DB::table('mpm_plugins') | ||
->where('id', MpmPlugin::BULK_REGISTRATION) | ||
->delete(); | ||
} | ||
}; |
30 changes: 30 additions & 0 deletions
30
...anager/database/migrations/2022_11_08_0000000_add_viber_messaging_to_mpm_plugin_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
use App\Models\MpmPlugin; | ||
use Carbon\Carbon; | ||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Support\Facades\DB; | ||
|
||
return new class() extends Migration { | ||
public function up() | ||
{ | ||
DB::table('mpm_plugins')->insert([ | ||
[ | ||
'id' => MpmPlugin::VIBER_MESSAGING, | ||
'name' => 'ViberMessaging', | ||
'description' => 'This plugin developed for the communication with customers throughout Viber messages.', | ||
'tail_tag' => 'Viber Messaging', | ||
'installation_command' => 'viber-messaging:install', | ||
'created_at' => Carbon::now(), | ||
'updated_at' => Carbon::now(), | ||
], | ||
]); | ||
} | ||
|
||
public function down() | ||
{ | ||
DB::table('mpm_plugins') | ||
->where('id', MpmPlugin::VIBER_MESSAGING) | ||
->delete(); | ||
} | ||
}; |
30 changes: 30 additions & 0 deletions
30
...ager/database/migrations/2022_11_21_000000_add_wave_money_payment_to_mpm_plugin_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
use App\Models\MpmPlugin; | ||
use Carbon\Carbon; | ||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Support\Facades\DB; | ||
|
||
return new class() extends Migration { | ||
public function up() | ||
{ | ||
DB::table('mpm_plugins')->insert([ | ||
[ | ||
'id' => MpmPlugin::WAVE_MONEY_PAYMENT_PROVIDER, | ||
'name' => 'WaveMoneyPayment', | ||
'description' => 'This plugin developed for getting WaveMoney payments into MicroPowerManager.', | ||
'tail_tag' => 'WaveMoney', | ||
'installation_command' => 'wave-money-payment-provider:install', | ||
'created_at' => Carbon::now(), | ||
'updated_at' => Carbon::now(), | ||
], | ||
]); | ||
} | ||
|
||
public function down() | ||
{ | ||
DB::table('mpm_plugins') | ||
->where('id', MpmPlugin::WAVE_MONEY_PAYMENT_PROVIDER) | ||
->delete(); | ||
} | ||
}; |
30 changes: 30 additions & 0 deletions
30
...cs/mpmanager/database/migrations/2022_11_29_000000_add_micro_star_to_mpm_plugin_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
use App\Models\MpmPlugin; | ||
use Carbon\Carbon; | ||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Support\Facades\DB; | ||
|
||
return new class() extends Migration { | ||
public function up() | ||
{ | ||
DB::table('mpm_plugins')->insert([ | ||
[ | ||
'id' => MpmPlugin::MICRO_STAR_METERS, | ||
'name' => 'MicroStarMeter', | ||
'description' => 'This plugin integrates MicroStar meters to Micropowermanager. It uses user_id & api_key for creating tokens for energy.', | ||
'tail_tag' => 'MicroStar Meter', | ||
'installation_command' => 'micro-star-meter:install', | ||
'created_at' => Carbon::now(), | ||
'updated_at' => Carbon::now(), | ||
], | ||
]); | ||
} | ||
|
||
public function down() | ||
{ | ||
DB::table('mpm_plugins') | ||
->where('id', MpmPlugin::MICRO_STAR_METERS) | ||
->delete(); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
...docs/mpmanager/database/migrations/2022_14_12_000000_add_sun_king_to_mpm_plugin_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
use App\Models\MpmPlugin; | ||
use Carbon\Carbon; | ||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Support\Facades\DB; | ||
|
||
return new class() extends Migration { | ||
public function up() | ||
{ | ||
DB::table('mpm_plugins')->insert([ | ||
[ | ||
'id' => MpmPlugin::SUN_KING_SHS, | ||
'name' => 'SunKingSHS', | ||
'description' => 'This plugin integrates SunKing solar home systems to Micropowermanager. It uses client_id & client_secret for creating tokens for energy.', | ||
'tail_tag' => 'SunKing SHS', | ||
'installation_command' => 'sun-king-shs:install', | ||
'root_class' => 'SunKingSHS', | ||
'created_at' => Carbon::now(), | ||
'updated_at' => Carbon::now(), | ||
], | ||
]); | ||
} | ||
|
||
public function down() | ||
{ | ||
DB::table('mpm_plugins') | ||
->where('id', MpmPlugin::SUN_KING_SHS) | ||
->delete(); | ||
} | ||
}; |
Oops, something went wrong.