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

[FEATURE]: run migrations with code #4226

Open
1 task done
CyanChanges opened this issue Mar 6, 2025 · 0 comments
Open
1 task done

[FEATURE]: run migrations with code #4226

CyanChanges opened this issue Mar 6, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@CyanChanges
Copy link

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

drizzle is great, it's dynamic design is perfect for my case.
(no need to putting all tables when initialization)

I wrote a wrapper for drizzle as a plugin for the framework I use.
But I need to do create table(migrations) while only know exactly one single table.

So use pushSQLiteSchema({ table: ... }) will remove all other tables,
I try to use generateSQLiteMigration(),
but I didn't have value for the prev parameter in generateSQLiteMigration(),
because sqlitePushIntrospect() is not exported.

TL;DR
pushSQLiteSchema() needs all tables, otherwise other tables is gone.

generateSQLiteMigration() functions is exported, but can't call sqlitePushIntrospect() for prev

If I could access sqlitePushIntrospect,
I could filter out other tables and prevent accidentally removing other tables.

@CyanChanges CyanChanges added the enhancement New feature or request label Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant