feat: 🔒️ readded missing configurations migration & fixed old paypal_products migration & added seeder descriptions
This commit is contained in:
parent
4ad5722e9c
commit
e79e38ee27
|
@ -52,6 +52,8 @@ class AppServiceProvider extends ServiceProvider
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
//only run if app is not run in command line
|
||||||
|
if (!$this->app->runningInConsole()) {
|
||||||
// TODO: Check if Installer Lockfile exists instead of "running in console"
|
// TODO: Check if Installer Lockfile exists instead of "running in console"
|
||||||
$settings = Settings::all();
|
$settings = Settings::all();
|
||||||
// Set all configs from database
|
// Set all configs from database
|
||||||
|
@ -106,3 +108,4 @@ class AppServiceProvider extends ServiceProvider
|
||||||
config(['services.discord.client_secret' => config('SETTINGS::DISCORD:CLIENT_SECRET')]);
|
config(['services.discord.client_secret' => config('SETTINGS::DISCORD:CLIENT_SECRET')]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
class CreateConfigurationsTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::create('configurations', function (Blueprint $table) {
|
||||||
|
$table->string('key')->primary();
|
||||||
|
$table->string('value');
|
||||||
|
$table->string('type')->default('string');
|
||||||
|
$table->text('description')->nullable();
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('configurations');
|
||||||
|
}
|
||||||
|
}
|
|
@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
class AddDisplayToCreditProductsTable extends Migration
|
class AddDisplayToPayPalProductsTable extends Migration
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
|
@ -13,7 +13,7 @@ class AddDisplayToCreditProductsTable extends Migration
|
||||||
*/
|
*/
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::table('credit_products', function (Blueprint $table) {
|
Schema::table('paypal_products', function (Blueprint $table) {
|
||||||
$table->string('display');
|
$table->string('display');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ class AddDisplayToCreditProductsTable extends Migration
|
||||||
*/
|
*/
|
||||||
public function down()
|
public function down()
|
||||||
{
|
{
|
||||||
Schema::table('credit_products', function (Blueprint $table) {
|
Schema::table('paypal_products', function (Blueprint $table) {
|
||||||
$table->dropColumn('display');
|
$table->dropColumn('display');
|
||||||
});
|
});
|
||||||
}
|
}
|
|
@ -150,6 +150,7 @@ class SettingsSeeder extends Seeder
|
||||||
], [
|
], [
|
||||||
'value' => 'false',
|
'value' => 'false',
|
||||||
'type' => 'boolean',
|
'type' => 'boolean',
|
||||||
|
'description' => 'Enables or disables the invoice feature for payments'
|
||||||
]);
|
]);
|
||||||
//Invoice company name
|
//Invoice company name
|
||||||
Settings::firstOrCreate([
|
Settings::firstOrCreate([
|
||||||
|
|
Loading…
Reference in a new issue