Skip to content

Commit 9573d05

Browse files
author
Fredrick Peter
committed
upgrade
1 parent ed7dffd commit 9573d05

File tree

7 files changed

+76
-27
lines changed

7 files changed

+76
-27
lines changed

composer.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,6 @@
2828
},
2929
"classmap": ["src/*"]
3030
},
31-
"autoload-dev": {
32-
"psr-4": {
33-
"Tamedevelopers\\Database\\Tests\\": "tests/"
34-
}
35-
},
3631
"minimum-stability": "stable",
3732
"prefer-stable": true
3833
}

src/Dummy/dummyInit.dum

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,4 @@ $db->configPagination([
8585
| expire old cache whenever a change has been made to the file
8686
|--------------------------------------------------------------------------
8787
*/
88-
asset_config('/', true);
88+
config_asset('/', true);

src/Dummy/dummyJobsMigration.dum

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,12 @@ return new class extends Migration
1616
{
1717
Schema::create('dummy_table', function (Blueprint $table) {
1818
$table->id();
19-
$table->unsignedBigInteger('user_id')->index()->nullable();
20-
$table->json('payload')->nullable();
21-
$table->json('file')->nullable();
22-
$table->string('email');
23-
$table->string('subject');
24-
$table->longText('message');
25-
$table->text('alt_message')->nullable();
26-
$table->string('error')->nullable();
27-
$table->string('type')->nullable();
28-
$table->integer('status')->default(0)->index();
29-
$table->integer('attempts')->default(0)->index();
30-
$table->timestamps();
19+
$table->string('queue')->index();
20+
$table->longText('payload');
21+
$table->tinyInteger('attempts')->unsigned();
22+
$table->unsignedInteger('reserved_at')->nullable();
23+
$table->unsignedInteger('available_at');
24+
$table->unsignedInteger('created_at');
3125
});
3226
}
3327

src/Migrations/Blueprint.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function __construct($tableName = null)
4141
* Creating Table Structure
4242
* Indexs|Primary|Constraints
4343
*
44-
* @return array\MySQLTemplate
44+
* @return array
4545
*/
4646
private function MySQLTemplate()
4747
{
@@ -62,7 +62,7 @@ private function MySQLTemplate()
6262
/**
6363
* Creating Database Table
6464
*
65-
* @return array\handle
65+
* @return array
6666
*/
6767
public function handle()
6868
{

src/Migrations/Traits/FilePathTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ trait FilePathTrait{
1515
* Get Traceable File name
1616
* @param string|null $name
1717
*
18-
* @return string|null\traceable
18+
* @return string|null
1919
*/
2020
public function traceableTableFileName($table = null)
2121
{

src/Migrations/Traits/SchemaConfigurationTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,8 @@ protected function getColumnLength($type, ?int $length = null)
276276
'bigInteger' => 20,
277277
'bigIncrements' => 20,
278278
'increments' => 11,
279-
'unsignedBigInteger' => 20,
280279
'unsignedInteger' => 10,
280+
'unsignedBigInteger' => 20,
281281
'unsignedTinyInteger' => 3,
282282
'unsignedSmallInteger' => 5,
283283
'unsignedMediumInteger' => 9,

src/Migrations/Traits/SchemaTrait.php

Lines changed: 65 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,12 @@ public function integer($name)
4343
/**
4444
* Creating column
4545
* @param string $name
46-
* @param int $length
4746
*
4847
* @return $this
4948
*/
50-
public function tinyInteger($name, ?int $length = 4)
49+
public function unsignedInteger($name)
5150
{
52-
return $this->addColumn($name, 'tinyInteger', compact('length'));
51+
return $this->addColumn($name, 'unsignedInteger');
5352
}
5453

5554
/**
@@ -74,6 +73,54 @@ public function unsignedBigInteger($name)
7473
return $this->addColumn($name, 'unsignedBigInteger');
7574
}
7675

76+
/**
77+
* Creating column
78+
* @param string $name
79+
* @param int $length
80+
*
81+
* @return $this
82+
*/
83+
public function tinyInteger($name, ?int $length = 4)
84+
{
85+
return $this->addColumn($name, 'tinyInteger', compact('length'));
86+
}
87+
88+
/**
89+
* Creating column
90+
* @param string $name
91+
* @param int $length
92+
*
93+
* @return $this
94+
*/
95+
public function unsignedTinyInteger($name, ?int $length = 4)
96+
{
97+
return $this->addColumn($name, 'unsignedTinyInteger', compact('length'));
98+
}
99+
100+
/**
101+
* Creating column
102+
* @param string $name
103+
* @param int $length
104+
*
105+
* @return $this
106+
*/
107+
public function unsignedSmallInteger($name, ?int $length = 4)
108+
{
109+
return $this->addColumn($name, 'unsignedSmallInteger', compact('length'));
110+
}
111+
112+
/**
113+
* Creating column
114+
* @param string $name
115+
* @param int $length
116+
*
117+
* @return $this
118+
*/
119+
public function unsignedMediumInteger($name, ?int $length = 4)
120+
{
121+
return $this->addColumn($name, 'unsignedMediumInteger', compact('length'));
122+
}
123+
77124
/**
78125
* Creating a column
79126
* @param string $name
@@ -100,6 +147,19 @@ public function decimal($name, $total = 8, $places = 2)
100147
return $this->addColumn($name, 'decimal', ['total' => $total, 'places' => $places]);
101148
}
102149

150+
/**
151+
* Creating a column
152+
* @param string $name
153+
* @param int $total
154+
* @param int $places
155+
*
156+
* @return $this
157+
*/
158+
public function unsignedDecimal($name, $total = 8, $places = 2)
159+
{
160+
return $this->addColumn($name, 'unsignedDecimal', ['total' => $total, 'places' => $places]);
161+
}
162+
103163
/**
104164
* Creating a column
105165
*
@@ -131,7 +191,7 @@ public function string($name, ?int $length = 255)
131191
* @param string $name
132192
* @param int $length
133193
*
134-
* @return object\char
194+
* @return $this
135195
*/
136196
public function char($name, $length = 255)
137197
{
@@ -333,7 +393,7 @@ public function ipAddress($name)
333393
*
334394
* @param string $name
335395
*
336-
* @return \Illuminate\Database\Schema\ColumnDefinition
396+
* @return $this
337397
*/
338398
public function macAddress($name)
339399
{

0 commit comments

Comments
 (0)