Skip to content

Commit 8d3c978

Browse files
committed
Merge branch 'develop'
2 parents 4254a94 + 3b25d26 commit 8d3c978

File tree

8 files changed

+105
-5
lines changed

8 files changed

+105
-5
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2121
### Fixed
2222
### Removed --->
2323

24+
## 0.6.6 - 2021-09-03
25+
### Changed
26+
- Default field level encryption security setting to false
27+
### Fixed
28+
- Issue with table field size when using field level encryption
29+
2430
## 0.6.5 - 2021-08-29
2531
### Fixed
2632
- Issue with user policy when user in models directory

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@
3434
"minimum-stability": "dev",
3535
"prefer-stable": true,
3636
"require": {
37-
"php": ">=7.3",
37+
"php": "^7.3|^7.4|^8.0",
3838
"cknow/laravel-money": "^4.0|^5.0|^6.0",
39+
"doctrine/dbal": "^2.0|^3.0",
3940
"guzzlehttp/guzzle": "^7.3",
4041
"illuminate/support": "^6.0|^7.0|^8.0",
4142
"laracasts/flash": "^3.2",

config/laravel-crm.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,6 @@
9292
|
9393
*/
9494

95-
'encrypt_db_fields' => env('LARAVEL_CRM_ENCRYPT_DB_FIELDS', true),
95+
'encrypt_db_fields' => env('LARAVEL_CRM_ENCRYPT_DB_FIELDS', false),
9696

9797
];

config/package.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
|
1414
*/
1515

16-
'version' => '0.6.5',
16+
'version' => '0.6.6',
1717

1818
];
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Support\Facades\Schema;
6+
7+
class AlterFieldsForEncryptionOnLaravelCrmTables extends Migration
8+
{
9+
/**
10+
* Run the migrations.
11+
*
12+
* @return void
13+
*/
14+
public function up()
15+
{
16+
if (config('laravel-crm.encrypt_db_fields')) {
17+
Schema::table(config('laravel-crm.db_table_prefix').'people', function (Blueprint $table) {
18+
$table->string('title', 500)->nullable()->change();
19+
$table->string('first_name', 500)->change();
20+
$table->string('middle_name', 500)->nullable()->change();
21+
$table->string('last_name', 500)->nullable()->change();
22+
$table->string('maiden_name', 500)->nullable()->change();
23+
});
24+
25+
Schema::table(config('laravel-crm.db_table_prefix').'organisations', function (Blueprint $table) {
26+
$table->string('name', 1000)->nullable()->change();
27+
});
28+
29+
Schema::table(config('laravel-crm.db_table_prefix').'addresses', function (Blueprint $table) {
30+
$table->string('address', 1000)->nullable()->change();
31+
$table->string('line1', 1000)->change();
32+
$table->string('line2', 1000)->nullable()->change();
33+
$table->string('line3', 1000)->nullable()->change();
34+
$table->string('code', 500)->nullable()->change();
35+
$table->string('city', 500)->nullable()->change();
36+
$table->string('state', 500)->nullable()->change();
37+
$table->string('country', 500)->nullable()->change();
38+
});
39+
40+
Schema::table(config('laravel-crm.db_table_prefix').'emails', function (Blueprint $table) {
41+
$table->string('address', 500)->nullable()->change();
42+
});
43+
44+
Schema::table(config('laravel-crm.db_table_prefix').'phones', function (Blueprint $table) {
45+
$table->string('number', 500)->nullable()->change();
46+
});
47+
}
48+
}
49+
50+
/**
51+
* Reverse the migrations.
52+
*
53+
* @return void
54+
*/
55+
public function down()
56+
{
57+
if (config('laravel-crm.encrypt_db_fields')) {
58+
Schema::table(config('laravel-crm.db_table_prefix').'people', function (Blueprint $table) {
59+
$table->string('title', 255)->nullable()->change();
60+
$table->string('first_name', 255)->change();
61+
$table->string('middle_name', 255)->nullable()->change();
62+
$table->string('last_name', 255)->nullable()->change();
63+
$table->string('maiden_name', 255)->nullable()->change();
64+
});
65+
66+
Schema::table(config('laravel-crm.db_table_prefix').'organisations', function (Blueprint $table) {
67+
$table->string('name', 1000)->nullable()->change();
68+
});
69+
70+
Schema::table(config('laravel-crm.db_table_prefix').'addresses', function (Blueprint $table) {
71+
$table->string('address', 255)->nullable()->change();
72+
$table->string('line1', 255)->change();
73+
$table->string('line2', 255)->nullable()->change();
74+
$table->string('line3', 255)->nullable()->change();
75+
$table->string('code', 255)->nullable()->change();
76+
$table->string('city', 255)->nullable()->change();
77+
$table->string('state', 255)->nullable()->change();
78+
$table->string('country', 255)->nullable()->change();
79+
});
80+
81+
Schema::table(config('laravel-crm.db_table_prefix').'emails', function (Blueprint $table) {
82+
$table->string('address', 255)->nullable()->change();
83+
});
84+
85+
Schema::table(config('laravel-crm.db_table_prefix').'phones', function (Blueprint $table) {
86+
$table->string('number', 255)->nullable()->change();
87+
});
88+
}
89+
}
90+
}

resources/views/people/partials/card-show.blade.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@
4343
<dd class="col-sm-9">{{ $person->middle_name }}</dd>
4444
<dt class="col-sm-3 text-right">{{ ucfirst(__('laravel-crm::lang.last_name')) }}</dt>
4545
<dd class="col-sm-9">{{ $person->last_name }}</dd>
46+
<dt class="col-sm-3 text-right">{{ ucfirst(__('laravel-crm::lang.gender')) }}</dt>
47+
<dd class="col-sm-9">{{ ucfirst($person->gender) }}</dd>
48+
<dt class="col-sm-3 text-right">{{ ucfirst(__('laravel-crm::lang.birthday')) }}</dt>
49+
<dd class="col-sm-9">{{ $person->birthday }}</dd>
4650
<dt class="col-sm-3 text-right">{{ ucfirst(__('laravel-crm::lang.email')) }}</dt>
4751
<dd class="col-sm-9">
4852
@isset($email)

src/LaravelCrmServiceProvider.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ function ($perPage = 30, $page = null, $options = []) {
140140
__DIR__ . '/../database/migrations/create_laravel_crm_product_variations_table.php.stub' => $this->getMigrationFileName($filesystem, 'create_laravel_crm_product_variations_table.php', 9),
141141
__DIR__ . '/../database/migrations/create_laravel_crm_deal_products_table.php.stub' => $this->getMigrationFileName($filesystem, 'create_laravel_crm_deal_products_table.php', 10),
142142
__DIR__ . '/../database/migrations/add_global_to_laravel_crm_settings_table.php.stub' => $this->getMigrationFileName($filesystem, 'add_global_to_laravel_crm_settings_table.php', 11),
143+
__DIR__ . '/../database/migrations/alter_fields_for_encryption_on_laravel_crm_tables.php.stub' => $this->getMigrationFileName($filesystem, 'alter_fields_for_encryption_on_laravel_crm_tables.php', 12),
143144
], 'migrations');
144145

145146
// Publishing the seeders

src/Models/Person.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ class Person extends Model
2222
'middle_name',
2323
'last_name',
2424
'maiden_name',
25-
'birthday',
26-
'gender',
2725
];
2826

2927
protected $searchable = [

0 commit comments

Comments
 (0)