mirror of
https://github.com/QuivrHQ/quivr.git
synced 2025-01-07 08:07:44 +03:00
ca93cb9062
# Description - Added package manager - Added precommit checks - Rewrote dependency injection of Services and Repositories - Integrate async SQL alchemy engine - Migrate Chat repository to SQLModel - Migrated ChatHistory repository to SQLModel - User SQLModel - Unit test methodology with db rollback - Unit tests ChatRepository - Test ChatService get_history - Brain entity SQL Model - Promp SQLModel - Rewrite chat/{chat_id}/question route - updated docker files and docker compose in dev and production Added `quivr_core` subpackages: - Refactored KnowledgebrainQa - Added Rag service to interface with non-rag dependencies --------- Co-authored-by: aminediro <aminediro@github.com>
33 lines
1.2 KiB
SQL
33 lines
1.2 KiB
SQL
create type "public"."status" as enum ('info', 'warning', 'success', 'error');
|
|
|
|
alter table "public"."notifications" drop column "action";
|
|
|
|
alter table "public"."notifications" drop column "chat_id";
|
|
|
|
alter table "public"."notifications" drop column "message";
|
|
|
|
alter table "public"."notifications" add column "archived" boolean not null default false;
|
|
|
|
alter table "public"."notifications" add column "description" text;
|
|
|
|
alter table "public"."notifications" add column "read" boolean not null default false;
|
|
|
|
alter table "public"."notifications" add column "title" text not null;
|
|
|
|
alter table "public"."notifications" add column "user_id" uuid not null;
|
|
|
|
alter table "public"."notifications" alter column "status" set default 'info'::status;
|
|
|
|
alter table "public"."notifications" alter column "status" set data type status using "status"::status;
|
|
|
|
alter table "public"."notifications" add constraint "public_notifications_user_id_fkey" FOREIGN KEY (user_id) REFERENCES users(id) ON UPDATE CASCADE ON DELETE CASCADE not valid;
|
|
|
|
alter table "public"."notifications" validate constraint "public_notifications_user_id_fkey";
|
|
|
|
create policy "allow_user_all_notifications"
|
|
on "public"."notifications"
|
|
as permissive
|
|
for all
|
|
to public
|
|
using ((user_id = auth.uid()));
|