1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Migrations for accounts and users tables

Now when clicking on INVOICE NOW, we can reach first step of a new
invoice creation even with MySQL 5.6 default STRICT_TRANS_TABLE.
This commit is contained in:
Samuel De Backer 2014-08-25 22:31:45 +02:00
parent 620b09ccc8
commit 17ab45014a
6 changed files with 32 additions and 32 deletions

View File

@ -132,19 +132,19 @@ class ConfideSetupUsersTable extends Migration {
$t->timestamps();
$t->softDeletes();
$t->string('name');
$t->string('name')->nullable();
$t->string('ip');
$t->string('account_key')->unique();
$t->timestamp('last_login');
$t->string('address1');
$t->string('address2');
$t->string('city');
$t->string('state');
$t->string('postal_code');
$t->string('address1')->nullable();
$t->string('address2')->nullable();
$t->string('city')->nullable();
$t->string('state')->nullable();
$t->string('postal_code')->nullable();
$t->unsignedInteger('country_id')->nullable();
$t->text('invoice_terms');
$t->text('email_footer');
$t->text('invoice_terms')->nullable();
$t->text('email_footer')->nullable();
$t->unsignedInteger('industry_id')->nullable();
$t->unsignedInteger('size_id')->nullable();
@ -177,16 +177,16 @@ class ConfideSetupUsersTable extends Migration {
$t->timestamps();
$t->softDeletes();
$t->string('first_name');
$t->string('last_name');
$t->string('phone');
$t->string('first_name')->nullable();
$t->string('last_name')->nullable();
$t->string('phone')->nullable();
$t->string('username')->unique();
$t->string('email');
$t->string('email')->nullable();
$t->string('password');
$t->string('confirmation_code');
$t->boolean('registered')->default(false);
$t->boolean('confirmed')->default(false);
$t->integer('theme_id');
$t->integer('theme_id')->nullable();
$t->boolean('notify_sent')->default(true);
$t->boolean('notify_viewed')->default(false);
@ -194,7 +194,7 @@ class ConfideSetupUsersTable extends Migration {
$t->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade');
$t->unsignedInteger('public_id');
$t->unsignedInteger('public_id')->nullable();
$t->unique( array('account_id','public_id') );
});
@ -202,7 +202,7 @@ class ConfideSetupUsersTable extends Migration {
{
$t->increments('id');
$t->unsignedInteger('account_id');
$t->unsignedInteger('user_id');
$t->unsignedInteger('user_id');
$t->unsignedInteger('gateway_id');
$t->timestamps();
$t->softDeletes();

View File

@ -14,8 +14,8 @@ class AddPhoneToAccount extends Migration {
{
Schema::table('accounts', function($table)
{
$table->string('work_phone');
$table->string('work_email');
$table->string('work_phone')->nullable();
$table->string('work_email')->nullable();
});
}

View File

@ -14,7 +14,7 @@ class AddProPlan extends Migration {
{
Schema::table('accounts', function($table)
{
$table->date('pro_plan_paid');
$table->date('pro_plan_paid')->nullable();
});
}

View File

@ -14,14 +14,14 @@ class AddCustomFields extends Migration {
{
Schema::table('accounts', function($table)
{
$table->string('custom_label1');
$table->string('custom_value1');
$table->string('custom_label1')->nullable();
$table->string('custom_value1')->nullable();
$table->string('custom_label2');
$table->string('custom_value2');
$table->string('custom_label2')->nullable();
$table->string('custom_value2')->nullable();
$table->string('custom_client_label1');
$table->string('custom_client_label2');
$table->string('custom_client_label1')->nullable();
$table->string('custom_client_label2')->nullable();
});
Schema::table('clients', function($table)

View File

@ -14,8 +14,8 @@ class AddAdvancedSettings extends Migration {
{
Schema::table('accounts', function($table)
{
$table->string('primary_color');
$table->string('secondary_color');
$table->string('primary_color')->nullable();
$table->string('secondary_color')->nullable();
});
Schema::table('payments', function($table)

View File

@ -14,14 +14,14 @@ class SupportHidingQuantity extends Migration {
{
Schema::table('accounts', function($table)
{
$table->boolean('hide_quantity');
$table->boolean('hide_paid_to_date');
$table->boolean('hide_quantity')->default(0);
$table->boolean('hide_paid_to_date')->default(0);
$table->string('custom_invoice_label1');
$table->string('custom_invoice_label2');
$table->string('custom_invoice_label1')->nullable();
$table->string('custom_invoice_label2')->nullable();
$table->boolean('custom_invoice_taxes1');
$table->boolean('custom_invoice_taxes2');
$table->boolean('custom_invoice_taxes1')->nullable();
$table->boolean('custom_invoice_taxes2')->nullable();
});
Schema::table('invoices', function($table)