Skip to content
This repository was archived by the owner on Feb 16, 2022. It is now read-only.

Commit 62b50e8

Browse files
committed
Merge branch 'release/v4.0.1'
2 parents 211ae4f + 8477008 commit 62b50e8

11 files changed

+38
-24
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
55
This project adheres to [Semantic Versioning](CONTRIBUTING.md).
66

77

8+
## [v4.0.1] - 2020-03-20
9+
- Convert into bigInteger database fields
10+
- Add shortcut -f (force) for artisan publish commands
11+
- Fix migrations path
12+
813
## [v4.0.0] - 2020-03-15
914
- Upgrade to Laravel v7.1.x & PHP v7.4.x
1015

@@ -122,6 +127,7 @@ This project adheres to [Semantic Versioning](CONTRIBUTING.md).
122127
## v0.0.1 - 2017-04-08
123128
- Rename package to "rinvex/attributable" from "rinvex/sparse" based on 715a831
124129

130+
[v4.0.1]: https://github.com/rinvex/laravel-attributes/compare/v4.0.0...v4.0.1
125131
[v4.0.0]: https://github.com/rinvex/laravel-attributes/compare/v3.0.3...v4.0.0
126132
[v3.0.3]: https://github.com/rinvex/laravel-attributes/compare/v3.0.2...v3.0.3
127133
[v3.0.2]: https://github.com/rinvex/laravel-attributes/compare/v3.0.1...v3.0.2

database/migrations/2020_01_01_000001_create_attributes_table.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public function up(): void
1717
{
1818
Schema::create(config('rinvex.attributes.tables.attributes'), function (Blueprint $table) {
1919
// Columns
20-
$table->increments('id');
20+
$table->bigIncrements('id');
2121
$table->string('slug');
2222
$table->{$this->jsonable()}('name');
2323
$table->{$this->jsonable()}('description')->nullable();

database/migrations/2020_01_01_000002_create_attribute_text_values_table.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ public function up(): void
1717
{
1818
Schema::create(config('rinvex.attributes.tables.attribute_text_values'), function (Blueprint $table) {
1919
// Columns
20-
$table->increments('id');
20+
$table->bigIncrements('id');
2121
$table->text('content');
22-
$table->integer('attribute_id')->unsigned();
23-
$table->integer('entity_id')->unsigned();
22+
$table->bigInteger('attribute_id')->unsigned();
23+
$table->bigInteger('entity_id')->unsigned();
2424
$table->string('entity_type');
2525
$table->timestamps();
2626

database/migrations/2020_01_01_000003_create_attribute_boolean_values_table.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ public function up(): void
1717
{
1818
Schema::create(config('rinvex.attributes.tables.attribute_boolean_values'), function (Blueprint $table) {
1919
// Columns
20-
$table->increments('id');
20+
$table->bigIncrements('id');
2121
$table->boolean('content');
22-
$table->integer('attribute_id')->unsigned();
23-
$table->integer('entity_id')->unsigned();
22+
$table->bigInteger('attribute_id')->unsigned();
23+
$table->bigInteger('entity_id')->unsigned();
2424
$table->string('entity_type');
2525
$table->timestamps();
2626

database/migrations/2020_01_01_000004_create_attribute_datetime_values_table.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ public function up(): void
1717
{
1818
Schema::create(config('rinvex.attributes.tables.attribute_datetime_values'), function (Blueprint $table) {
1919
// Columns
20-
$table->increments('id');
20+
$table->bigIncrements('id');
2121
$table->dateTime('content');
22-
$table->integer('attribute_id')->unsigned();
23-
$table->integer('entity_id')->unsigned();
22+
$table->bigInteger('attribute_id')->unsigned();
23+
$table->bigInteger('entity_id')->unsigned();
2424
$table->string('entity_type');
2525
$table->timestamps();
2626

database/migrations/2020_01_01_000005_create_attribute_integer_values_table.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ public function up(): void
1717
{
1818
Schema::create(config('rinvex.attributes.tables.attribute_integer_values'), function (Blueprint $table) {
1919
// Columns
20-
$table->increments('id');
21-
$table->integer('content');
22-
$table->integer('attribute_id')->unsigned();
23-
$table->integer('entity_id')->unsigned();
20+
$table->bigIncrements('id');
21+
$table->bigInteger('content');
22+
$table->bigInteger('attribute_id')->unsigned();
23+
$table->bigInteger('entity_id')->unsigned();
2424
$table->string('entity_type');
2525
$table->timestamps();
2626

database/migrations/2020_01_01_000006_create_attribute_varchar_values_table.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ public function up(): void
1717
{
1818
Schema::create(config('rinvex.attributes.tables.attribute_varchar_values'), function (Blueprint $table) {
1919
// Columns
20-
$table->increments('id');
20+
$table->bigIncrements('id');
2121
$table->string('content');
22-
$table->integer('attribute_id')->unsigned();
23-
$table->integer('entity_id')->unsigned();
22+
$table->bigInteger('attribute_id')->unsigned();
23+
$table->bigInteger('entity_id')->unsigned();
2424
$table->string('entity_type');
2525
$table->timestamps();
2626

database/migrations/2020_01_01_000007_create_attribute_entity_table.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ public function up(): void
1717
{
1818
Schema::create(config('rinvex.attributes.tables.attribute_entity'), function (Blueprint $table) {
1919
// Columns
20-
$table->integer('attribute_id')->unsigned();
20+
$table->bigInteger('attribute_id')->unsigned();
2121
$table->string('entity_type');
22-
$table->integer('entity_id')->unsigned()->nullable(); // TODO: Making this nullable for now as it breaks the basic features
22+
$table->bigInteger('entity_id')->unsigned()->nullable(); // TODO: Making this nullable for now as it breaks the basic features
2323
$table->timestamps();
2424

2525
// Indexes

src/Console/Commands/MigrateCommand.php

+6-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class MigrateCommand extends Command
1313
*
1414
* @var string
1515
*/
16-
protected $signature = 'rinvex:migrate:attributes {--force : Force the operation to run when in production.}';
16+
protected $signature = 'rinvex:migrate:attributes {--f|force : Force the operation to run when in production.}';
1717

1818
/**
1919
* The console command description.
@@ -31,7 +31,11 @@ public function handle(): void
3131
{
3232
$this->alert($this->description);
3333

34-
if (file_exists($path = 'database/migrations/rinvex/laravel-attributes')) {
34+
$path = config('rinvex.attributes.autoload_migrations') ?
35+
'vendor/rinvex/laravel-attributes/database/migrations' :
36+
'database/migrations/rinvex/laravel-attributes';
37+
38+
if (file_exists($path)) {
3539
$this->call('migrate', [
3640
'--step' => true,
3741
'--path' => $path,

src/Console/Commands/PublishCommand.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class PublishCommand extends Command
1313
*
1414
* @var string
1515
*/
16-
protected $signature = 'rinvex:publish:attributes {--force : Overwrite any existing files.} {--R|resource=all}';
16+
protected $signature = 'rinvex:publish:attributes {--f|force : Overwrite any existing files.} {--r|resource=all}';
1717

1818
/**
1919
* The console command description.

src/Console/Commands/RollbackCommand.php

+6-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class RollbackCommand extends Command
1313
*
1414
* @var string
1515
*/
16-
protected $signature = 'rinvex:rollback:attributes {--force : Force the operation to run when in production.}';
16+
protected $signature = 'rinvex:rollback:attributes {--f|force : Force the operation to run when in production.}';
1717

1818
/**
1919
* The console command description.
@@ -31,7 +31,11 @@ public function handle(): void
3131
{
3232
$this->alert($this->description);
3333

34-
if (file_exists($path = 'database/migrations/rinvex/laravel-attributes')) {
34+
$path = config('rinvex.attributes.autoload_migrations') ?
35+
'vendor/rinvex/laravel-attributes/database/migrations' :
36+
'database/migrations/rinvex/laravel-attributes';
37+
38+
if (file_exists($path)) {
3539
$this->call('migrate:reset', [
3640
'--path' => $path,
3741
'--force' => $this->option('force'),

0 commit comments

Comments
 (0)