[Migrations] Postgres functions #216
Closed
matthewmorek
started this conversation in
General
Replies: 1 comment 1 reply
-
|
You can execute any SQL in migrations: import { change } from '../dbScript';
change(async (db, up) => {
if (up) {
await db.sql`
CREATE SOMETHING...
`;
} else {
await db.sql`
DROP SOMETHING...
`;
}
});There are no special functions to create a postgres policy, but I think writing SQL manually is fine for this purpose. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Does Orchid support writing migrations for custom Postgres functions? I do have a few I'd like to run as part of using Supabase (example below), but I can see no docs mentioning functions?
How can I accomplish this using OrchidORM, or do I have to Supabase to run migrations for this functionality in addition to OrchidORM? I'd honestly prefer to have it all in a single place, especially when running on CI (deployment).
Beta Was this translation helpful? Give feedback.
All reactions