这是indexloc提供的服务,不要输入任何密码
Skip to content

'Down' migration generated by hasura console is wrong for insert_permission #1366

@elgordino

Description

@elgordino

When executing a permissions change in the hasura console with migrations enabled, the up migration is correct and drops the existing permission and creates the new one

- args:
    role: user
    table:
      name: table_name
      schema: public
  type: drop_insert_permission
- args:
    permission:
    role: user
       ---- new permissions here
    table:
      name: table_name
      schema: public
  type: create_insert_permission

However the down migration is incorrect, it appears to reverse the create_insert_permission and drop_insert_permission from above. It should rather do drop_insert_permission then a create_insert_permission with the original permissions before the change was made.

It's not a problem for my project as I don't use the auto-generated migrations but thought I should raise as if someone relies on this for their down migrations then they could end up with permissions different to how they expected.

Metadata

Metadata

Assignees

Labels

c/consoleRelated to consolek/bugSomething isn't workings/wipStatus: This issue is a work in progress

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions