Skip to content

Commit f815e82

Browse files
committed
fixup
1 parent 51310a6 commit f815e82

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

migration/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ After the schema exists, ensure the `refactor` role (used in the `DATABASE_URL`)
5454
-- Allow the role to create and use objects in the schema
5555
GRANT USAGE, CREATE ON SCHEMA refactor_platform TO refactor;
5656

57-
-- Transfer ownership of the SeaORM migrations tracking table
57+
-- Transfer ownership of the SeaORM migrations tracking table (required if it was created by another role such as `doadmin`)
5858
ALTER TABLE refactor_platform.seaql_migrations OWNER TO refactor;
5959

6060
-- Grant DML privileges on all existing tables
@@ -63,6 +63,9 @@ GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA refactor_platform T
6363
-- Ensure future tables inherit these privileges
6464
ALTER DEFAULT PRIVILEGES IN SCHEMA refactor_platform
6565
GRANT SELECT, INSERT, UPDATE, DELETE ON TABLES TO refactor;
66+
67+
-- Ensure the application role searches the refactor_platform schema first
68+
ALTER ROLE refactor SET search_path = refactor_platform, public;
6669
```
6770

6871
## Running Migrations

0 commit comments

Comments
 (0)