Skip to content

Commit

Permalink
Update to bodt formats
Browse files Browse the repository at this point in the history
  • Loading branch information
lwjameson committed Nov 10, 2023
1 parent 547761c commit 1bbdc9c
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
.env
./node_modules/*
node_modules
.DS_Store
.DS_Store
priivate-scripts
5 changes: 4 additions & 1 deletion SQL Scripts/tables/bodies.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-- bodies table --
CREATE TYPE body_types AS ENUM ('TextualBody');

CREATE TYPE body_formats AS ENUM ('TextPlain', 'TextHtml');
CREATE TYPE body_formats AS ENUM ('TextPlain', 'TextHtml', 'Quill');

CREATE TABLE bodies
(
Expand Down Expand Up @@ -44,3 +44,6 @@ ALTER TABLE public.bodies
-- Changes 7/26/23 --
ALTER TABLE public.bodies
ADD COLUMN is_archived bool DEFAULT FALSE;

-- Changes 11/10/23 ---
ALTER TYPE body_formats ADD VALUE 'Quill';
39 changes: 39 additions & 0 deletions supabase/migrations/20231110202445_add_quill_body_format_type.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
drop trigger if exists "on_project_document_created" on "public"."project_documents";

drop trigger if exists "on_project_document_updated" on "public"."project_documents";

drop policy "Users with correct policies can DELETE on project_documents" on "public"."project_documents";

drop policy "Users with correct policies can INSERT on project_documents" on "public"."project_documents";

drop policy "Users with correct policies can SELECT on project_documents" on "public"."project_documents";

drop policy "Users with correct policies can UPDATE on project_documents" on "public"."project_documents";

alter table "public"."project_documents" drop constraint "project_documents_created_by_fkey";

alter table "public"."project_documents" drop constraint "project_documents_document_id_fkey";

alter table "public"."project_documents" drop constraint "project_documents_project_id_fkey";

alter table "public"."project_documents" drop constraint "project_documents_updated_by_fkey";

alter table "public"."project_documents" drop constraint "project_documents_pkey";

drop index if exists "public"."project_documents_pkey";

drop table "public"."project_documents";

alter type "public"."body_formats" rename to "body_formats__old_version_to_be_dropped";

create type "public"."body_formats" as enum ('TextPlain', 'TextHtml', 'Quill');

alter table "public"."bodies" alter column format type "public"."body_formats" using format::text::"public"."body_formats";

drop type "public"."body_formats__old_version_to_be_dropped";

alter table "public"."bodies" drop column "render_type";

drop type "public"."render_type_types";


0 comments on commit 1bbdc9c

Please sign in to comment.