Skip to content

Bug: types.gen generated without any modification in database because view references twice same table #908

Closed
@littleannie

Description

@littleannie

Bug report

  • [ X] I confirm this is a bug with Supabase, not with my own application.
  • [X ] I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

Hi there,

We have been experiencing a recurring issue since updating to Supabase version 1.183.5, specifically when generating the types.gen.ts file.

We have a view that references the same table twice but points to different records. Consequently, we have two distinct references.

When generating the types.gen.ts file, differences are created even though we have not made any modifications to our database schema.

We do not understand why the order is generated differently in a seemingly random manner. As a result, we are encountering numerous issues with our GitHub CI.

Please feel free to reach out if you need more information.

To Reproduce

  1. create a view referencing twice the same table
  2. Commit
  3. generate types.gen many times without any db schema modification

Expected behavior

The types.gen should not be edited if no modification made on the db

Screenshots

Pasted Graphic

System information

  • OS: [e.g. macOS, Windows] : macOS
  • Browser (if applies) [e.g. chrome, safari] : Chrome
  • Version of supabase-js: [e.g. 6.0.2] : ^2.44.4
  • Version of Node.js: [e.g. 10.10.0] : 20.16.0

Additional context

Re-open issue : supabase/supabase#28212

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions