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
New to this, coming from laravel i want to learn jetzig framework i want to create a migration with uuid v4 or uuid v7 with default value
if using uuid v4 with auto generate id
CREATETABLEIF NOT EXISTS articles
(
id uuid NOT NULL DEFAULT gen_random_uuid(),
title character varying(255) COLLATE pg_catalog."default"NOT NULL,
created_at timestamp(0) without time zone DEFAULT now(),
updated_at timestamp(0) without time zone DEFAULT now(),
sync_at timestamp without time zone,
deleted_at timestamp(0) without time zone,
created_by uuid DEFAULT '00000000-0000-0000-0000-000000000000'::uuid,
updated_by uuid DEFAULT '00000000-0000-0000-0000-000000000000'::uuid,
CONSTRAINT articles_pkey PRIMARY KEY (id)
)
if using uuid v7 with auto generate id
CREATETABLEIF NOT EXISTS articles
(
id uuid NOT NULL DEFAULT uuid_generate_v7(),
title character varying(255) COLLATE pg_catalog."default"NOT NULL,
created_at timestamp(0) without time zone DEFAULT now(),
updated_at timestamp(0) without time zone DEFAULT now(),
sync_at timestamp without time zone,
deleted_at timestamp(0) without time zone,
created_by uuid DEFAULT '00000000-0000-0000-0000-000000000000'::uuid,
updated_by uuid DEFAULT '00000000-0000-0000-0000-000000000000'::uuid,
CONSTRAINT articles_pkey PRIMARY KEY (id)
)
Dear all,
New to this, coming from laravel i want to learn jetzig framework i want to create a migration with uuid v4 or uuid v7 with default value
if using uuid v4 with auto generate id
if using uuid v7 with auto generate id
i'm using https://github.com/fboulnois/pg_uuidv7 in postgresql as an extension for uuid v7 and using https://github.com/r4gus/uuid-zig as plugin on jetzig
can you give an example on jetzig migration and jetzig model for this sql
Thanks in advance
The text was updated successfully, but these errors were encountered: