mirror of
https://github.com/ent/ent.git
synced 2026-04-29 22:20:54 +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)));
|
||||
Reference in New Issue
Block a user