mirror of
https://github.com/ent/ent.git
synced 2026-05-04 16:40:55 +03:00
doc: explain how to use functional indexes in migrations (#4149)
This commit is contained in:
4
examples/functionalidx/migrations/20240720083105.sql
Normal file
4
examples/functionalidx/migrations/20240720083105.sql
Normal file
@@ -0,0 +1,4 @@
|
||||
-- Create "users" table
|
||||
CREATE TABLE "users" ("id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY, "name" character varying NOT NULL, PRIMARY KEY ("id"));
|
||||
-- Create index "unique_name" to table: "users"
|
||||
CREATE UNIQUE INDEX "unique_name" ON "users" ((lower((name)::text)));
|
||||
2
examples/functionalidx/migrations/atlas.sum
Normal file
2
examples/functionalidx/migrations/atlas.sum
Normal file
@@ -0,0 +1,2 @@
|
||||
h1:S98ETWG3SnZDw9MHSddll9mIQgSdlueIh1KT6+NZOTg=
|
||||
20240720083105.sql h1:z0jgf25hGBoJu7OXVGxCOh6AFzfAil0xWR8pAoTDWPU=
|
||||
Reference in New Issue
Block a user