mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
doc: explain how to use enum types properly (#4137)
This commit is contained in:
4
examples/enumtypes/migrations/20240712145529.sql
Normal file
4
examples/enumtypes/migrations/20240712145529.sql
Normal file
@@ -0,0 +1,4 @@
|
||||
-- Create enum type "status"
|
||||
CREATE TYPE "status" AS ENUM ('active', 'inactive', 'pending');
|
||||
-- Create "users" table
|
||||
CREATE TABLE "users" ("id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY, "status" "status" NOT NULL, PRIMARY KEY ("id"));
|
||||
2
examples/enumtypes/migrations/atlas.sum
Normal file
2
examples/enumtypes/migrations/atlas.sum
Normal file
@@ -0,0 +1,2 @@
|
||||
h1:TutA+ler8PeLbYLHWi3gG7Ms58TAD1rM5qX48PFIboQ=
|
||||
20240712145529.sql h1:C25ZlcdNNQOo2SvVZ5+9zL0loYYbn56pSHn5u8xZWpc=
|
||||
Reference in New Issue
Block a user