Open wasuwas opened 2 days ago
@wasuwas Thank you for your suggestion.
However, I cannot accept the proposal to modify a deployed migration file. Once prisma migrate deploy
has been executed, altering an applied migration file will result in a checksum mismatch with the records in the _prisma_migrations
table.
Therefore, I generate migration files without applying them by using the --create-only
option with the prisma migrate dev --create-only
command. This approach ensures that only the latest migration files are targeted.
If the proposed change in item 3 could be implemented in a new migration file instead of modifying a deployed one, that would be ideal. I recognize that there are still many areas for improvement in prismarls, and I appreciate your continued suggestions.
Support Multiple Migration Directories
Overview
Currently, the tool only appends RLS (Row-Level Security) settings to the latest migration file. However, in practical, migration directories are often created each time the schema.prisma file is modified. This results in CREATE TABLE SQL statements being scattered across multiple migration directories.
I propose to enhance the tool to support multiple migration directories, allowing it to apply RLS settings across all relevant migrations, not just the latest one. This enhancement will make the tool more versatile and better aligned with typical Prisma migration patterns, where schema changes may be spread across multiple migrations over time.
Proposed changes