Can anyone tell me with the latest version of Pris...
# orm-help
r
Can anyone tell me with the latest version of Prisma 1.34 what is the story with migrations and default@default? I have an external MySQL database holding my data, and the seed worked out fine. All the data is there.
prisma deploy
seems to work, the GraphQL playground works, but when I go to Prisma Admin, I’m getting logs about
Scheduling deployment for project default@default
and
prisma reset
says: “Are you sure that you want to reset the data of default in stage default?” Where is this default@default getting created? Is it at all related to my docker-compose.yml that specified the Prisma config? Mine is something like the following:
Copy code
network_mode: host    
environment:
      PRISMA_CONFIG: |
        port: 4466
        databases:
          proteus:
            connector: mysql
            host: 127.0.0.1
            database: nest_prisma1
            user: root
            password: changedThis
            rawAccess: true
            port: '3306'
            migrations: true
Should it be looking for
proteus@nest_prisma1
? Where would I change that configuration? The migration docs for Prisma v1.14 talk about ‘multi-tenancy’ and ‘single-tenant’ https://www.prisma.io/docs/reference/service-configuration/data-model/migrations-ao8viesh2r “Currently it is only possible to configure a single database and it has to be called default. In the future it will be possible to configure multiple named databases and use them from the same service.” but in the 1.34 docs this page does not look the same.
For example:
Copy code
prisma_1  | {"key":"error/handled","requestId":"local:cjzbpdxd6000607727lkgf3hb","payload":{"exception":"com.prisma.deploy.schema.InvalidProjectId: No service with name 'default' and stage 'default' found","query":"\n      query($name: String! $stage: String!) {\n        project(name: $name stage: $stage) {\n          name\n          stage\n        }\n      }\n    ","variables":"{\"name\":\"default\",\"stage\":\"default\"}","code":"4000"}}
I changed the database name in docker-compose back to ‘default’ and did not provide a database name, then blew everything away and started over, so it is now called
default@default
in MySQL, yet I am still getting the above error when I try to load the admin interface
Copy code
$ prisma deploy
Deploying service `default` to stage `default` to server `local` 468ms
Service is already up to date.

$ prisma list
No deployed service found
I figured this out by doing
prisma deploy --new
which showed me that the service and stage name go into prisma.yml as the endpoint. My
PRISMA_CONFIG
in the docker-compose.yml went back to default, as that did not seem to impact anything, but I did need to list
projectName@dev
as the database for the mysql connection to work (I believe):
Copy code
environment:
      PRISMA_CONFIG: |
        port: 4466
        databases:
          default:
            connector: mysql
            host: 127.0.0.1
            user: root
            database: projectName@dev
            password: changed
            port: '3306'
            migrations: true
also note that having
rawAccess: true
in this file breaks the Admin interface in Prisma 1.34, per https://github.com/prisma/prisma-admin-feedback/issues/130