Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 23, 2024
1 parent 6744148 commit fd9c92f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ END $$;
ALTER TYPE public.projectrole OWNER TO fmtm;

ALTER TABLE public.user_roles
ALTER COLUMN "role" TYPE VARCHAR(24);
ALTER COLUMN role TYPE VARCHAR(24);

ALTER TABLE public.user_roles
ALTER COLUMN "role" TYPE public.projectrole USING role::public.projectrole;
ALTER COLUMN role TYPE public.projectrole USING role::public.projectrole;

-- Commit the transaction
COMMIT;
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
BEGIN;

-- Revert user_roles table changes
ALTER TABLE public.user_roles ALTER COLUMN "role" TYPE VARCHAR(24);
ALTER TABLE public.user_roles ALTER COLUMN role TYPE VARCHAR(24);

ALTER TABLE public.user_roles ALTER COLUMN "role" TYPE public.userrole
ALTER TABLE public.user_roles ALTER COLUMN role TYPE public.userrole
USING role::public.userrole;

-- Drop the public.projectrole enum
Expand Down
12 changes: 6 additions & 6 deletions src/backend/migrations/init/fmtm_base_schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,11 @@ SET default_table_access_method = heap;

-- Tables

CREATE TABLE IF NOT EXISTS public."_migrations" (
CREATE TABLE IF NOT EXISTS public._migrations (
date_executed TIMESTAMP,
script_name TEXT
);
ALTER TABLE public."_migrations" OWNER TO fmtm;
ALTER TABLE public._migrations OWNER TO fmtm;


CREATE TABLE public.background_tasks (
Expand Down Expand Up @@ -193,11 +193,11 @@ ALTER TABLE public.mbtiles_path_id_seq OWNER TO fmtm;
ALTER SEQUENCE public.mbtiles_path_id_seq OWNED BY public.mbtiles_path.id;


CREATE TABLE public."_migrations" (
CREATE TABLE public._migrations (
script_name text,
date_executed timestamp without time zone
);
ALTER TABLE public."_migrations" OWNER TO fmtm;
ALTER TABLE public._migrations OWNER TO fmtm;


CREATE TABLE public.organisation_managers (
Expand Down Expand Up @@ -434,8 +434,8 @@ ALTER TABLE ONLY public.xforms ALTER COLUMN id SET DEFAULT nextval(

-- Constraints for primary keys

ALTER TABLE public."_migrations"
ADD CONSTRAINT "_migrations_pkey" PRIMARY KEY (script_name);
ALTER TABLE public._migrations
ADD CONSTRAINT _migrations_pkey PRIMARY KEY (script_name);

ALTER TABLE ONLY public.background_tasks
ADD CONSTRAINT background_tasks_pkey PRIMARY KEY (id);
Expand Down

0 comments on commit fd9c92f

Please sign in to comment.