Skip to content

Commit

Permalink
ENH Rename and move Title field
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Feb 7, 2024
1 parent 533f9ed commit 7542172
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,22 @@ class MyCustomLink extends Link

Custom links can have validation set using standard [model validation](https://docs.silverstripe.org/en/5/developer_guides/forms/validation/#model-validation).

## Migration form LinkField v3 to v4

The `Title` DB field has been renamed to `LinkText`

You can manually rename this column in your database with the following:

```php
// app/_config.php

use SilverStripe\ORM\DB;

// Only run this once
// This will rename the `Title` field to `LinkText` in all relevant tables
DB::get_conn()->getSchemaManager()->renameField('LinkField_Link', 'Title', 'LinkText');
```

## Migrating from Shae Dawson's Linkable module

https://github.com/sheadawson/silverstripe-linkable
Expand Down

0 comments on commit 7542172

Please sign in to comment.