Newbie/Novice/Basic Question please: In setting up...
# orm-help
t
Newbie/Novice/Basic Question please: In setting up a new project via app.prisma.io wrt Types v Models/ id autoincrement In using the CLI for hosted service at prisma.io to get started It offers the following starter Type type User { id: ID! @id name: String! } I would like to amend the id to an autoincrement Integer, such as this tutorial material suggests here https://www.prisma.io/docs/getting-started/quickstart-typescript#write-your-first-query-with-prisma-client model User { id Int @id @default(autoincrement()) email String @unique name String? posts Post[] } but then I notice the difference between type and model The datamodel.prisma files that is set up as a starter seems to be based on types (not models) and works very well for quick setup The app.prisma.io service I am using is hooked into the hosted SQL service and abstracted away, so all changes are made via datamodel.prisma So how to use the app.prisma.io hosted service to edit models versus types? How to use an autoincrement Int field as id there? Many thanks for directing me to where this is best explained Thanks in advance Tony
s
prisma 1 doesn't support autoincrement.
Use prisma 2.
t
thanks Sachin, as far as I am aware the hosted service does use prisma 2 , at least all the documentation suggests that
this is where I arrive when hit the documentation
this suggests that this is the Prisma2 Docs, ( as the Prisma1 Docs are made available via another link as you see)
but you may be right.. the hosted service is showing up as v 1.34 here?
I will repost the question in the prisma 2 section, thanks
n
Hey @Tony Shannon 👋 quick question – how did you arrive at app.prisma.io in the first place? 🙂
t
hi @nikolasburk from here if I recall correctly https://www.prisma.io/cloud
n
Ha ok thanks! And how did you end up on that page? 😄
t
I probably googled Prisma Cloud
or Prisma hosted
which is what I was looking for ;o)
hope that helps
🙌 1