mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Fixes for staging (#2990)
This commit is contained in:
parent
1c21b6dc7c
commit
c43eb96333
@ -7,6 +7,33 @@ namespace App\Models;
|
||||
*/
|
||||
class DateFormat extends StaticModel
|
||||
{
|
||||
|
||||
public static $days_of_the_week = [
|
||||
0 => 'sunday',
|
||||
1 => 'monday',
|
||||
2 => 'tuesday',
|
||||
3 => 'wednesday',
|
||||
4 => 'thursday',
|
||||
5 => 'friday',
|
||||
6 => 'saturday',
|
||||
];
|
||||
|
||||
public static $months_of_the_years = [
|
||||
0 => 'january',
|
||||
1 => 'february',
|
||||
2 => 'march',
|
||||
3 => 'april',
|
||||
4 => 'may',
|
||||
5 => 'june',
|
||||
6 => 'july',
|
||||
7 => 'august',
|
||||
8 => 'september',
|
||||
9 => 'october',
|
||||
10 => 'november',
|
||||
11 => 'december',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
|
@ -20,9 +20,11 @@ class Gateway extends StaticModel
|
||||
protected $casts = [
|
||||
'is_offsite' => 'boolean',
|
||||
'is_secure' => 'boolean',
|
||||
'recommended' => 'boolean',
|
||||
'visible' => 'boolean',
|
||||
'updated_at' => 'timestamp',
|
||||
'created_at' => 'timestamp',
|
||||
'deleted_at' => 'timestamp',
|
||||
'fields' => 'json',
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -26,12 +26,5 @@ class PaymentLibrary extends BaseModel
|
||||
'deleted_at' => 'timestamp',
|
||||
];
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function gateways()
|
||||
{
|
||||
return $this->hasMany(Gateway::class, 'payment_library_id');
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -82,7 +82,13 @@ class CreateUsersTable extends Migration
|
||||
$table->string('key')->unique();
|
||||
$table->string('provider');
|
||||
$table->boolean('visible')->default(true);
|
||||
$table->timestamps();
|
||||
$table->unsignedInteger('sort_order')->default(10000);
|
||||
$table->boolean('recommended')->default(0);
|
||||
$table->string('site_url', 200)->nullable();
|
||||
$table->boolean('is_offsite')->default(false);
|
||||
$table->boolean('is_secure')->default(false);
|
||||
$table->text('fields')->nullable();
|
||||
$table->timestamps(6);
|
||||
});
|
||||
|
||||
Schema::create('accounts', function ($table) {
|
||||
@ -756,21 +762,6 @@ class CreateUsersTable extends Migration
|
||||
$t->boolean('visible')->default(true);
|
||||
});
|
||||
|
||||
Schema::table('gateways', function ($table) {
|
||||
$table->unsignedInteger('payment_library_id')->default(1);
|
||||
$table->unsignedInteger('sort_order')->default(10000);
|
||||
$table->boolean('recommended')->default(0);
|
||||
$table->string('site_url', 200)->nullable();
|
||||
$table->boolean('is_offsite')->default(false);
|
||||
$table->boolean('is_secure')->default(false);
|
||||
$table->text('fields')->nullable();
|
||||
});
|
||||
|
||||
DB::table('gateways')->update(['payment_library_id' => 1]);
|
||||
|
||||
Schema::table('gateways', function ($table) {
|
||||
$table->foreign('payment_library_id')->references('id')->on('payment_libraries')->onDelete('cascade');
|
||||
});
|
||||
|
||||
Schema::create('tasks', function ($table) {
|
||||
$table->increments('id');
|
||||
|
Loading…
x
Reference in New Issue
Block a user