File tree Expand file tree Collapse file tree 2 files changed +6
-26
lines changed
tests/Integration/Database Expand file tree Collapse file tree 2 files changed +6
-26
lines changed Original file line number Diff line number Diff line change 44
55use PHPUnit \Framework \Attributes \Test ;
66use Tempest \Cryptography \Encryption \Encrypter ;
7- use Tempest \Database \DatabaseMigration ;
87use Tempest \Database \Encrypted ;
98use Tempest \Database \IsDatabaseModel ;
9+ use Tempest \Database \MigratesUp ;
1010use Tempest \Database \Migrations \CreateMigrationsTable ;
1111use Tempest \Database \PrimaryKey ;
1212use Tempest \Database \Query ;
@@ -127,7 +127,7 @@ public function __construct(
127127 ) {}
128128}
129129
130- final class CreateUserWithEncryptedDataTable implements DatabaseMigration
130+ final class CreateUserWithEncryptedDataTable implements MigratesUp
131131{
132132 public string $ name = '2024_create_users_with_encrypted_data_table ' ;
133133
@@ -138,14 +138,9 @@ public function up(): CreateTableStatement
138138 ->string ('email ' )
139139 ->text ('secret ' );
140140 }
141-
142- public function down (): null
143- {
144- return null ;
145- }
146141}
147142
148- final class CreateUserWithNullableEncryptedDataTable implements DatabaseMigration
143+ final class CreateUserWithNullableEncryptedDataTable implements MigratesUp
149144{
150145 public string $ name = '2024_create_users_with_nullable_encrypted_data_table ' ;
151146
@@ -156,9 +151,4 @@ public function up(): CreateTableStatement
156151 ->string ('email ' )
157152 ->text ('secret ' , nullable: true );
158153 }
159-
160- public function down (): null
161- {
162- return null ;
163- }
164154}
Original file line number Diff line number Diff line change 44
55use PHPUnit \Framework \Attributes \Test ;
66use Tempest \Cryptography \Password \PasswordHasher ;
7- use Tempest \Database \DatabaseMigration ;
87use Tempest \Database \Hashed ;
98use Tempest \Database \IsDatabaseModel ;
9+ use Tempest \Database \MigratesUp ;
1010use Tempest \Database \Migrations \CreateMigrationsTable ;
1111use Tempest \Database \PrimaryKey ;
1212use Tempest \Database \QueryStatements \CreateTableStatement ;
@@ -115,7 +115,7 @@ public function __construct(
115115 ) {}
116116}
117117
118- final class CreateUserWithHashTable implements DatabaseMigration
118+ final class CreateUserWithHashTable implements MigratesUp
119119{
120120 public string $ name = '2024_create_users_table ' ;
121121
@@ -126,14 +126,9 @@ public function up(): CreateTableStatement
126126 ->varchar ('email ' )
127127 ->text ('password ' );
128128 }
129-
130- public function down (): null
131- {
132- return null ;
133- }
134129}
135130
136- final class CreateUserWithNullablePasswordTable implements DatabaseMigration
131+ final class CreateUserWithNullablePasswordTable implements MigratesUp
137132{
138133 public string $ name = '2024_create_users_with_nullable_password_table ' ;
139134
@@ -144,9 +139,4 @@ public function up(): CreateTableStatement
144139 ->varchar ('email ' )
145140 ->text ('password ' , nullable: true );
146141 }
147-
148- public function down (): null
149- {
150- return null ;
151- }
152142}
You can’t perform that action at this time.
0 commit comments