Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#1803)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.6.5 → v0.6.7](astral-sh/ruff-pre-commit@v0.6.5...v0.6.7)
- [github.com/sqlfluff/sqlfluff: 3.1.1 → 3.2.0](sqlfluff/sqlfluff@3.1.1...3.2.0)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] authored Sep 23, 2024
1 parent 3fbd840 commit f2ae207
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repos:
# Lint / autoformat: Python code
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: "v0.6.5"
rev: "v0.6.7"
hooks:
# Run the linter
- id: ruff
Expand Down Expand Up @@ -71,7 +71,7 @@ repos:

# Lint & Autoformat: SQL
- repo: https://github.com/sqlfluff/sqlfluff
rev: 3.1.1
rev: 3.2.0
hooks:
- id: sqlfluff-lint
files: ^src/backend/migrations/(?:.*/)*.*$
Expand Down
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 @@ -436,8 +436,8 @@ ALTER TABLE ONLY public.submission_photos 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 f2ae207

Please sign in to comment.