You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -267,7 +267,7 @@ The following table contains all of the available trigger modifiers:
267
267
|`->when('NEW.type = 4')`<br>`->when(fn ($query) => $query->where('NEW.type', 4))`| The trigger should only be called when the condition matches *(only with forEachRow)*. |
268
268
|`->replace(true)`| The trigger will replace an existing one defined with the same name. |
269
269
270
-
> **Note**
270
+
> [!NOTE]
271
271
> PostgreSQL always updates rows even if nothing changed, which may affect your performance. You can add the `suppress_redundant_updates_trigger()` trigger with a `BEFORE UPDATE` action to all tables.
> For this example you could also use a unique partial index on `user_id` with limiting the rows to `cancelled_at IS NOT NULL`.
419
419
420
420
#### Partial Indexes
@@ -540,7 +540,7 @@ Schema::create('products', function (Blueprint $table): void {
540
540
});
541
541
```
542
542
543
-
> **Note**
543
+
> [!NOTE]
544
544
> You can also utilize the domain type to use e.g. column types added by extensions or not yet supported by the package.
545
545
546
546
#### Altering Domain Types
@@ -681,7 +681,7 @@ The array data types store multiple values in one single column. They can be use
681
681
$table->integerArray(string $column);
682
682
```
683
683
684
-
> **Note**
684
+
> [!NOTE]
685
685
> While PostgreSQL array types are powerful, only the integer array is supported.
686
686
> It is the sole array type with additional PostgreSQL enhancements for manipulation and querying compared to JSON columns.
687
687
> The [intarray](https://www.postgresql.org/docs/current/intarray.html) extensions provides extensive features that can be used to e.g. [store and query tags](https://tapoueh.org/blog/2013/10/denormalizing-tags/) with advanced boolean logic.
@@ -719,7 +719,7 @@ The case insensitive text type is used to store a text that will be compared cas
719
719
$table->caseInsensitiveText(string $column);
720
720
```
721
721
722
-
> **Note**
722
+
> [!NOTE]
723
723
> You need to enable the `citext` extension with `Schema::createExtension('citext')` or `Schema::createExtensionIfNotExists('citext')` before.
724
724
725
725
#### Full Text Search
@@ -743,7 +743,7 @@ The hstore data type is used store key/value pairs within a single PostgreSQL va
743
743
$table->hstore(string $column);
744
744
```
745
745
746
-
> **Note**
746
+
> [!NOTE]
747
747
> You need to enable the `hstore` extension with `Schema::createExtensionIfNotExists('hstore')` or `Schema::createExtension('hstore')` before.
> You need to enable the `isn` extension with `Schema::createExtensionIfNotExists('isn')` or `Schema::createExtension('isn')` before.
773
773
774
774
#### Label Tree
@@ -778,7 +778,7 @@ The ltree data type stores a label as its position in a tree. This provides an e
778
778
$table->labelTree(string $column);
779
779
```
780
780
781
-
> **Note**
781
+
> [!NOTE]
782
782
> You need to enable the `ltree` extension with `Schema::createExtensionIfNotExists('ltree')` or `Schema::createExtension('ltree')` before.
783
783
784
784
#### Vector
@@ -788,10 +788,10 @@ The vector type can be used to store and search for embeddings created by AI pro
788
788
$table->vector(string $column, int $dimensions = 1536);
789
789
```
790
790
791
-
> **Note**
791
+
> [!NOTE]
792
792
> You need to enable the `vector` extension with `Schema::createExtensionIfNotExists('vector')` or `Schema::createExtension('vector')` before.
793
793
794
-
> **Note**
794
+
> [!NOTE]
795
795
> The `vector` extension is not a standard PostgreSQL extension but available with most PostgreSQL cloud services.
796
796
> You can check for support with the following query: `SELECT * FROM pg_available_extensions WHERE name = 'vector'`
797
797
@@ -981,7 +981,7 @@ In addition to the basic form of a Common Table Expression these optional settin
981
981
| cycle |`string`| Specify the automatic cycle detection settings for recursive queries. [(Documentation)](https://www.postgresql.org/docs/current/queries-with.html#QUERIES-WITH-CYCLE)|
982
982
| search |`string`| Specify the tree search mode setting for recursive queries. [(Documentation)](https://www.postgresql.org/docs/current/queries-with.html#QUERIES-WITH-SEARCH)|
983
983
984
-
> **Note**
984
+
> [!NOTE]
985
985
> When you are using recursive CTEs **always** use the `cycle` option to prevent infinite running queries because of loops in the data.
986
986
987
987
### Lazy By Cursor
@@ -1216,7 +1216,7 @@ class Example extends Model
1216
1216
}
1217
1217
```
1218
1218
1219
-
> **Warning**
1219
+
> [!CAUTION]
1220
1220
> When you mix columns with and without milliseconds in a table, the columns without milliseconds may behave unexpectedly to you:
1221
1221
> Instead of truncating the milliseconds, they are rounded by PostgreSQL.
1222
1222
> When the value is rounded up, your timestamp will be in the future.
0 commit comments