Skip to content

Commit

Permalink
Improve README
Browse files Browse the repository at this point in the history
  • Loading branch information
staudenmeir committed Aug 16, 2024
1 parent ecdcd2a commit 093d4f9
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ Remember to use the `HasJsonRelationships` trait in both the parent and the rela

#### Referential Integrity

On [MySQL](https://dev.mysql.com/doc/refman/en/create-table-foreign-keys.html)
, [MariaDB](https://mariadb.com/kb/en/library/foreign-keys/)
On [MySQL](https://dev.mysql.com/doc/refman/en/create-table-foreign-keys.html),
[MariaDB](https://mariadb.com/kb/en/library/foreign-keys/),
and [SQL Server](https://docs.microsoft.com/en-us/sql/relational-databases/tables/specify-computed-columns-in-a-table)
you can still ensure referential integrity with foreign keys on generated/computed columns.

Expand All @@ -107,7 +107,7 @@ Schema::create('users', function (Blueprint $table) {
});
```

Laravel migrations (5.7.25+) also support this feature on SQL Server:
Laravel migrations also support this feature on SQL Server:

```php
Schema::create('users', function (Blueprint $table) {
Expand All @@ -120,9 +120,6 @@ Schema::create('users', function (Blueprint $table) {
});
```

There is a [workaround](https://github.com/staudenmeir/eloquent-json-relations/tree/1.1#referential-integrity) for older
versions of Laravel.

### Many-To-Many Relationships

The package also introduces two new relationship types: `BelongsToJson` and `HasManyJson`
Expand Down

0 comments on commit 093d4f9

Please sign in to comment.