Skip to content

[FEATURE]: precise migrations with code #4226

Open
@CyanChanges

Description

@CyanChanges

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions