Closed tbhaxor closed 2 years ago
I have created the fixtures using the following snippet
fixtures, err := testfixtures.New( testfixtures.Database(db), testfixtures.Dialect("postgres"), testfixtures.UseDropConstraint(), testfixtures.Directory("apps/api/ent/tests/data"), testfixtures.DangerousSkipTestDatabaseCheck(), ) if err != nil { return err } return fixtures.Load()
When I run this code, I am getting
testfixtures: error inserting record: pq: column "currentSupply" of relation "collections" does not exist, on file: collections.yaml
Also in the collections.yaml file the field exists
- created: "2008-05-22T16:12:37.808839923Z" currentSupply: 1 description: Voluptas beatae eum sit nesciunt laboriosam voluptates distinctio aspernatur voluptas. id: 5902903159430590834 image: https://picsum.photos/250/250 longName: Cujo-EhiiTSPeXR3 maxSupply: 8 modified: "2008-05-22T16:12:37.808839923Z" name: Cujo orgId: 8021333953255315354
Note I have executed migraions before running this code
Hi @tbhaxor,
This error is from PostgreSQL. It is telling you that the column collections.currentSupply does not exist in your database.
collections.currentSupply
I have created the fixtures using the following snippet
When I run this code, I am getting
Also in the collections.yaml file the field exists