quivr/supabase/migrations/20240313024244_onboarding-user.sql
Stan Girard 1a52ec38d4
feat: Add optional fields to UserIdentity and UserUpdatableProperties (#2341)
This pull request adds optional fields to the UserIdentity and
UserUpdatableProperties classes in order to allow for more flexibility
when updating user properties. The new fields include username, company,
and onboarded. Additionally, the database schema has been updated to
reflect these changes.
2024-03-12 19:47:45 -07:00

16 lines
668 B
SQL

alter table "public"."user_identity" drop constraint "user_identity_user_id_fkey";
alter table "public"."user_identity" add column "company" text;
alter table "public"."user_identity" add column "onboarded" boolean not null default false;
alter table "public"."user_identity" add column "username" text;
alter table "public"."users" add column "onboarded" boolean not null default false;
alter table "public"."user_identity" add constraint "public_user_identity_user_id_fkey" FOREIGN KEY (user_id) REFERENCES users(id) ON UPDATE CASCADE ON DELETE CASCADE not valid;
alter table "public"."user_identity" validate constraint "public_user_identity_user_id_fkey";