Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose migration builder impl, make node-pg-migrate can used as a schema builder library #1283

Open
wenerme opened this issue Oct 9, 2024 · 0 comments · May be fixed by #1285
Open

Expose migration builder impl, make node-pg-migrate can used as a schema builder library #1283

wenerme opened this issue Oct 9, 2024 · 0 comments · May be fixed by #1285
Labels
s: pending triage Pending Triage

Comments

@wenerme
Copy link
Contributor

wenerme commented Oct 9, 2024

Description

I hope I can just generate sql by using node-pg-migrate's DSL, I think node-pg-migrate should seperate the build & execution part.

like this #651 , I'd like to make a standalone js app, means no fs access.

I hope I can execue the migration by kysely (https://kysely.dev/docs/migrations ), just generate sql by node-pg-migrate.

Suggested solution

Expose the builder impl (e.g. createMigrationBuilder), the final migration is just like interface Migration {up():MaybePromise<any>, down?:()=>MaybePromise<any>}, the migration set is Record<string,Migration>, the runner/execution to decide which migrations should execute.

Alternative

No response

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s: pending triage Pending Triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant