Skip to content

Commit 6ba016a

Browse files
authored
Merge pull request #56 from lekkacat/patch-1
Change Migration to DatabaseMigration
2 parents 0163b8b + 9db7743 commit 6ba016a

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

app/Front/Docs/Content/framework/05-models.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,16 +102,17 @@ Migrations are used to manage database tables that hold persisted model data. Mi
102102
```php
103103
// app/CreateBookTable.php
104104

105-
use Tempest\Database\Migration;
105+
use Tempest\Database\DatabaseMigration;
106106
use Tempest\Database\QueryStatement;
107107
use Tempest\Database\QueryStatements\CreateTableStatement;
108108
use Tempest\Database\QueryStatements\DropTableStatement;
109109

110-
final readonly class CreateBookTable implements Migration
110+
final readonly class CreateBookTable implements DatabaseMigration
111111
{
112-
public function getName(): string
113-
{
114-
return '2024-08-12_create_book_table';
112+
public string $name {
113+
get {
114+
return '2024-08-12_create_book_table';
115+
}
115116
}
116117

117118
public function up(): QueryStatement|null
@@ -263,4 +264,4 @@ final class Book implements DatabaseModel
263264
}
264265
```
265266

266-
We're still finetuning the relation API, you can follow the progress in [this issue](https://github.com/tempestphp/tempest-framework/issues/756).
267+
We're still finetuning the relation API, you can follow the progress in [this issue](https://github.com/tempestphp/tempest-framework/issues/756).

0 commit comments

Comments
 (0)