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

Implement scalar list defaults proposal in language tools #1159

Closed
Tracked by #13318
tomhoule opened this issue May 12, 2022 · 2 comments · Fixed by #1174
Closed
Tracked by #13318

Implement scalar list defaults proposal in language tools #1159

tomhoule opened this issue May 12, 2022 · 2 comments · Fixed by #1174
Assignees
Labels
kind/subtask Subtask that was created from an epic team/schema Issue for team Schema. topic: autocompletion
Milestone

Comments

@tomhoule
Copy link
Contributor

https://www.notion.so/prismaio/Proposal-Scalar-List-Defaults-94d0891a3355475999f10b270e2a311a

What needs to happen is TBD.

@tomhoule tomhoule added team/schema Issue for team Schema. kind/subtask Subtask that was created from an epic labels May 12, 2022
@janpio
Copy link
Member

janpio commented Jun 2, 2022

Incomplete notes:

  • Remove autoincrement()
  • Auto complete empty list by default
  • No functions in auto completions except dbgenerated

@janpio janpio added this to the 4.0.x milestone Jun 11, 2022
@Jolg42
Copy link
Member

Jolg42 commented Jun 20, 2022

So auto completions for this schema for @default(|) (from prisma/prisma-engines#2946)

        datasource db {
          provider = "postgresql"
          url      = "env(TEST_DATABASE_URL)"
        }
        model defaults {
          id                String     @id
          text_empty        String[]   @default()
          text              String[]   @default()
          text_c_escape     String[]   @default()
          colors            color[]    @default()
          int_defaults      Int[]      @default()
          float_defaults    Float[]    @default()
          bool_defaults     Boolean[]  @default()
          datetime_defaults DateTime[] @default() @db.Timestamptz
        }
        enum color {
          RED
          GREEN
          BLUE
        }

should be
[] or dbgenerated() (but not [dbgenerated(...)])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/subtask Subtask that was created from an epic team/schema Issue for team Schema. topic: autocompletion
Development

Successfully merging a pull request may close this issue.

4 participants