File tree 5 files changed +35
-100
lines changed
5 files changed +35
-100
lines changed Original file line number Diff line number Diff line change 4
4
use Illuminate \Database \Schema \Blueprint ;
5
5
use Illuminate \Support \Facades \Schema ;
6
6
7
- return new class extends Migration
7
+ return new class () extends Migration
8
8
{
9
- /**
10
- * The database schema.
11
- *
12
- * @var \Illuminate\Database\Schema\Builder
13
- */
14
- protected $ schema ;
15
-
16
- /**
17
- * Create a new migration instance.
18
- *
19
- * @return void
20
- */
21
- public function __construct ()
22
- {
23
- $ this ->schema = Schema::connection ($ this ->getConnection ());
24
- }
25
-
26
9
/**
27
10
* Run the migrations.
28
11
*
29
12
* @return void
30
13
*/
31
14
public function up ()
32
15
{
33
- $ this ->schema ->create ('oauth_auth_codes ' , function (Blueprint $ table ) {
16
+ $ schema = Schema::connection ($ this ->getConnection ());
17
+
18
+ $ schema ->create ('oauth_auth_codes ' , function (Blueprint $ table ) {
34
19
$ table ->string ('id ' , 100 )->primary ();
35
20
$ table ->unsignedBigInteger ('user_id ' )->index ();
36
21
$ table ->unsignedBigInteger ('client_id ' );
@@ -47,7 +32,9 @@ public function up()
47
32
*/
48
33
public function down ()
49
34
{
50
- $ this ->schema ->dropIfExists ('oauth_auth_codes ' );
35
+ $ schema = Schema::connection ($ this ->getConnection ());
36
+
37
+ $ schema ->dropIfExists ('oauth_auth_codes ' );
51
38
}
52
39
53
40
/**
Original file line number Diff line number Diff line change 4
4
use Illuminate \Database \Schema \Blueprint ;
5
5
use Illuminate \Support \Facades \Schema ;
6
6
7
- return new class extends Migration
7
+ return new class () extends Migration
8
8
{
9
- /**
10
- * The database schema.
11
- *
12
- * @var \Illuminate\Database\Schema\Builder
13
- */
14
- protected $ schema ;
15
-
16
- /**
17
- * Create a new migration instance.
18
- *
19
- * @return void
20
- */
21
- public function __construct ()
22
- {
23
- $ this ->schema = Schema::connection ($ this ->getConnection ());
24
- }
25
-
26
9
/**
27
10
* Run the migrations.
28
11
*
29
12
* @return void
30
13
*/
31
14
public function up ()
32
15
{
33
- $ this ->schema ->create ('oauth_access_tokens ' , function (Blueprint $ table ) {
16
+ $ schema = Schema::connection ($ this ->getConnection ());
17
+
18
+ $ schema ->create ('oauth_access_tokens ' , function (Blueprint $ table ) {
34
19
$ table ->string ('id ' , 100 )->primary ();
35
20
$ table ->unsignedBigInteger ('user_id ' )->nullable ()->index ();
36
21
$ table ->unsignedBigInteger ('client_id ' );
@@ -49,7 +34,9 @@ public function up()
49
34
*/
50
35
public function down ()
51
36
{
52
- $ this ->schema ->dropIfExists ('oauth_access_tokens ' );
37
+ $ schema = Schema::connection ($ this ->getConnection ());
38
+
39
+ $ schema ->dropIfExists ('oauth_access_tokens ' );
53
40
}
54
41
55
42
/**
Original file line number Diff line number Diff line change 4
4
use Illuminate \Database \Schema \Blueprint ;
5
5
use Illuminate \Support \Facades \Schema ;
6
6
7
- return new class extends Migration
7
+ return new class () extends Migration
8
8
{
9
- /**
10
- * The database schema.
11
- *
12
- * @var \Illuminate\Database\Schema\Builder
13
- */
14
- protected $ schema ;
15
-
16
- /**
17
- * Create a new migration instance.
18
- *
19
- * @return void
20
- */
21
- public function __construct ()
22
- {
23
- $ this ->schema = Schema::connection ($ this ->getConnection ());
24
- }
25
-
26
9
/**
27
10
* Run the migrations.
28
11
*
29
12
* @return void
30
13
*/
31
14
public function up ()
32
15
{
33
- $ this ->schema ->create ('oauth_refresh_tokens ' , function (Blueprint $ table ) {
16
+ $ schema = Schema::connection ($ this ->getConnection ());
17
+
18
+ $ schema ->create ('oauth_refresh_tokens ' , function (Blueprint $ table ) {
34
19
$ table ->string ('id ' , 100 )->primary ();
35
20
$ table ->string ('access_token_id ' , 100 )->index ();
36
21
$ table ->boolean ('revoked ' );
@@ -45,7 +30,9 @@ public function up()
45
30
*/
46
31
public function down ()
47
32
{
48
- $ this ->schema ->dropIfExists ('oauth_refresh_tokens ' );
33
+ $ schema = Schema::connection ($ this ->getConnection ());
34
+
35
+ $ schema ->dropIfExists ('oauth_refresh_tokens ' );
49
36
}
50
37
51
38
/**
Original file line number Diff line number Diff line change 4
4
use Illuminate \Database \Schema \Blueprint ;
5
5
use Illuminate \Support \Facades \Schema ;
6
6
7
- return new class extends Migration
7
+ return new class () extends Migration
8
8
{
9
- /**
10
- * The database schema.
11
- *
12
- * @var \Illuminate\Database\Schema\Builder
13
- */
14
- protected $ schema ;
15
-
16
- /**
17
- * Create a new migration instance.
18
- *
19
- * @return void
20
- */
21
- public function __construct ()
22
- {
23
- $ this ->schema = Schema::connection ($ this ->getConnection ());
24
- }
25
-
26
9
/**
27
10
* Get the migration connection name.
28
11
*
@@ -40,7 +23,9 @@ public function getConnection()
40
23
*/
41
24
public function up ()
42
25
{
43
- $ this ->schema ->create ('oauth_clients ' , function (Blueprint $ table ) {
26
+ $ schema = Schema::connection ($ this ->getConnection ());
27
+
28
+ $ schema ->create ('oauth_clients ' , function (Blueprint $ table ) {
44
29
$ table ->bigIncrements ('id ' );
45
30
$ table ->unsignedBigInteger ('user_id ' )->nullable ()->index ();
46
31
$ table ->string ('name ' );
@@ -61,6 +46,8 @@ public function up()
61
46
*/
62
47
public function down ()
63
48
{
64
- $ this ->schema ->dropIfExists ('oauth_clients ' );
49
+ $ schema = Schema::connection ($ this ->getConnection ());
50
+
51
+ $ schema ->dropIfExists ('oauth_clients ' );
65
52
}
66
53
};
Original file line number Diff line number Diff line change 4
4
use Illuminate \Database \Schema \Blueprint ;
5
5
use Illuminate \Support \Facades \Schema ;
6
6
7
- return new class extends Migration
7
+ return new class () extends Migration
8
8
{
9
- /**
10
- * The database schema.
11
- *
12
- * @var \Illuminate\Database\Schema\Builder
13
- */
14
- protected $ schema ;
15
-
16
- /**
17
- * Create a new migration instance.
18
- *
19
- * @return void
20
- */
21
- public function __construct ()
22
- {
23
- $ this ->schema = Schema::connection ($ this ->getConnection ());
24
- }
25
-
26
9
/**
27
10
* Run the migrations.
28
11
*
29
12
* @return void
30
13
*/
31
14
public function up ()
32
15
{
33
- $ this ->schema ->create ('oauth_personal_access_clients ' , function (Blueprint $ table ) {
16
+ $ schema = Schema::connection ($ this ->getConnection ());
17
+
18
+ $ schema ->create ('oauth_personal_access_clients ' , function (Blueprint $ table ) {
34
19
$ table ->bigIncrements ('id ' );
35
20
$ table ->unsignedBigInteger ('client_id ' );
36
21
$ table ->timestamps ();
@@ -44,7 +29,9 @@ public function up()
44
29
*/
45
30
public function down ()
46
31
{
47
- $ this ->schema ->dropIfExists ('oauth_personal_access_clients ' );
32
+ $ schema = Schema::connection ($ this ->getConnection ());
33
+
34
+ $ schema ->dropIfExists ('oauth_personal_access_clients ' );
48
35
}
49
36
50
37
/**
You can’t perform that action at this time.
0 commit comments