text:
Added fix for issue #3884 - AvatarStack disableExpand and rightAlign don't work together

Fixes https://github.com/primer/react/issues/3884

This fix resolves:
The avatars will not expand if alignRight prop is True and disableExpand prop is True.
Every combination works as expected.
https://github.com/primer/react/assets/68850280/c1a88b6d-a913-4157-87fd-fc03c43559b5

Hi @maximedegreve / @siddharthkp / @lesliecdubs could you help me with this?

Adding changeset 👍

Hi @siddharthkp is there any way to test CI / test (pull_request) locally ? i am suspecting the reason for failure is due to changes made in CSS class-level !

Hi @siddharthkp is there any way to test CI / test (pull_request) locally ? i am suspecting the reason for failure is due to changes made in CSS class-level !

Yes, if you have a local clone you can run npm run test and you should see the failing test. It looks like there's a snapshot that has changed. You can update that with npm run test:update. (see package.json for all our scripts)
Contributor docs: https://github.com/primer/react/blob/main/contributor-docs

Hi @siddharthkp done with the snapshot update !

Hi @broccolinisoup i have made the necessary changes 👍 kindly review it please :)

Hi @broccolinisoup i have made the necessary changes 👍 kindly review it please :)

Hi! Sorry maybe my comment wasn't clear. We updated the package-lock.json and package.json in another PR and it is merged now too so you don't need to push any versining changes. We should only see 3 files changed in the diff if you could please take the package.json and package-lock.json back? Thank you!

I have already made the changes package.json and package-lock.json back to its original files, sorry i am not getting what you mean

I have already made the changes package.json and package-lock.json back to its original files, sorry i am not getting what you mean

No worries! If you could view the latest @primer/react version in the package.json (reference), it is 36.1.0 but in this PR, the changes are taken a patch version back.
If you do git checkout main package.json package-lock.json in your branch and commit and push, I believe we won't see any package changes in the diff. Let me know if I clarify anything further 🙌🏻

I have already made the changes package.json and package-lock.json back to its original files, sorry i am not getting what you mean

No worries! If you could view the latest @primer/react version in the package.json (reference), it is 36.1.0 but in this PR, the changes are taken back to 36.0.0
If you do git checkout main package.json package-lock.json in your branch and commit and push, I believe we won't see any package changes in the diff. Let me know if I clarify anything further 🙌🏻

just did the needful, could you please verify now :)

HI @cs25-esc 👋🏻  There are still 5 files in the diff and that includes package.json and package-lock.json. It is probably because of the local editor settings that caused prettier not being ran and remove the EOF lines.
Could you please run the following in your terminal?
npm run format package.json package-lock.json and make sure there is no package.json and package-lock.json in the diff?

hi @broccolinisoup please review now

@broccolinisoup Feel free to merge when ready :)

authors: broccolinisoup cs25-esc siddharthkp

repo: primer/react


text:
Unsupervised dropout method

Hi,
First of all, thanks for the excellent research. The idea of the paper was interesting, and the experiments were well designed, so I was able to learn a lot :)
I would like to ask a specific question about the dropout method in an unsupervised setting.
And i checked the reply that you used the transformers package dropout method in a recent issue.
However, if the random seed is fixed, the same input pair will generate a different hidden representation only if a particular method for generating the dropout mask is used, but it is not clearly understood that this part was implemented using standard dropout.
The code uses the default value (0.1) when defining the model with transformers without modifying the dropout. I wonder if the representation generated when the same input is simply encoded twice can be viewed as an output generated by controlling the dropout differently.
Could you please explain a little more in detail?
Additionally, I am curious how you fixed the randomness of the corresponding part in the code during the p=0.1, fixed 0.1 experiment of 'table3', and proceeded with the experiment.
Thanks 🤗

Hi,
The random seed is set at the beginning of the training, which means that every time we apply dropout on a sentence, the mask could be different. The randomness is controlled by keeping the same random seed (it's mostly for initialization).

source: gharchive/issue

repo: princeton-nlp/SimCSE

license: MIT

license_type: permissive

license_source: github-api


text:
About the version of alignment-handbook

Hi,
Thanks for your great work!
I am trying to run the code and reproduce the result. Currently, I found the latest version of alignment-handbook may not match the current code since I encounter these errors:
ImportError: cannot import name 'maybe_insert_system_message' from 'alignment'

Hi,
The alignment-handbook version we used was 0.4.0.dev0 which should be the same as the latest version. The maybe_insert_system_message function is defined here:
https://github.com/huggingface/alignment-handbook/blob/606d2e954fd17999af40e6fb4f712055ca11b2f0/src/alignment/data.py#L28
Could you check if you have installed the alignment-handbook library appropriately by running the following command?
git clone https://github.com/huggingface/alignment-handbook.git
cd ./alignment-handbook/
python -m pip install .

Alternatively, I think you may also manually copy the maybe_insert_system_message function to run_simpo.py.
I hope this helps! Let us know if you still run into issues of the code.
Best,
Yu

Hi, I think the error is caused by the missing import in __init__.py of alignment-handbook==0.4.0.dev0. Refer to: https://github.com/huggingface/alignment-handbook/blob/main/src/alignment/init.py
Importing these from alignment.data works well for me. The changes are shown in the PR #11.

authors: cameron-chen lucasliunju yumeng5

repo: princeton-nlp/SimPO


text:
Question about fine-tuning on Middlebury2014

Hi @lahavlipson,
Thank you for your great work!
I am now using the weights trained on the scenefrlow dataset to fine-tune on the middlebury dataset. After I finish the fine-tuning, the results on the D1 of the full middlebury dataset are even worse than before. Is this normal?
The raftstereo-sceneflow.pth result is consistent with Table 1 of the paper:

However, the result after fine tuning on the Middlebury2014 dataset are relatively poor：

I've found that the performance is better and more stable if the learning rate is small,  e.g. --lr 0.00002, similar to what we use for KITTI; I've updated the command in the README.

I've found that the performance is better and more stable if the learning rate is small, e.g. --lr 0.00002, similar to what we use for KITTI; I've updated the command in the README.

Thank you for your reply and look forward to the updated README.

I've found that the performance is better and more stable if the learning rate is small, e.g. --lr 0.00002, similar to what we use for KITTI; I've updated the command in the README.

In addition, how much learning rate do you use to fine-tune the KITTI 2015 dataset?
In section 4.2 of the paper, it is mentioned that the minimum learning rate used for fine-tuning the KITTI 2015 dataset is 1e-5. What is the maximum learning rate? I hope you can tell me, thank you!

On KITTI, we use --lr 0.00001

On KITTI, we use --lr 0.00001

Thank you. I used --lr 0.0002 and submitted the results to KITTI website for testing. The metrics of D1-all are consistent with those of RAFT-Stereo on the list.  However, fine-tuning on the middlebury dataset with --lr 0.00002 did not get the same precision as the Middlebury.pth weights you supplied.

authors: kongdebug lahavlipson

repo: princeton-vl/RAFT-Stereo


text:
Pre-training model cannot be downloaded

Pre-training model cannot be downloaded.
Thank you for your work, I can't download the pre-training model from the link you gave, can you give other download links, such as Google Driver, Baidu Wangpan, etc. Thank you very much.

I got it from your link. Thanks

@taoshiqian Hi, can you share a pre-trained model? The link fails to download now.

authors: WinstonDeng taoshiqian

repo: princeton-vl/pose-ae-demo


text:
Initial docker image

Initial response to #910 with basic implementation of a possible official graphql-playground Docker image.
Changes proposed in this pull request:

Minimal static server with template from html package (sources latest playground release)
Dockerfile for building the node app
Ability to configure container via environment variables (port/endpoint/etc.)

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.ev-dev seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.

Modified: removed middleware node dependency and updated server to send template from html plugin instead containing static url for latest middleware

@ev-dev Thanks for the PR, it looks nice. But I best idea is to server graphql-playground-html, because when something is going to change in that package we need to add it to docker/server/index.js what is kind of contra productive.

This issue seems stale but it provides great functionality. If @ev-dev agrees i can try to implement the two requested changes to help this getting merged.

source: gharchive/pull-request

authors: Ambro17 CLAassistant Huvik ev-dev

repo: prisma-labs/graphql-playground


text:
ERROR: cannot use column reference in DEFAULT expression

Bug description
I am receiving an error when I apply a new migration for the database.
It is weird because is a new database and there are no others migrations before.
How to reproduce
Create a new database using PostgreSQL and apply this Prisma schema using "npx prisma migrate dev".
Expected behavior
No response
Prisma information
schema.prisma
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema

generator client {
  provider = "prisma-client-js"
}

datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}

model Hoster {
  id                   String                     @id
  name                 String
  authenticationMethod HosterAuthenticationMethod
  limits               Json
  downloads            Download[]
}

enum HosterAuthenticationMethod {
  FREE
}

model Download {
  id             String         @id @default(dbgenerated("uuid"))
  downloadId     String
  priority       Int            @default(0)
  downloadStatus DownloadStatus
  fingerprint    String
  Hoster         Hoster         @relation(fields: [hosterId], references: [id])
  hosterId       String

  @@unique([downloadId, hosterId])
}

enum DownloadStatus {
  PENDING
  WAITING_DOWNLOAD
  SUCCESS
  FAILED
}

Environment & setup

OS: Linux
Database: PostgreSQL v14
Node.js version: v16.13.2

Prisma Version
node ➜ /workspace (feature/prisma ✗) $ npx prisma -v
prisma                  : 3.9.2
@prisma/client          : Not found
Current platform        : debian-openssl-1.1.x
Query Engine (Node-API) : libquery-engine bcc2ff906db47790ee902e7bbc76d7ffb1893009 (at node_modules/@prisma/engines/libquery_engine-debian-openssl-1.1.x.so.node)
Migration Engine        : migration-engine-cli bcc2ff906db47790ee902e7bbc76d7ffb1893009 (at node_modules/@prisma/engines/migration-engine-debian-openssl-1.1.x)
Introspection Engine    : introspection-core bcc2ff906db47790ee902e7bbc76d7ffb1893009 (at node_modules/@prisma/engines/introspection-engine-debian-openssl-1.1.x)
Format Binary           : prisma-fmt bcc2ff906db47790ee902e7bbc76d7ffb1893009 (at node_modules/@prisma/engines/prisma-fmt-debian-openssl-1.1.x)
Default Engines Hash    : bcc2ff906db47790ee902e7bbc76d7ffb1893009
Studio                  : 0.457.0

What is the full error message?
What is the generated SQL that is being executed?

node ➜ /workspace (feature/prisma) $ npx prisma migrate dev
Prisma schema loaded from prisma/schema.prisma
Datasource "db": PostgreSQL database "postgres", schema "public" at "db:5432"

✔ Enter a name for the new migration: … create-download-and-hoster-schema
Applying migration `20220220001209_create_download_and_hoster_schema`
Error: P3018

A migration failed to apply. New migrations cannot be applied before the error is recovered from. Read more about how to resolve migration issues in a production database: https://pris.ly/d/migrate-resolve

Migration name: 20220220001209_create_download_and_hoster_schema

Database error code: 0A000

Database error:
ERROR: cannot use column reference in DEFAULT expression

Position:
 14     CONSTRAINT "Hoster_pkey" PRIMARY KEY ("id")
 15 );
 16
 17 -- CreateTable
 18 CREATE TABLE "Download" (
 19     "id" TEXT NOT NULL DEFAULT uuid,

DbError { severity: "ERROR", parsed_severity: Some(Error), code: SqlState("0A000"), message: "cannot use column reference in DEFAULT expression", detail: None, hint: None, position: Some(Original(490)), where_: None, schema: None, table: None, column: None, datatype: None, constraint: None, file: Some("parse_expr.c"), line: Some(531), routine: Some("transformColumnRef") }

id             String         @id @default(dbgenerated("uuid"))

This tries to create a default that refers to the column uuid: "id" TEXT NOT NULL DEFAULT uuid,. You will either have to use a PostgreSQL function in there or replace the dbgenerated with a Prisma level function.

Thank you!
It works!
schema.prisma:
model Download {
  id             String         @id @default(uuid())
  downloadId     String
  priority       Int            @default(0)

id             String         @id @default(dbgenerated("uuid"))

This tries to create a default that refers to the column uuid: "id" TEXT NOT NULL DEFAULT uuid,. You will either have to use a PostgreSQL function in there or replace the dbgenerated with a Prisma level function.

I close the issue because I don't think is a bug. If you believe it, please, feel free to open it again!

authors: felinto-dev janpio

repo: prisma/prisma


text:
Error Code P3006 with Error Code: P1014

Bug description
Hi there, I'd like to add a new column to my User model but when I want to migrate dev, it gives me this error:
Error: P3006

Migration `20230621052236_product_purchase_purchaseproduct` failed to apply cleanly
to the shadow database.
Error code: P1014
Error:
The underlying table for model `users` does not exist.

I have a  @@map(name: "users")  for my User model.
How to reproduce

Expected behavior
No response
Prisma information
generator client {
  provider = "prisma-client-js"
}

datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}

model User {
  id              String            @id @default(cuid())
  bio             String?
  name            String?
  phone           String?
  email           String?           @unique
  createdAt       DateTime          @default(now()) @map(name: "created_at")
  updatedAt       DateTime          @updatedAt @map(name: "updated_at")
  posts           Post[]
  likes           Like[]
  emailVerified   DateTime?
  image           String?
  accounts        Account[]
  sessions        Session[]
  purchases       Purchase[]
  products        Product[]
  PurchaseProduct PurchaseProduct[]

  @@map(name: "users")
}

model Account {
  id                String  @id @default(cuid())
  userId            String
  type              String
  provider          String
  providerAccountId String
  refresh_token     String? @db.Text
  access_token      String? @db.Text
  expires_at        Int?
  token_type        String?
  scope             String?
  id_token          String? @db.Text
  session_state     String?
  user              User    @relation(fields: [userId], references: [id], onDelete: Cascade)

  @@unique([provider, providerAccountId])
}

model Session {
  id           String   @id @default(cuid())
  sessionToken String   @unique
  userId       String
  expires      DateTime
  user         User     @relation(fields: [userId], references: [id], onDelete: Cascade)
}

model VerificationToken {
  identifier String
  token      String   @unique
  expires    DateTime

  @@unique([identifier, token])
}

model Post {
  id        String   @id @default(cuid())
  title     String?
  content   String
  published Boolean  @default(true)
  author    User     @relation(fields: [authorId], references: [id], onDelete: Cascade, onUpdate: Cascade)
  // likes     Int?     @default(0)
  // replies   Int?     @default(0)
  authorId  String
  slug      String
  createdAt DateTime @default(now()) @map(name: "created_at")
  updatedAt DateTime @updatedAt @map(name: "updated_at")
  likes     Like[]
  parentId  String?
  parent    Post?    @relation("PostReplies", fields: [parentId], references: [id], onDelete: Cascade, onUpdate: Cascade)
  replies   Post[]   @relation("PostReplies")
  category  Int
}

model Like {
  id        String   @id @default(cuid())
  createdAt DateTime @default(now()) @map(name: "created_at")
  authorId  String
  author    User     @relation(fields: [authorId], references: [id], onDelete: Cascade, onUpdate: Cascade)
  postId    String
  post      Post     @relation(fields: [postId], references: [id], onDelete: Cascade, onUpdate: Cascade)
}

model Product {
  id              String            @id @default(cuid())
  name            String
  features        Int
  price           Int
  priceDiscount   Int
  createdAt       DateTime          @default(now()) @map(name: "created_at")
  updatedAt       DateTime          @updatedAt @map(name: "updated_at")
  creatorId       String
  creator         User              @relation(fields: [creatorId], references: [id], onDelete: Cascade, onUpdate: Cascade)
  purchaseProduct PurchaseProduct[]
}

model Purchase {
  id            String            @id @default(cuid())
  createdAt     DateTime          @default(now()) @map(name: "created_at")
  purchaserId   String
  purchaser     User              @relation(fields: [purchaserId], references: [id], onDelete: Cascade, onUpdate: Cascade)
  products      PurchaseProduct[]
  transactionId String
  status        String
}

model PurchaseProduct {
  id            String   @id @default(cuid())
  name          String
  features      Int
  price         Int
  priceDiscount Int
  createdAt     DateTime @default(now()) @map(name: "created_at")
  updatedAt     DateTime @updatedAt @map(name: "updated_at")
  productId     String
  product       Product  @relation(fields: [productId], references: [id])
  purchaseId    String
  purchase      Purchase @relation(fields: [purchaseId], references: [id], onDelete: Cascade, onUpdate: Cascade)
  purchaserId   String
  purchaser     User     @relation(fields: [purchaserId], references: [id], onDelete: Cascade, onUpdate: Cascade)
}

Here is my migration SQL:
-- CreateTable
CREATE TABLE "Product" (
    "id" TEXT NOT NULL,
    "name" TEXT NOT NULL,
    "features" INTEGER NOT NULL,
    "price" INTEGER NOT NULL,
    "priceDiscount" INTEGER NOT NULL,
    "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
    "updated_at" TIMESTAMP(3) NOT NULL,
    "creatorId" TEXT NOT NULL,

    CONSTRAINT "Product_pkey" PRIMARY KEY ("id")
);

-- CreateTable
CREATE TABLE "Purchase" (
    "id" TEXT NOT NULL,
    "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
    "purchaserId" TEXT NOT NULL,
    "transactionId" TEXT NOT NULL,
    "status" TEXT NOT NULL,

    CONSTRAINT "Purchase_pkey" PRIMARY KEY ("id")
);

-- CreateTable
CREATE TABLE "PurchaseProduct" (
    "id" TEXT NOT NULL,
    "name" TEXT NOT NULL,
    "features" INTEGER NOT NULL,
    "price" INTEGER NOT NULL,
    "priceDiscount" INTEGER NOT NULL,
    "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
    "updated_at" TIMESTAMP(3) NOT NULL,
    "productId" TEXT NOT NULL,
    "purchaseId" TEXT NOT NULL,
    "purchaserId" TEXT NOT NULL,

    CONSTRAINT "PurchaseProduct_pkey" PRIMARY KEY ("id")
);

-- AddForeignKey
ALTER TABLE "Product" ADD CONSTRAINT "Product_creatorId_fkey" FOREIGN KEY ("creatorId") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "Purchase" ADD CONSTRAINT "Purchase_purchaserId_fkey" FOREIGN KEY ("purchaserId") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "PurchaseProduct" ADD CONSTRAINT "PurchaseProduct_productId_fkey" FOREIGN KEY ("productId") REFERENCES "Product"("id") ON DELETE RESTRICT ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "PurchaseProduct" ADD CONSTRAINT "PurchaseProduct_purchaseId_fkey" FOREIGN KEY ("purchaseId") REFERENCES "Purchase"("id") ON DELETE CASCADE ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "PurchaseProduct" ADD CONSTRAINT "PurchaseProduct_purchaserId_fkey" FOREIGN KEY ("purchaserId") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE;

Environment & setup

OS: Windows 10
Database: PostgreSQL
Node.js version: v18.14.2

Prisma Version
    "@prisma/client": "^5.0.0",
  "prisma": "^5.0.0",

I tried upgrading to 5.0 from 4.15 for both packages in order to solve this error.

The error message indicates that when executing 20230621052236_product_purchase_purchaseproduct it tries to reference a table users that does not exist. Do you have earlier/previous migrations that indeed do a CREATE TABLE "users"? If not, the error message is fully correct.

The error message indicates that when executing the migration 20230621052236_product_purchase_purchaseproduct it tries to reference a table users that does not exist. (We can see in the SQL you shared above, that it indeed tries to create foreign keys that reference that table.)
Do you have earlier/previous migrations that indeed do a CREATE TABLE "users"? If not, the error message is fully correct and your migration history is somehow messed up.

Yes, I did have an init migration with CREATE TABLE "users".
-- CreateTable
CREATE TABLE "users" (
    "id" TEXT NOT NULL,
    "bio" TEXT,
    "name" TEXT,
    "email" TEXT,
    "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
    "updated_at" TIMESTAMP(3) NOT NULL,
    "emailVerified" TIMESTAMP(3),
    "image" TEXT,

    CONSTRAINT "users_pkey" PRIMARY KEY ("id")
);

-- CreateTable
CREATE TABLE "Account" (
    "id" TEXT NOT NULL,
    "userId" TEXT NOT NULL,
    "type" TEXT NOT NULL,
    "provider" TEXT NOT NULL,
    "providerAccountId" TEXT NOT NULL,
    "refresh_token" TEXT,
    "access_token" TEXT,
    "expires_at" INTEGER,
    "token_type" TEXT,
    "scope" TEXT,
    "id_token" TEXT,
    "session_state" TEXT,

    CONSTRAINT "Account_pkey" PRIMARY KEY ("id")
);

-- CreateTable
CREATE TABLE "Session" (
    "id" TEXT NOT NULL,
    "sessionToken" TEXT NOT NULL,
    "userId" TEXT NOT NULL,
    "expires" TIMESTAMP(3) NOT NULL,

    CONSTRAINT "Session_pkey" PRIMARY KEY ("id")
);

-- CreateTable
CREATE TABLE "VerificationToken" (
    "identifier" TEXT NOT NULL,
    "token" TEXT NOT NULL,
    "expires" TIMESTAMP(3) NOT NULL
);

-- CreateTable
CREATE TABLE "Post" (
    "id" TEXT NOT NULL,
    "title" TEXT,
    "content" TEXT NOT NULL,
    "published" BOOLEAN NOT NULL DEFAULT true,
    "authorId" TEXT NOT NULL,
    "slug" TEXT NOT NULL,
    "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
    "updated_at" TIMESTAMP(3) NOT NULL,
    "parentId" TEXT,
    "category" INTEGER NOT NULL,

    CONSTRAINT "Post_pkey" PRIMARY KEY ("id")
);

-- CreateTable
CREATE TABLE "Like" (
    "id" TEXT NOT NULL,
    "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
    "authorId" TEXT NOT NULL,
    "postId" TEXT NOT NULL,

    CONSTRAINT "Like_pkey" PRIMARY KEY ("id")
);

-- CreateIndex
CREATE UNIQUE INDEX "users_email_key" ON "users"("email");

-- CreateIndex
CREATE UNIQUE INDEX "Account_provider_providerAccountId_key" ON "Account"("provider", "providerAccountId");

-- CreateIndex
CREATE UNIQUE INDEX "Session_sessionToken_key" ON "Session"("sessionToken");

-- CreateIndex
CREATE UNIQUE INDEX "VerificationToken_token_key" ON "VerificationToken"("token");

-- CreateIndex
CREATE UNIQUE INDEX "VerificationToken_identifier_token_key" ON "VerificationToken"("identifier", "token");

-- AddForeignKey
ALTER TABLE "Account" ADD CONSTRAINT "Account_userId_fkey" FOREIGN KEY ("userId") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "Session" ADD CONSTRAINT "Session_userId_fkey" FOREIGN KEY ("userId") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "Post" ADD CONSTRAINT "Post_authorId_fkey" FOREIGN KEY ("authorId") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "Post" ADD CONSTRAINT "Post_parentId_fkey" FOREIGN KEY ("parentId") REFERENCES "Post"("id") ON DELETE CASCADE ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "Like" ADD CONSTRAINT "Like_authorId_fkey" FOREIGN KEY ("authorId") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "Like" ADD CONSTRAINT "Like_postId_fkey" FOREIGN KEY ("postId") REFERENCES "Post"("id") ON DELETE CASCADE ON UPDATE CASCADE;

Hmm, there goes my theory. Can you maybe share a zipped up version of your prisma/migrations folder and a full copy of your schema? That would allow us to reproduce this ourselves.
(I now also notice that the error message you are getting is probably different from what a migration file that references a non existent table would be getting.)

Hmm, there goes my theory. Can you maybe share a zipped up version of your prisma/migrations folder and a full copy of your schema? That would allow us to reproduce this ourselves.
(I now also notice that the error message you are getting is probably different from what a migration file that references a non existent table would be getting.)

It is alright @janpio, thanks for replying!
FYI, I tried changing the latest migration SQL file from REFERENCES "users"("id") to REFERENCES "User"("id") but to no avail.
Please find attached the whole prisma folder which includes /migrations and also my full schema:
prisma.zip
I am using railway's managed PostgreSQL instance (in case it somehow did had any effect)
Thanks once again!

Hi, @janpio sorry for bugging you.
Is everything alright for my schema files?

Looks like it to me, but we will only really know when someone has the time to reproduce this problem.

Looks like it to me, but we will only really know when someone has the time to reproduce this problem.

I see, thanks for having a look at my files.
Is there a possible workaround for me to add more fields to my schema without using migrate?

Okay, so downloading your schema and migrations history, I can reproduce the p1014

This is because your init migration is called just that: init. migrate dev is just not picking it up. Migrations are expected to run in order based on when they were created and therefore your init migration needs to have some sort of date representation that is older than product_purchase_purchaseproduct

@SyahmiRafsan Although this is marked as a confirmed bug now, there is nothing really wrong: You can just give your init migration a different name by renaming that folder, for example, 0_init - and you should be good.
But of course we could improve that behavior, and for example warn about the migration without a leading number that would lead to it being applied last.

I experienced the problem too. to fix it, I deleted my migrations folder, then made a new one with  npx prisma migrate dev, wouldn't  recommend if your in prod though

I experienced the problem too. to fix it, I deleted my migrations folder, then made a new one with npx prisma migrate dev, wouldn't recommend if your in prod though

I was coming to comment on the same thing. after a thousand failed attempts. delete the migrations folder. execute

npx prism migrate developer

generate npx prism

and this in production. Of course I have a dev branch that has all the migration files.
Conclusion: npx prism deploy not working

Another potential issue. I was getting the "The underlying table for model _prisma_migrations does not exist". I was trying to change the permissions for that table for RLS in another migration. I commented that statement and running migrate dev again told me the 0_Init could not be implemented. I copied the SQL code into a DB Client and it marked that I had a weird char in the SQL. I guess by mistake a modified the Init SQL without realising it and my local migrations were not running. My bad on this but hopefully it could help others.

Okay, so downloading your schema and migrations history, I can reproduce the p1014
This is because your init migration is called just that: init. ~migrate dev is just not picking it up~¹. Migrations are expected to run in order based on when they were created and therefore your init migration needs to have some sort of date representation that is older than product_purchase_purchaseproduct
¹ I went back and checked this and it is being picked up, it's just sorted after the migration that depends on it which effectively yields the same result

If you decide to manually change the name of any migration, remember that you'll need to change it both in your filesystem and in the database, within _prisma_migrations

authors: Drunkss Druue SyahmiRafsan gsusI janpio metacop sfratini


text:
prisma2.00-beta.2 release migration error

Bug description
I started using prisma when prisma's version was beta 1. I know 2.00-beta.2 was released today. There are migration bug. I migrated schema.prisma which doesn't have relation field. But there are many errors now about relation field. So I fixed schema adding relation field like below
model UserAccount {
  id             Int            @default(autoincrement()) @id
  createdAt      DateTime       @default(now())
  updatedAt      DateTime       @updatedAt
  deletedAt      DateTime
  authentication Authentication
  accountId      String
  user           User           @relation(fields: [userId], references: [id])
  userId         Int
}

When I tried to command
prisma migrate save --experimental

Failure during a migration command: The migration produced an in
valid schema (ErrorCollection { errors: [DirectiveValidationErro
r { message: "The relation fields `question` on Model `Stamp` an
d `stamp` on Model `Question` do not provide the `fields` argume
nt in the @relation directive. You have to provide it on one of
the two fields.", directive_name: "@relation", span: Span { star
t: 0, end: 0 } }, DirectiveValidationError { message: "The relat
ion fields `coreReply` on Model `Stamp` and `stamp` on Model `Co
reReply` do not provide the `fields` argument in the @relation d
irective. You have to provide it on one of the two fields.", dir
ective_name: "@relation", span: Span { start: 0, end: 0 } }, Dir
ectiveValidationError { message: "The relation fields `user` on
Model `SchoolInfo` and `schoolInfo` on Model `User` do not provi
de the `fields` argument in the @relation directive. You have to
 provide it on one of the two fields.", directive_name: "@relati
on", span: Span { start: 0, end: 0 } }, DirectiveValidationError
 { message: "The relation fields `userAccount` on Model `User` a
nd `user` on Model `UserAccount` do not provide the `fields` arg
ument in the @relation directive. You have to provide it on one
of the two fields.", directive_name: "@relation", span: Span { s
tart: 0, end: 0 } }, DirectiveValidationError { message: "The re
lation fields `userPush` on Model `User` and `user` on Model `Us
erPush` do not provide the `fields` argument in the @relation di
rective. You have to provide it on one of the two fields.", dire
ctive_name: "@relation", span: Span { start: 0, end: 0 } }, Dire
ctiveValidationError { message: "The relation fields `schoolInfo
` on Model `User` and `user` on Model `SchoolInfo` do not provid
e the `fields` argument in the @relation directive. You have to
provide it on one of the two fields.", directive_name: "@relatio
n", span: Span { start: 0, end: 0 } }, DirectiveValidationError
{ message: "The relation fields `user` on Model `UserAccount` an
d `userAccount` on Model `User` do not provide the `fields` argu
ment in the @relation directive. You have to provide it on one o
f the two fields.", directive_name: "@relation", span: Span { st
art: 0, end: 0 } }, DirectiveValidationError { message: "The rel
ation fields `user` on Model `UserPush` and `userPush` on Model
`User` do not provide the `fields` argument in the @relation dir
ective. You have to provide it on one of the two fields.", direc
tive_name: "@relation", span: Span { start: 0, end: 0 } }, Direc
tiveValidationError { message: "The relation fields `mentor` on
Model `Admin` and `admin` on Model `Mentor` do not provide the `
fields` argument in the @relation directive. You have to provide
 it on one of the two fields.", directive_name: "@relation", spa
n: Span { start: 0, end: 0 } }, DirectiveValidationError { messa
ge: "The relation field `author` on Model `Column` must specify
the `fields` argument in the @relation directive.", directive_na
me: "@relation", span: Span { start: 0, end: 0 } }, DirectiveVal
idationError { message: "The relation field `userColumn` on Mode
l `Column` must specify the `fields` argument in the @relation d
irective.", directive_name: "@relation", span: Span { start: 0,
end: 0 } }, DirectiveValidationError { message: "The relation fi
elds `admin` on Model `Mentor` and `mentor` on Model `Admin` do
not provide the `fields` argument in the @relation directive. Yo
u have to provide it on one of the two fields.", directive_name:
 "@relation", span: Span { start: 0, end: 0 } }, DirectiveValida
tionError { message: "The relation field `questioner` on Model `
Question` must specify the `fields` argument in the @relation di
rective.", directive_name: "@relation", span: Span { start: 0, e
nd: 0 } }, DirectiveValidationError { message: "The relation fie
lds `stamp` on Model `Question` and `question` on Model `Stamp`
do not provide the `fields` argument in the @relation directive.
 You have to provide it on one of the two fields.", directive_na
me: "@relation", span: Span { start: 0, end: 0 } }, DirectiveVal
idationError { message: "The relation field `author` on Model `R
eply` must specify the `fields` argument in the @relation direct
ive.", directive_name: "@relation", span: Span { start: 0, end:
0 } }, DirectiveValidationError { message: "The relation field `
coreReply` on Model `Reply` must specify the `fields` argument i
n the @relation directive.", directive_name: "@relation", span:
Span { start: 0, end: 0 } }, DirectiveValidationError { message:
 "The relation fields `stamp` on Model `CoreReply` and `coreRepl
y` on Model `Stamp` do not provide the `fields` argument in the
@relation directive. You have to provide it on one of the two fi
elds.", directive_name: "@relation", span: Span { start: 0, end:
 0 } }, DirectiveValidationError { message: "The relation field
`user` on Model `UserFishGetLog` must specify the `fields` argum
ent in the @relation directive.", directive_name: "@relation", s
pan: Span { start: 0, end: 0 } }, DirectiveValidationError { mes
sage: "The relation field `userFishGetLog` on Model `UserFishGet
History` must specify the `fields` argument in the @relation dir
ective.", directive_name: "@relation", span: Span { start: 0, en
d: 0 } }, DirectiveValidationError { message: "The relation fiel
d `user` on Model `UserFishUseLog` must specify the `fields` arg
ument in the @relation directive.", directive_name: "@relation",
 span: Span { start: 0, end: 0 } }, DirectiveValidationError { m
essage: "The relation field `user` on Model `UserADs` must speci
fy the `fields` argument in the @relation directive.", directive
_name: "@relation", span: Span { start: 0, end: 0 } }] })

this error occured.
There were three migration file before this migration.
Do I have to delete migration file and clear database?
How to reproduce
run prisma migrate save --experimental
Expected behavior
successfully migrate
Prisma information
"@prisma/cli": "^2.0.0-beta.2",
"@prisma/client": "^2.0.0-preview025",

Environment & setup

OS: mac os
Database: postgreSQL
Prisma version: 2.00-beta.2
Node.js version: v12.14.1

I delete migration folder and clear database! Error solved


text:
Fluent API of TS client breaks in latest beta

Describe the bug
Fluent API of TS client breaks in latest beta
To Reproduce
Use the latest beta: prisma/1.20.0-beta.22

Create new project: prisma init
Generate the TS client and deploy to a Demo server
Update the data model to this and deploy afterwards and regenerate the client afterwards: type Post {
   id: ID! @unique
   createdAt: DateTime!
   updatedAt: DateTime!
   title: String!
   published: Boolean! @default(value: "false")
   author: User
   comments: [Comment!]!
 }

 type User {
   id: ID! @unique
   name: String
   email: String! @unique
   role: Role! @default(value: "USER")
   posts: [Post!]!
   comments: [Comment!]!
 }

 type Comment {
   id: ID! @unique
   createdAt: DateTime!
   text: String!
   post: Post!
   writtenBy: User!
 }

 enum Role {
   USER
   ADMIN
 }

Try to run the following TS code in a script: import { prisma } from "../generated/prisma-client";

 async function main() {

   const posts = prisma.user({
     email: "alice@priasma.io"
   }).posts()

 }

 main();

It yields the error: Property 'comments' does not exist on type 'Post'.

Here's what my package.json looks like:
{
  "devDependencies": {
    "ts-node": "^7.0.1",
    "typescript": "^3.1.4"
  },
  "dependencies": {
    "graphql": "0.13",
    "graphql-tools": "^4.0.3",
    "prisma-client-lib": "^1.19.1"
  },
  "scripts": {
    "ts-node": "ts-node",
    "start": "ts-node ./src/index.ts"
  }
}

Expected behavior
The Fluent API should work.

After I updated my project to 1.20.0-beta.24 I'm getting the following error.
Cannot find name 'NodePromise'

export interface Prisma {
    node: (args: { id: ID_Output }) => NodePromise;
}

Having the same problem. Changing NodePromise to Node fixed it for me (at least 'yarn start' starts the server now). BUT as we are not supposed to change the index.ts whatsoever I'm kind of confused what to do. I'm using the 1.21 alpha due to the mongodb support

I'm having same problem on 1.20 stable, I can't compile my project

This is fixed in prisma@1.21.0-beta.2 - please install it via npm install -g prisma@beta

@divyenduz Should I create a new ticket for adding tests or do you want to do this in this ticket?
The tests should include generating a prisma-client based on a more complex schema.graphql like in this project. After that the prisma-client should be successfully compiled. The test should fail when the compilation fails.

@sapkra : Thanks! please create a new issue, also add to that, that we should add executing operations against a live Prisma service in the test suite to test prisma-client-lib part and tag me on that issue 🙏

authors: divyenduz ellipticaldoor lterfloth nikolasburk sapkra