Skip to content

Commit 31da00a

Browse files
authored
Add new vector method to migrations
1 parent 1e8496c commit 31da00a

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

migrations.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Laravel will use the name of the migration to attempt to guess the name of the t
4444

4545
If you would like to specify a custom path for the generated migration, you may use the `--path` option when executing the `make:migration` command. The given path should be relative to your application's base path.
4646

47-
> [!NOTE]
47+
> [!NOTE]
4848
> Migration stubs may be customized using [stub publishing](/docs/{{version}}/artisan#stub-customization).
4949
5050
<a name="squashing-migrations"></a>
@@ -70,7 +70,7 @@ php artisan schema:dump --database=testing --prune
7070

7171
You should commit your database schema file to source control so that other new developers on your team may quickly create your application's initial database structure.
7272

73-
> [!WARNING]
73+
> [!WARNING]
7474
> Migration squashing is only available for the MariaDB, MySQL, PostgreSQL, and SQLite databases and utilizes the database's command-line client.
7575
7676
<a name="migration-structure"></a>
@@ -161,7 +161,7 @@ When the `isolated` option is provided, Laravel will acquire an atomic lock usin
161161
php artisan migrate --isolated
162162
```
163163

164-
> [!WARNING]
164+
> [!WARNING]
165165
> To utilize this feature, your application must be using the `memcached`, `redis`, `dynamodb`, `database`, `file`, or `array` cache driver as your application's default cache driver. In addition, all servers must be communicating with the same central cache server.
166166
167167
<a name="forcing-migrations-to-run-in-production"></a>
@@ -241,7 +241,7 @@ By default, the `migrate:fresh` command only drops tables from the default datab
241241
php artisan migrate:fresh --database=admin
242242
```
243243

244-
> [!WARNING]
244+
> [!WARNING]
245245
> The `migrate:fresh` command will drop all database tables regardless of their prefix. This command should be used with caution when developing on a database that is shared with other applications.
246246
247247
<a name="tables"></a>
@@ -458,6 +458,7 @@ The schema builder blueprint offers a variety of methods that correspond to the
458458
[uuidMorphs](#column-method-uuidMorphs)
459459
[ulid](#column-method-ulid)
460460
[uuid](#column-method-uuid)
461+
[vector](#column-method-vector)
461462
[year](#column-method-year)
462463

463464
</div>
@@ -587,7 +588,7 @@ The `geography` method creates a `GEOGRAPHY` equivalent column with the given sp
587588

588589
$table->geography('coordinates', subtype: 'point', srid: 4326);
589590

590-
> [!NOTE]
591+
> [!NOTE]
591592
> Support for spatial types depends on your database driver. Please refer to your database's documentation. If your application is utilizing a PostgreSQL database, you must install the [PostGIS](https://postgis.net) extension before the `geography` method may be used.
592593
593594
<a name="column-method-geometry"></a>
@@ -597,7 +598,7 @@ The `geometry` method creates a `GEOMETRY` equivalent column with the given spat
597598

598599
$table->geometry('positions', subtype: 'point', srid: 0);
599600

600-
> [!NOTE]
601+
> [!NOTE]
601602
> Support for spatial types depends on your database driver. Please refer to your database's documentation. If your application is utilizing a PostgreSQL database, you must install the [PostGIS](https://postgis.net) extension before the `geometry` method may be used.
602603
603604
<a name="column-method-id"></a>
@@ -918,6 +919,13 @@ The `uuid` method creates a `UUID` equivalent column:
918919

919920
$table->uuid('id');
920921

922+
<a name="column-method-vector"></a>
923+
#### `vector()` {.collection-method}
924+
925+
The `vector` method creates a `vector` equivalent column:
926+
927+
$table->vector('embedding');
928+
921929
<a name="column-method-year"></a>
922930
#### `year()` {.collection-method}
923931

@@ -990,7 +998,7 @@ The `default` modifier accepts a value or an `Illuminate\Database\Query\Expressi
990998
}
991999
};
9921000

993-
> [!WARNING]
1001+
> [!WARNING]
9941002
> Support for default expressions depends on your database driver, database version, and the field type. Please refer to your database's documentation.
9951003
9961004
<a name="column-order"></a>
@@ -1229,7 +1237,7 @@ You may enable or disable foreign key constraints within your migrations by usin
12291237
// Constraints disabled within this closure...
12301238
});
12311239

1232-
> [!WARNING]
1240+
> [!WARNING]
12331241
> SQLite disables foreign key constraints by default. When using SQLite, make sure to [enable foreign key support](/docs/{{version}}/database#configuration) in your database configuration before attempting to create them in your migrations.
12341242
12351243
<a name="events"></a>

0 commit comments

Comments
 (0)