remove the splitting into first_name and last_name again - it can be desastrous to drop a column in a productive environment
This commit is contained in:
parent
70d424527e
commit
72c3e289c7
|
|
@ -14,8 +14,7 @@ $factory->define(CustomerAddress::class, function (Faker $faker) {
|
|||
return factory(Customer::class)->create()->id;
|
||||
},
|
||||
'company_name' => $faker->company,
|
||||
'first_name' => $faker->firstName,
|
||||
'last_name' => $faker->lastName,
|
||||
'name' => $faker->name,
|
||||
'vat_id' => $faker->randomNumber(9),
|
||||
'address1' => $faker->streetAddress,
|
||||
'country' => $faker->countryCode,
|
||||
|
|
|
|||
|
|
@ -16,13 +16,6 @@ class CustomerAddressImprovements extends Migration
|
|||
Schema::table('customer_addresses', function (Blueprint $table) {
|
||||
$table->string('company_name')->nullable()->after('company_id');
|
||||
$table->string('vat_id')->nullable()->after('company_name');
|
||||
|
||||
$table->string('first_name')->after('company_name');
|
||||
$table->string('last_name')->after('first_name');
|
||||
|
||||
// split 'name' column into first_name and last_name
|
||||
$table->dropColumn('name');
|
||||
|
||||
});
|
||||
|
||||
Schema::table('orders', function (Blueprint $table) {
|
||||
|
|
@ -40,9 +33,6 @@ class CustomerAddressImprovements extends Migration
|
|||
Schema::table('customer_addresses', function (Blueprint $table) {
|
||||
$table->dropColumn('company_name');
|
||||
$table->dropColumn('vat_id');
|
||||
$table->dropColumn('first_name');
|
||||
$table->dropColumn('last_name');
|
||||
$table->string('name');
|
||||
});
|
||||
|
||||
Schema::table('orders', function (Blueprint $table) {
|
||||
|
|
|
|||
|
|
@ -12,8 +12,6 @@ class CustomerAddress extends Model implements CustomerAddressContract
|
|||
protected $fillable = [
|
||||
'customer_id',
|
||||
'company_name',
|
||||
'first_name',
|
||||
'last_name',
|
||||
'vat_id',
|
||||
'address1',
|
||||
'address2',
|
||||
|
|
|
|||
|
|
@ -42,18 +42,6 @@
|
|||
<span class="control-error" v-if="errors.has('company_name')">@{{ errors.first('company_name') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('first_name') ? 'has-error' : '']">
|
||||
<label for="first_name" class="required">{{ __('shop::app.customer.account.address.edit.first_name') }}</label>
|
||||
<input type="text" v-validate="'required'" class="control" name="first_name" data-vv-as=""{{ __('shop::app.customer.account.address.edit.first_name') }}"">
|
||||
<span class="control-error" v-if="errors.has('first_name')">@{{ errors.first('first_name') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('last_name') ? 'has-error' : '']">
|
||||
<label for="last_name" class="required">{{ __('shop::app.customer.account.address.edit.last_name') }}</label>
|
||||
<input type="text" v-validate="'required'" class="control" name="last_name" data-vv-as=""{{ __('shop::app.customer.account.address.edit.last_name') }}"">
|
||||
<span class="control-error" v-if="errors.has('last_name')">@{{ errors.first('last_name') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('vat_id') ? 'has-error' : '']">
|
||||
<label for="vat_id">{{ __('shop::app.customer.account.address.create.vat_id') }}</label>
|
||||
<input type="text" class="control" name="vat_id" data-vv-as=""{{ __('shop::app.customer.account.address.create.vat_id') }}"">
|
||||
|
|
|
|||
|
|
@ -43,18 +43,6 @@
|
|||
<span class="control-error" v-if="errors.has('company_name')">@{{ errors.first('company_name') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('first_name') ? 'has-error' : '']">
|
||||
<label for="first_name" class="required">{{ __('shop::app.customer.account.address.edit.first_name') }}</label>
|
||||
<input type="text" value="{{ $address->first_name }}" v-validate="'required'" class="control" name="first_name" data-vv-as=""{{ __('shop::app.customer.account.address.edit.first_name') }}"">
|
||||
<span class="control-error" v-if="errors.has('first_name')">@{{ errors.first('first_name') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('last_name') ? 'has-error' : '']">
|
||||
<label for="last_name" class="required">{{ __('shop::app.customer.account.address.edit.last_name') }}</label>
|
||||
<input type="text" value="{{ $address->last_name }}" v-validate="'required'" class="control" name="last_name" data-vv-as=""{{ __('shop::app.customer.account.address.edit.last_name') }}"">
|
||||
<span class="control-error" v-if="errors.has('last_name')">@{{ errors.first('last_name') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('vat_id') ? 'has-error' : '']">
|
||||
<label for="vat_id">{{ __('shop::app.customer.account.address.edit.vat_id') }}</label>
|
||||
<input type="text" value="{{ $address->vat_id }}" class="control" name="vat_id" data-vv-as=""{{ __('shop::app.customer.account.address.edit.vat_id') }}"">
|
||||
|
|
|
|||
|
|
@ -51,8 +51,6 @@ class CustomerCest
|
|||
|
||||
$fields = [
|
||||
'company_name' => $faker->company,
|
||||
'first_name' => $faker->firstName,
|
||||
'last_name' => $faker->lastName,
|
||||
'vat_id' => $faker->randomNumber(9),
|
||||
'address1[]' => $faker->streetAddress,
|
||||
'country' => $faker->countryCode,
|
||||
|
|
@ -92,8 +90,6 @@ class CustomerCest
|
|||
|
||||
$I->seeRecord(CustomerAddress::class, [
|
||||
'company_name' => $fields['company_name'],
|
||||
'first_name' => $fields['first_name'],
|
||||
'last_name' => $fields['last_name'],
|
||||
'vat_id' => $fields['vat_id'],
|
||||
'address1' => $fields['address1[]'],
|
||||
'country' => $fields['country'],
|
||||
|
|
|
|||
Loading…
Reference in New Issue