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

Closed
wenerme opened this issue Oct 9, 2024 · 0 comments · Fixed by #1285
Closed
Assignees
Labels
c: feature Request for new feature p: 1-normal Nothing urgent

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

@wenerme wenerme added the s: pending triage Pending Triage label Oct 9, 2024
@Shinigami92 Shinigami92 added c: feature Request for new feature p: 1-normal Nothing urgent and removed s: pending triage Pending Triage labels Mar 1, 2025
@Shinigami92 Shinigami92 self-assigned this Mar 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: feature Request for new feature p: 1-normal Nothing urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants