mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-09 20:52:56 +01:00
Added early_access field
This commit is contained in:
parent
4549643fdc
commit
ecaf31ec95
@ -1,78 +1,70 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddInvoiceFontSupport extends Migration {
|
||||
class AddInvoiceFontSupport extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::dropIfExists('fonts');
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::dropIfExists('fonts');
|
||||
Schema::create('fonts', function ($t) {
|
||||
$t->increments('id');
|
||||
|
||||
Schema::create('fonts', function($t)
|
||||
{
|
||||
$t->increments('id');
|
||||
|
||||
$t->string('name');
|
||||
$t->string('folder');
|
||||
$t->string('css_stack');
|
||||
$t->smallInteger('css_weight')->default(400);
|
||||
$t->string('google_font');
|
||||
$t->string('normal');
|
||||
$t->string('bold');
|
||||
$t->string('italics');
|
||||
$t->string('bolditalics');
|
||||
$t->unsignedInteger('sort_order')->default(10000);
|
||||
});
|
||||
|
||||
// Create fonts
|
||||
$seeder = new FontsSeeder();
|
||||
$seeder->run();
|
||||
$t->string('name');
|
||||
$t->string('folder');
|
||||
$t->string('css_stack');
|
||||
$t->smallInteger('css_weight')->default(400);
|
||||
$t->string('google_font');
|
||||
$t->string('normal');
|
||||
$t->string('bold');
|
||||
$t->string('italics');
|
||||
$t->string('bolditalics');
|
||||
$t->boolean('early_access');
|
||||
$t->unsignedInteger('sort_order')->default(10000);
|
||||
});
|
||||
|
||||
Schema::table('accounts', function($table)
|
||||
{
|
||||
$table->unsignedInteger('header_font_id')->default(1);
|
||||
$table->unsignedInteger('body_font_id')->default(1);
|
||||
});
|
||||
// Create fonts
|
||||
$seeder = new FontsSeeder();
|
||||
$seeder->run();
|
||||
|
||||
Schema::table('accounts', function($table)
|
||||
{
|
||||
$table->foreign('header_font_id')->references('id')->on('fonts');
|
||||
$table->foreign('body_font_id')->references('id')->on('fonts');
|
||||
});
|
||||
}
|
||||
Schema::table('accounts', function ($table) {
|
||||
$table->unsignedInteger('header_font_id')->default(1);
|
||||
$table->unsignedInteger('body_font_id')->default(1);
|
||||
});
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
if (Schema::hasColumn('accounts', 'header_font_id'))
|
||||
{
|
||||
Schema::table('accounts', function($table)
|
||||
{
|
||||
$table->dropForeign('accounts_header_font_foreign');
|
||||
$table->dropColumn('header_font_id');
|
||||
});
|
||||
}
|
||||
|
||||
if (Schema::hasColumn('accounts', 'body_font_id'))
|
||||
{
|
||||
Schema::table('accounts', function($table)
|
||||
{
|
||||
$table->dropForeign('accounts_body_font_foreign');
|
||||
$table->dropColumn('body_font_id');
|
||||
});
|
||||
}
|
||||
Schema::table('accounts', function ($table) {
|
||||
$table->foreign('header_font_id')->references('id')->on('fonts');
|
||||
$table->foreign('body_font_id')->references('id')->on('fonts');
|
||||
});
|
||||
}
|
||||
|
||||
Schema::dropIfExists('fonts');
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
if (Schema::hasColumn('accounts', 'header_font_id')) {
|
||||
Schema::table('accounts', function ($table) {
|
||||
$table->dropForeign('accounts_header_font_foreign');
|
||||
$table->dropColumn('header_font_id');
|
||||
});
|
||||
}
|
||||
|
||||
if (Schema::hasColumn('accounts', 'body_font_id')) {
|
||||
Schema::table('accounts', function ($table) {
|
||||
$table->dropForeign('accounts_body_font_foreign');
|
||||
$table->dropColumn('body_font_id');
|
||||
});
|
||||
}
|
||||
|
||||
Schema::dropIfExists('fonts');
|
||||
}
|
||||
}
|
||||
|
4
public/css/built.css
vendored
4
public/css/built.css
vendored
File diff suppressed because one or more lines are too long
4
public/css/built.public.css
vendored
4
public/css/built.public.css
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user